Django wit Tabler template
Project description
django-tabler-ng
Django with Tabler template.
This project transforms the Tabler dashboard into a Django package. It provides an extensible base template, error page templates, and the necessary static assets. django-tabler-ng is based on the
- Tabler release v1.0.0-beta12
- Django release 3.2 LTS
- Python relase 3.9
Installation
pip install django-tabler-ng- Add
django_tabler_ngto yourINSTALLED_APPS
Usage
Once installed, templates inside your application can extend django-tabler-ng's base template. A quick example:
{% extends "django_tabler_ng/base.html" %}
{% block extra_css %}
{# add your custom css here #}
{% endblock extra_css %}
{% block content %}
<h1>This is a Heading</h1>
<p>This is a paragraph</p>
<p>{{ some_context_variable }}</p>
{% endblock content %}
{% block extra_js %}
<script>
{# add your custom javascript here #}
</script
{% endblock extra_js %}
Need some inspiration? Check out the templates provided by the original project.
Missing a title in the browser window?
django-tabler-ng's base template adds your site's name to the browser's titlebar using Django's Sites framework. Follow these steps for setup:
- Add a
SITE_IDvalue to your application's settings file - Add
'django.contrib.sites'toINSTALLED_APPS - Add
'django.contrib.sites.middleware.CurrentSiteMiddleware'toMIDDLE_WARE - Run
python manage.py migrateif necessary - Inside your application's
django_sitedatabase table, update the record that cooresponds to theSITE_IDvalue with an appropriate name and domain. A custom migration might be helpful.
Missing a favicon?
To load a favicon, create an img/ folder inside your application's static directory.
Place favicon.ico inside, and the icon will be loaded by the base template.
Custom error views
django-tabler-ng overrides Django's default error views
by rendering a custom error template. Your application can access these by
adding the following to your applications' urls.py file:
handler400 = 'django_tabler_ng.views.error400'
handler403 = 'django_tabler_ng.views.error403'
handler404 = 'django_tabler_ng.views.error404'
handler500 = 'django_tabler_ng.views.error500'
Inspiration from @rbennett91/django-tabler.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django-tabler-ng-0.0.3.tar.gz.
File metadata
- Download URL: django-tabler-ng-0.0.3.tar.gz
- Upload date:
- Size: 6.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4e83462aeb77a06d7e59af0754cfbace1a975dd11c585e544e525d06065d9df
|
|
| MD5 |
4d15fe1e0206e6d96fd7df2b637ee274
|
|
| BLAKE2b-256 |
c833548e22bb7a6cb9f217d8d41f3be73155ead9c464f5358c29c967f627bf65
|
File details
Details for the file django_tabler_ng-0.0.3-py3-none-any.whl.
File metadata
- Download URL: django_tabler_ng-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2478e443393a9d6598458bc512c6f825ae3e69dcc9dff2b111baa57bc2a8355
|
|
| MD5 |
2ebf8e11abb08dd2719112f582f5744f
|
|
| BLAKE2b-256 |
fa168b4bf8942d0fc7738fd15f52e5041d4fa42a88adf5e567f62ff7f1cf7070
|