mirror of https://github.com/interlegis/sapl.git
Marcio Mazza
9 years ago
22 changed files with 176 additions and 161 deletions
@ -1,7 +1,7 @@ |
|||
from django.conf.urls import include, url |
|||
|
|||
from .views import country_crud |
|||
from .views import CountryCrud |
|||
|
|||
urlpatterns = [ |
|||
url(r'^countries/', include(country_crud.urls)), |
|||
url(r'^countries/', include(CountryCrud.get_urls())), |
|||
] |
|||
|
@ -1,13 +1,11 @@ |
|||
from crud.base import Crud, ListMixin |
|||
from crud.base import Crud, CrudListView |
|||
|
|||
from .models import Country |
|||
|
|||
|
|||
class CountryListMixin(ListMixin): |
|||
paginate_by = 10 |
|||
class CountryCrud(Crud): |
|||
model = Country |
|||
help_path = 'help_path', |
|||
|
|||
|
|||
country_crud = Crud( |
|||
Country, |
|||
'help_path', |
|||
list_mixin=CountryListMixin) |
|||
class ListView(CrudListView): |
|||
paginate_by = 10 |
|||
|
Loading…
Reference in new issue