Django base template tailored for management interfaces
Project description
=====
Gadjo
=====
Gadjo is a base template for Django applications, tailored for
management interfaces, built to provide a nice and modern look, while
using progressive enhancement and responsive designs to adapt to
different environments.
Usage
=====
Make your application base template {% extends "gadjo/base.html" %}.
You should add gadjo.finders.XStaticFinder to STATICFILES_FINDERS,
from django.conf import global_settings
STATICFILES_FINDERS = global_settings.STATICFILES_FINDERS + \
('gadjo.finders.XStaticFinder',)
There is a CDNS settings, that can contain a list of (cdn name, protocol)
tuples; for example:
CDNS = [('google', 'https')]
Additional static files
------------------------
Additional static files libraries can be added via INSTALLED_APPS,
for example 'xstatic.pkg.jquery_tablesorter'; its static files can
then be referred in a template using the xstatic template tag:
{% xstatic 'jquery_tablesorter' 'jquery.tablesorter.js' %}
Progressive enhancement -- Dialogs
----------------------------------
Links marked with rel="popup" will be opened into dialog boxes.
The dialog title is extracted from "#appbar h2" (this selector can be
changed with a @data-title-selector attribute on the anchor tag).
The dialog content is extracted from "form" (this selector can be
changed with a @data-selector attribute).
Buttons (both <button> and <a>) are extracted from the content and
converted into proper dialog buttons. A button with "cancel" as its
class will have its action changed to simply close the dialog, without
server processing.
After loading the dialog content, a gadjo:dialog-loaded event is
triggered on the anchor with the dialog content as argument.
Alternatively the server may notice the ajax request and answer with
an appropriate JSON response. In that case it should have a 'content'
attribute with the HTML content, or a 'location' attribute in case of
a redirect.
In case of such a redirect, a gadjo:dialog-done event is triggered on
the anchor and can be cancelled to prevent the default redirect
behaviour.
Licence
=======
Python, Javascript and CSS files are published under the GNU AFFERO GENERAL
PUBLIC LICENSE (see the COPYING file for the complete text).
gadjo/static/images/info-icon.png and icons/*.svg are derived work of icons
from gnome-icon-theme-symbolic, published under the Creative Commons
Attribution-Share Alike 3.0 United States License by the GNOME Project, see
http://www.gnome.org/.
gadjo/static/css/adwaita-lock.jpg is a derived work of adwaita-lock.jpg from
gnome-backgrounds, copyright © 2011 Jakub Steiner <jimmac@gmail.com>, and
licensed under Creative Commons Attribution-ShareAlike 3.0 License.
Gadjo
=====
Gadjo is a base template for Django applications, tailored for
management interfaces, built to provide a nice and modern look, while
using progressive enhancement and responsive designs to adapt to
different environments.
Usage
=====
Make your application base template {% extends "gadjo/base.html" %}.
You should add gadjo.finders.XStaticFinder to STATICFILES_FINDERS,
from django.conf import global_settings
STATICFILES_FINDERS = global_settings.STATICFILES_FINDERS + \
('gadjo.finders.XStaticFinder',)
There is a CDNS settings, that can contain a list of (cdn name, protocol)
tuples; for example:
CDNS = [('google', 'https')]
Additional static files
------------------------
Additional static files libraries can be added via INSTALLED_APPS,
for example 'xstatic.pkg.jquery_tablesorter'; its static files can
then be referred in a template using the xstatic template tag:
{% xstatic 'jquery_tablesorter' 'jquery.tablesorter.js' %}
Progressive enhancement -- Dialogs
----------------------------------
Links marked with rel="popup" will be opened into dialog boxes.
The dialog title is extracted from "#appbar h2" (this selector can be
changed with a @data-title-selector attribute on the anchor tag).
The dialog content is extracted from "form" (this selector can be
changed with a @data-selector attribute).
Buttons (both <button> and <a>) are extracted from the content and
converted into proper dialog buttons. A button with "cancel" as its
class will have its action changed to simply close the dialog, without
server processing.
After loading the dialog content, a gadjo:dialog-loaded event is
triggered on the anchor with the dialog content as argument.
Alternatively the server may notice the ajax request and answer with
an appropriate JSON response. In that case it should have a 'content'
attribute with the HTML content, or a 'location' attribute in case of
a redirect.
In case of such a redirect, a gadjo:dialog-done event is triggered on
the anchor and can be cancelled to prevent the default redirect
behaviour.
Licence
=======
Python, Javascript and CSS files are published under the GNU AFFERO GENERAL
PUBLIC LICENSE (see the COPYING file for the complete text).
gadjo/static/images/info-icon.png and icons/*.svg are derived work of icons
from gnome-icon-theme-symbolic, published under the Creative Commons
Attribution-Share Alike 3.0 United States License by the GNOME Project, see
http://www.gnome.org/.
gadjo/static/css/adwaita-lock.jpg is a derived work of adwaita-lock.jpg from
gnome-backgrounds, copyright © 2011 Jakub Steiner <jimmac@gmail.com>, and
licensed under Creative Commons Attribution-ShareAlike 3.0 License.
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
gadjo-0.17.tar.gz
(325.2 kB
view details)
File details
Details for the file gadjo-0.17.tar.gz
.
File metadata
- Download URL: gadjo-0.17.tar.gz
- Upload date:
- Size: 325.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec42d3e33db0f10e7c44d7524a81b322c4d174d45ac303e25fec0a1142baa9d7 |
|
MD5 | 69e96fb127e7cbcb2e082412d93fe498 |
|
BLAKE2b-256 | c4efbfc90a29005177276face6393872400eec0682900cbd50a2799f38748977 |