Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add templaes to package #261

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ include VERSION
recursive-include docs *
recursive-include examples *
recursive-include dts_test_project *
recursive-include django_tenants/templates *.html

# exclude all bytecode
global-exclude *.pyo
Expand Down
18 changes: 16 additions & 2 deletions django_tenants/templates/admin/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
{% extends "admin/index.html" %}
{% load i18n admin_static tenant %}


{% block extrastyle %}
{{ block.super }}
<style>
.module caption.tenant-app {
background: #008000;
}
.module caption.public-disabled {
background: #c6c6c6;
}
</style>

{% endblock %}

{% block content %}
<div id="content-main">
{% if app_list %}
Expand All @@ -12,15 +26,15 @@
<table id="change-history">
{% if is_public_schema and not is_shared_app %}
<div class="module">
<caption {% if is_tenant_app %}style="background-color:#c6c6c6"{% endif %}>
<caption {% if is_tenant_app %}class="public-disabled"{% endif %}>
<div class="section" title="{% blocktrans with name=app.name %}Models in the {{ name }} application{% endblocktrans %}">{{ app.name }}</div>
<tr>
<td scope="row">{% trans "Not available for global schema" %}</td>
</tr>
</caption>
</div>
{% else %}
<caption {% if not is_public_schema and is_tenant_app %}style="background-color:#008000"{% endif %} >
<caption {% if not is_public_schema and is_tenant_app %}class="tenant-app"{% endif %} >
<a href="{{ app.app_url }}" class="section" title="{% blocktrans with name=app.name %}Models in the {{ name }} application{% endblocktrans %}">{{ app.name }}</a>
</caption>
{% for model in app.models %}
Expand Down