1pip install django-crispy-forms
2pip install easy-thumbnails
3pip install django-image-cropping
4pip install djangoajax
5
1url(r'^accounts/login/$', auth_views.login, name='login'),
2url(r'^logout/$', auth_views.logout, name='logout'),
3
1from easy_thumbnails.conf import Settings as thumbnail_settings
2THUMBNAIL_PROCESSORS = (
3 'image_cropping.thumbnail_processors.crop_corners',
4) + thumbnail_settings.THUMBNAIL_PROCESSORS
5
1# django-cruds-adminlte
2from cruds_adminlte.urls import crud_for_app
3urlpatterns += crud_for_app('testapp')
4
1INSTALLED_APPS = (
2 ...
3 'crispy_forms',
4 'django_select2',
5 'easy_thumbnails',
6 'image_cropping',
7 'django_ajax',
8 'cruds_adminlte'
9)
10
1TIME_FORMAT= 'h:i A'
2DATETIME_FORMAT='m/d/Y H:i:s'
3DATE_FORMAT="m/d/Y"
4
5TIME_INPUT_FORMATS = ['%I:%M %p']
6
1urlpatterns += crud_for_app('app_one', login_required=True,
2 check_perms=True, cruds_url='myadmin')
3urlpatterns += crud_for_app('app_two', login_required=False,
4 check_perms=True, cruds_url='myadmin')
5
6from testapp.forms import CustomerForm, InvoiceForm
7custom_forms = {
8 'add_customer': CustomerForm,
9 'update_customer': CustomerForm,
10 'add_invoice': InvoiceForm,
11 'update_invoice': InvoiceForm,
12}
13urlpatterns += crud_for_app('app_three', login_required=True,
14 check_perms=True, cruds_url='myadmin',
15 modelforms=custom_forms)
16
1pip install django-crispy-forms
2pip install django-select2
3pip install django-image-cropping
4pip install easy-thumbnails
5pip install djangoajax
6