django-class-based-views
Overriding get_queryset() in a Django DetailView
I have two models, City and State with State being a ForeignKey relation of City.My CityDetailView url is constructed as:[详细]
2023-03-14 02:17 分类:问答Multiple form classes in django generic (class) views
I\'d like to use the class based generic views of django 1.3 for forms, but sometimes have to manage multiple form classes in one form. However, it looks like the existing views based on FormMixin ass[详细]
2023-03-11 00:31 分类:问答Django - Class Based Generic View - "No URL to redirect to"
I\'m using the generic CreateView like: #urls.py from django.conf.urls.defaults import * from django.views.generic import CreateView[详细]
2023-03-10 19:42 分类:问答Updating User model in Django with class based UpdateView
I am trying to update the Django User model with the class based UpdateView that automatically renders with the current user but am getting an error that a pk or slug is required. The form work and re[详细]
2023-03-09 20:23 分类:问答Django: return several views from a single URL without redirection
With function based Django view it was simple to switch between several different views based on a condition, e.g. something like:[详细]
2023-03-08 01:10 分类:问答How to use permission_required decorators on django class-based views
I\'m having a bit of trouble understanding how the new CBVs work. My question is this, I need to require login in all the views, and in some of them, specific permissions. In function-based views I do[详细]
2023-03-07 00:54 分类:问答How to do a DetailView in django 1.3?
I\'m currently learning how to use the class-based views in django 1.3. I\'m trying to update an application to use them, but I still don\'t uderstand very well how they work (and I read the entire cl[详细]
2023-03-05 20:10 分类:问答What is context_object_name in django views?
I\'m new to django. And now I\'m studying using the class-based generic views. Could someone plea开发者_运维技巧se explain the aim and use of context_object_name attribute?If you do not provide \"cont[详细]
2023-03-05 12:20 分类:问答Can't make class-based RedirectView work
I\'m currently trying to migrate my function based views for the new django 1.3 class-based views. To start, I changed a simple RedirectView I had, but I cant get it to work, even worst, I can\'t unde[详细]
2023-03-05 10:38 分类:问答Registration/authorization form with class-based generic views in django
C开发者_Go百科ould someone please help with reg/auth/auth using class-based generic views? It is clear how to do this with function-based views, but not with classes. Cannot understand the philosophy[详细]
2023-03-05 09:08 分类:问答