Re: models.FileField versus forms.FileField

2011-11-10 Thread Ivo Brodien
Hi, > But to clarify it seems like the forms.fileField can be used in a model in > place of models.filefield, as in the code below. > class UploadFileForm(forms.Form): >title = forms.CharField(max_length=50) >file = forms.FileField() In your code you are using only forms, no models inv

Re: models.FileField versus forms.FileField

2011-11-10 Thread Elliott Brun
Ah that makes sense a little, so just for html. But to clarify it seems like the forms.fileField can be used in a model in place of models.filefield, as in the code below. I have gotten models.FileField(uploadTo = /somedir) to work just fine in development. Is there some advantage to the formsHand

Re: models.FileField versus forms.FileField

2011-11-09 Thread Ivo Brodien
Hi, well they are different things. models.FileField is used to define a field of a model (usually to store in a DB, metadata in this case) The forms.FileField defines a field in a HTML form which can receive File uploads and then can be used to do sth on the server. I think you will get the

models.FileField versus forms.FileField

2011-11-07 Thread Eli_West
Hello, When creating a working with the models and views to upload files what is the difference between models.FileField and forms.FileField? Just a practical usage explanation would be good at this point. i can't find any comparison of the two but django directions and examples use one or the ot