Top "Django-class-based-views" questions

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

How to unit test methods inside django's class based views?

I need to test the methods and helper function inside a django Class Based View. Consider this Class Based View: …

python django unit-testing django-class-based-views
Django Class-Based Generic Views and Authentication

I am pretty new to Django (starting with 1.3). In building an app, I went with the new class-based generic views …

django django-class-based-views django-1.3
Passing Parameters to Django CreateView

I am trying to implement an appointment-making application where users can create sessions that are associated with pre-existing classes. What …

django django-views django-class-based-views
Django - Filtering in DetailView

I had a function based view that looked like this: def account_details(request, acc_id): account = get_object_or_404(…

python django django-views django-class-based-views
Django CreateView gives an error "needs to have a value for field "..." before this many-to-many relationship can be used."

I'm practicing with Django's FormViews. In this app, I'm creating a PostCreate view that creates a blog post. Here are …

python django django-class-based-views
How should template names be set dynamically using class based views?

I've searched through the ref and topics of the class based views Django documentation(Django 1.4) but I haven't found any …

django django-class-based-views
Django: DetailView implementing a get_queryset()

I'm getting this following error: ImproperlyConfigured at /elearning/7447932a-6044-498a-b902-97cbdd0a4001/ DetailView is missing a QuerySet. Define …

django django-class-based-views django-1.11
success_message in DeleteView not shown

I have a DeleteView: class LectureDelete(SuccessMessageMixin, DeleteView): model = Lecture success_message = "Die Veranstaltung wurde gelöscht" success_url = '/…

django django-class-based-views
Django: Accessing request in forms.py clean function

Hi Stackoverflow people, In my clean function in forms.py, I would like to save automatically some information in a …

django django-forms request django-class-based-views