Top "Django-class-based-views" questions

Django Class-based Views are Django views that are represented as classes.

Django: Can class-based views accept two forms at a time?

If I have two forms: class ContactForm(forms.Form): name = forms.CharField() message = forms.CharField(widget=forms.Textarea) class SocialForm(…

django django-class-based-views django-1.5
django class-based views with inline model-form or formset

I have the following models: class Bill(models.Model): date = models.DateTimeField(_("Date of bill"),null=True,blank=True) class …

django inline-formset django-class-based-views
How do you use get_context_data with TemplateView in Django

I'm trying to do something like this: class AboutView(TemplateView): template_name = 'about.html' def get_context_data(self, **kwargs): …

django django-templates django-views django-class-based-views
How can I get 'pk' or 'id' in `get_context_data` from CBV?

How can I get 'pk' or 'id' in get_context_data from CBV DetailView? class MyDetail(DetailView): model = Book template_…

django django-class-based-views
Updating context data in FormView form_valid method?

I have a class QuestionView which is derived from the FormView class. Here is a code snippet to explain my …

python django django-class-based-views
Django combine DetailView and FormView

I have a view where I need to display information about a certain model instance hence I use a DetailView. …

django django-class-based-views
Passing Pk or Slug to Generic DetailView in Django?

I am new to Django Class based views. I am trying to make a simple view to get details of …

python django django-class-based-views
Django: model object "has no attribute '_meta'" in class based view

Hi Stackoverflow people, I am working with class based views and for a test site, I followed the documentation to …

python django meta django-class-based-views class-based-views
Django apps using class-based views and ajax?

I'm learning Django and I found class-based views and I wonder how to implement Ajax on those views. I searched …

ajax django django-class-based-views
django createview how to get the object that is created

i've two concatenated form. Basically user fills in the first form and then is redirected to the second one which …

django django-class-based-views create-view