#29136 closed Cleanup/optimization (invalid)
CreateView documentation incomplete
Reported by: | Linurandy | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 2.0 |
Severity: | Normal | Keywords: | CreateView, documentation |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In that url https://docs.djangoproject.com/es/1.10/topics/class-based-views/generic-editing/ and https://docs.djangoproject.com/es/2.0/topics/class-based-views/generic-editing/, when create the class AuthorCreate(CreateView):, don't have absolute_url, this brings as a problem confusion.
from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.urls import reverse_lazy from myapp.models import Author class AuthorCreate(CreateView): model = Author fields = ['name'] class AuthorUpdate(UpdateView): model = Author fields = ['name'] class AuthorDelete(DeleteView): model = Author success_url = reverse_lazy('author-list')
Note:
See TracTickets
for help on using tickets.
The
Author
model defined above the code block you quoted has aget_absolute_url()
method. Have I misunderstood the problem?