Top "Django-generic-views" questions

Questions about Django’s built-in generic views, which helps you to avoid repeating common code patterns in every project.

how to send success message if we use django generic views

I am new to django (1.2.4). I have created some crud with generic views. But How can I show something like "…

python django django-generic-views
Django/python: 'function' object has no attribute 'as_view'

I am trying to create a list_view for a model queryset. When running my server, it returns : attribute error …

django django-views django-urls django-generic-views
override create method in django rest generics CreateAPIView

My views.py of django app is as below, class MemberCreate(generics.CreateAPIView): queryset = members.objects.all() serializer_class = MemberSerializer …

python django django-rest-framework django-generic-views
'Role' object has no attribute '__name__'

I am trying to implement role based permission into my application. I have a decorator role_required into which I …

python django django-views django-generic-views
Manually calling a class based generic view

I'm currently trying to call a class based Generic view from within another class based generic view and cant seem …

python django django-generic-views
How do I set initial data on a Django class based generic createview with request data

I used Django's generic createview for my model from myproject.app.forms import PersonForm class PersonMixin(object): model = Person form_…

django django-forms django-generic-views django-class-based-views
Django Generic Views: When to use ListView vs. DetailView

I am using Django's class based generic views in a blog application. One of my views displays a list of …

python django django-views django-generic-views
Python multiple inheritance function overriding and ListView in django

I created a class that subclasses ListView and two custom mixins which have implemented a get_context_data function. I …

python django listview multiple-inheritance 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 …

django django-generic-views django-class-based-views
How to add extra context & queryset field in Django generic views?

I'm building Django application, with submitting links and voting functionality. I want to show all links, voted by a user …

django django-views django-queryset django-generic-views django-context