-
Notifications
You must be signed in to change notification settings - Fork 187
Question: How is the default template loaded? #10
Comments
You can set the template to run with the template_name variable in the class, or it will use the lowercased class name with a "_form" suffix for create and update views. I often make the models first, then the views, and then see what template name Django is missing, as it will always try to load a template.
|
Cool! And I assume that when you call save, it also calls the save on each of your field (kind of). Therefore, there is a FileField.save() being done somewhere?! |
When you save, you save a record (or row). And all changed fields will be part of the save. All you need to know is how to set the location or choose a storage backend. And the documentation is very good at explaining that. I think https://docs.djangoproject.com/en/dev/topics/files/ is a good starting point. |
Hi, i am trying to adapt your delete file page to be an external share link page to photos in the gallery, but am also new to Django & was struggling to create a view for this using the same methods you have. if you have a second could explain your template method a little further? Or if i used the generic View what might the default template name be? Thanks so much for this project, it has been really useful. |
Hi,
This is not really an issue but more of a question. (I am kind of new to Django...) I can't find anywhere in your code where the template "picture_form.html" is loaded... I don't understand how it does it?!
Also, why do you need super() here?
Thanks a lot,
Antoine
The text was updated successfully, but these errors were encountered: