Forums

File upload form not appearing

I have a django app, basically a blog, with a file upload as part of the form. In my dev environment everything works perfectly, when I moved it to PA, the file upload field does not appear in the field. The code was copied over,site reloaded and directory for files made. I am stuck as there doesn't appear t be any errors, just no filefield.

Check in your web app error log and in your browser debug tools (network and console) to see if there are any errors that are not visible to the user but that may be causing the problem.

Thanks for the reply, unfortunately there are no errors anywhere. this is the Django form. Keep in mind that for titel and text this has been working fine.

from django import forms from .models import Post

class PostForm(forms.ModelForm):

class Meta:
    model = Post
    fields = ('title','text', 'image'',)

the model is fine and database was updated. The image field is simply not appearing in the html.

I''m stuck. Especially as it works on my local machine. Thanks

the extra quote is just a typo in my transcription

Then check that your config is correct for the FileField. Specifically that you have set MEDIA_ROOT to a directory that exists.