Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Copiando template admin/index.html do grappelli e configurando diretó…

…rio de templates para leitura apropriada
  • Loading branch information...
commit 075e432ee07b2f0f178accee84480912f8e76857 1 parent 642f89b
@diogobaeder authored
View
5 djangotranslationtest/settings.py
@@ -1,5 +1,9 @@
# Django settings for djangotranslationtest project.
+from unipath import Path
+
+
+PROJECT_DIR = Path(__file__).parent
DEBUG = True
TEMPLATE_DEBUG = DEBUG
@@ -111,6 +115,7 @@
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
+ PROJECT_DIR.child('templates'),
)
INSTALLED_APPS = (
View
89 djangotranslationtest/templates/admin/index.html
@@ -0,0 +1,89 @@
+{% extends "admin/base_site.html" %}
+
+<!-- LOADING -->
+{% load i18n grp_tags log %}
+
+<!-- JAVASCRIPTS -->
+{% block javascripts %}
+ {{ block.super }}
+{% endblock %}
+
+<!-- COLTYPE/BODYCLASS-- >
+{% block bodyclass %}dashboard{% endblock %}
+{% block content-class %}content-grid{% endblock %}
+
+<!-- BREADCRUMBS -->
+{% block breadcrumbs %}
+ <ul class="grp-horizontal-list">
+ <li>{% trans "Home" %}</li>
+ </ul>
+{% endblock %}
+{% block content_title %}
+ {% if title %}
+ <header><h1>{{ title }}</h1></header>
+ {% endif %}
+{% endblock %}
+
+<!-- CONTENT -->
+{% block content %}
+ <div class="g-d-c">
+ <div class="g-d-12 g-d-f">
+ {% for app in app_list %}
+ <div class="grp-module" id="app_{{ app.name|lower }}">
+ <h2><a href="{{ app.app_url }}" class="grp-section">{% trans app.name %}</a></h2>
+ {% for model in app.models %}
+ <div class="grp-row">
+ {% if model.admin_url %}
+ <a href="{{ model.admin_url }}"><strong>{{ model.name }}</strong></a>
+ {% else %}
+ <strong>{{ model.name }}</strong>
+ {% endif %}
+ {% if model.add_url or model.admin_url %}
+ <ul class="grp-actions">
+ {% if model.add_url %}
+ <li class="grp-add-link">
+ <a href="{{ model.add_url }}">{% trans "Add" %}</a>
+ </li>
+ {% endif %}
+ {% if model.admin_url %}
+ <li class="grp-change-link">
+ <a href="{{ model.admin_url }}">{% trans "Change" %}</a>
+ </li>
+ {% endif %}
+ </ul>
+ {% endif %}
+ </div>
+ {% endfor %}
+ </div>
+ {% empty %}
+ <p>{% trans "You don´t have permission to edit anything." %}</p>
+ {% endfor %}
+ </div>
+ <div class="g-d-6 g-d-l">
+ <div class="grp-module" id="grp-recent-actions-module">
+ <h2>{% trans 'Recent Actions' %}</h2>
+ <div class="grp-module">
+ <h3>{% trans 'My Actions' %}</h3>
+ {% get_admin_log 10 as admin_log for_user user %}
+ {% if not admin_log %}
+ <div class="grp-row"><p>{% trans 'None available' %}</p></div>
+ {% else %}
+ <ul class="grp-listing-small">
+ {% for entry in admin_log %}
+ <li class="grp-row{% if entry.is_addition %} grp-add-link{% endif %}{% if entry.is_change %} grp-change-link{% endif %}{% if entry.is_deletion %} grp-delete-link{% endif %}">
+ {% if entry.is_deletion %}
+ <span>{{ entry.object_repr }}</span>
+ {% else %}
+ <a href="{{ entry.get_admin_url }}">{{ entry.object_repr }}</a>
+ {% endif %}
+ <span class="grp-font-color-quiet">{% filter capfirst %}{% trans entry.content_type.name %}{% endfilter %}</span>
+ </li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ </div>
+ </div>
+ </div>
+ </div>
+{% endblock %}
+
Please sign in to comment.
Something went wrong with that request. Please try again.