Giter Club home page Giter Club logo

Comments (4)

sigurdga avatar sigurdga commented on June 29, 2024

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.

super is needed to run the save-method on the superclass (models.Model is the superclass, and should be for all Django models).

from django-jquery-file-upload.

antoinebis avatar antoinebis commented on June 29, 2024

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?!

from django-jquery-file-upload.

sigurdga avatar sigurdga commented on June 29, 2024

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.

from django-jquery-file-upload.

chriscamplin avatar chriscamplin commented on June 29, 2024

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.

from django-jquery-file-upload.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.