Tutorial for very quick start with
Standard Django installation¶
Example project code available here.
Installation and configuration¶
Install the package in your environment¶
pip install django-dash
dash core and the plugins to the
INSTALLED_APPS of the your
Androidlayout is the default layout. If you have chosen a different layout, update the value of
In dash users can choose which layout (from the list of available ones) do they want to use as a default. All available layouts shall be listed in settings as well.
The plugins. Plugins are like blocks. You are recommended to have them all installed. Note, that the following plugins do not have additional dependencies, while some others (like news would require additional packages to be installed. If so, make sure to have installed and configured those dependencies prior adding the dependant add-ons to the settings module.
'dash.contrib.plugins.dummy', 'easy_thumbnails', # Required by `image` plugin 'dash.contrib.plugins.image', 'dash.contrib.plugins.memo', 'dash.contrib.plugins.rss_feed', 'dash.contrib.plugins.url', 'dash.contrib.plugins.video', 'dash.contrib.plugins.weather',
Putting all together, you would have something like this.
INSTALLED_APPS = ( # ... # Core 'dash', # Layouts 'dash.contrib.layouts.android', 'dash.contrib.layouts.bootstrap2', 'dash.contrib.layouts.windows8', # Form field plugins 'dash.contrib.plugins.dummy', 'easy_thumbnails', # Required by `image` plugin 'dash.contrib.plugins.image', 'dash.contrib.plugins.memo', 'dash.contrib.plugins.rss_feed', 'dash.contrib.plugins.url', 'dash.contrib.plugins.video', 'dash.contrib.plugins.weather', # ... )
Template context processors¶
TEMPLATES["OPTIONS"]["context_processors"] of your
Add the following line to
urlpatterns of your
urlpatterns = [ # ... # django-dash URLs: re_path(r'^dashboard/', include('dash.urls')), # django-dash RSS contrib plugin URLs: re_path(r'^dash/contrib/plugins/rss-feed/', include('dash.contrib.plugins.rss_feed.urls')), # django-dash News contrib plugin URLs: #re_path(r'^news/', include('news.urls')), # django-dash public dashboards contrib app: re_path(r'^dash/public/', include('dash.contrib.apps.public_dashboard.urls')), # Admin URLs re_path(r'^admin/', admin.site.urls), # ... ]
Update the database¶
First you should be syncing/migrating the database. Depending on your Django version and migration app, this step may vary. Typically as follows:
dashplugins. Go to terminal and type the following command.
Specify the active layout¶
Specify the active/default layout in your
DASH_ACTIVE_LAYOUT = 'android'
dash has been built with permissions in mind. Every single plugin
is permission based. If user hasn’t been given permission to work with a
plugin, he won’t be. If you want to switch the permission checks off, set the
DASH_RESTRICT_PLUGIN_ACCESS to False in your
DASH_RESTRICT_PLUGIN_ACCESS = False
Otherwise, after having completed all the steps above, do log into the Django administration and assign the permissions (to certain user or a group) for every single form element or form handler plugin. Bulk assignments work as well.
Also, make sure to have the Django model permissions set for following models: