django-generic-views
Accessing a context object in a Django class-based generic view
I\'m using a DetailView to view a Project object, and I would like to be able to access the Project object being viewed in order to pass it to a decorator, something like this:[详细]
2023-03-01 10:03 分类:问答Accessing request.user in class based generic view CreateView in order to set FK field in Django
So I have a m开发者_JS百科odel that includes: class Place(models.Model): .... created_by = models.ForeignKey(User)[详细]
2023-03-01 04:18 分类:问答Django - Generic Views - Object_list - What's the benefit?
I want to use the object_list generic view.But I can\'t tell what benefit it gives me besides pagination?It seems like I still need to write my own template?[详细]
2023-02-25 06:13 分类:问答How can I make a Generic Class Based Create View for a Model?
What I\'m trying to do is Django boilerplate for functional views. Any help here is very much appreciated, as the docs show examples for the template view and list view, but I\'ve found very little fo[详细]
2023-02-23 13:43 分类:问答date_based object_detail giving 404 in django
I\'m trying to use permalinks in Django using a fairly standard /<app>/<year>/<month>/<day>/<slug> model. However, I get 404s with no additional information[详细]
2023-02-13 11:54 分类:问答Django Year/Month archive page with generic views
Looking to make a generic view archive page by month and year. Like this: 2011 - January March 2010 - October December[详细]
2023-02-12 00:56 分类:问答Ajax views with django
I\'m working on a pretty big project right now where every view should be accessible via a normal request and an ajax request via the same url. I\'m looking for ideas on how to create a small framewor[详细]
2023-02-05 08:37 分类:问答How to pass the logged in user to direct_to_template?
I\'m using direct_to_template for a 开发者_StackOverflow社区url but I need the logged in user to display the page. How do I pass it to direct_to_template?If your TEMPLATE_CONTEXT_PROCESSORS variable i[详细]
2023-02-05 07:59 分类:问答django 'str' object is not callable
I have a problem creating an URL view in django. It gives me this error (ferrol is a Space object): TypeError at /spaces/ferrol/[详细]
2023-02-04 19:51 分类:问答Django Generic object_list pagination. Adding instead of replacing arguments
I\'m having some trouble with the django generic object_list function\'s pagination not really being \"smart\" enough to compensate my daftness.[详细]
2023-01-19 11:15 分类:问答