-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed Wishlist, DateFields and Fields
- Loading branch information
brian
committed
Sep 22, 2015
1 parent
a52023f
commit c762313
Showing
10 changed files
with
19 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,37 @@ | ||
from django.views.generic import ListView | ||
from django.views.generic.detail import DetailView | ||
from django.views.generic.edit import CreateView, UpdateView, DeleteView | ||
from django.forms.models import modelform_factory | ||
|
||
from django.core.urlresolvers import reverse_lazy | ||
|
||
from scrumtools.apps.wishlist.models import Wish | ||
|
||
class WishList(ListView): | ||
model = Wish | ||
fields = ['name', 'description'] | ||
paginate_by = 10 | ||
|
||
class WishCreate(CreateView): | ||
model = Wish | ||
form_class = modelform_factory(Wish) | ||
fields = ['name', 'description'] | ||
success_url = reverse_lazy('wishlist:wish-list') | ||
template_name = 'wishlist/form.html' | ||
|
||
|
||
class WishUpdate(UpdateView): | ||
model = Wish | ||
form_class = modelform_factory(Wish) | ||
fields = ['name', 'description'] | ||
success_url = reverse_lazy('wishlist:wish-list') | ||
template_name = 'wishlist/form.html' | ||
|
||
|
||
class WishDelete(DeleteView): | ||
model = Wish | ||
fields = ['name', 'description'] | ||
success_url = reverse_lazy('wishlist:wish-list') | ||
template_name = 'wishlist/confirm_delete.html' | ||
|
||
|
||
class WishDetail(DetailView): | ||
model = Wish | ||
#fields = ['name', 'description'] |