\n"
13 | "Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/xadmin/language/ru_RU/)\n"
14 | "MIME-Version: 1.0\n"
15 | "Content-Type: text/plain; charset=UTF-8\n"
16 | "Content-Transfer-Encoding: 8bit\n"
17 | "Language: ru_RU\n"
18 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
19 |
20 | #: static/xadmin/js/xadmin.plugin.actions.js:20
21 | msgid "%(sel)s of %(cnt)s selected"
22 | msgid_plural "%(sel)s of %(cnt)s selected"
23 | msgstr[0] ""
24 | msgstr[1] ""
25 | msgstr[2] ""
26 |
27 | #: static/xadmin/js/xadmin.plugin.revision.js:25
28 | msgid "New Item"
29 | msgstr ""
30 |
31 | #: static/xadmin/js/xadmin.widget.datetime.js:32
32 | msgid "Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday"
33 | msgstr ""
34 |
35 | #: static/xadmin/js/xadmin.widget.datetime.js:33
36 | msgid "Sun Mon Tue Wed Thu Fri Sat Sun"
37 | msgstr ""
38 |
39 | #: static/xadmin/js/xadmin.widget.datetime.js:34
40 | msgid "Su Mo Tu We Th Fr Sa Su"
41 | msgstr ""
42 |
43 | #: static/xadmin/js/xadmin.widget.datetime.js:35
44 | msgid ""
45 | "January February March April May June July August September October November"
46 | " December"
47 | msgstr ""
48 |
49 | #: static/xadmin/js/xadmin.widget.datetime.js:36
50 | msgid "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec"
51 | msgstr ""
52 |
53 | #: static/xadmin/js/xadmin.widget.datetime.js:37
54 | msgid "Today"
55 | msgstr ""
56 |
57 | #: static/xadmin/js/xadmin.widget.datetime.js:38
58 | msgid "%a %d %b %Y %T %Z"
59 | msgstr ""
60 |
61 | #: static/xadmin/js/xadmin.widget.datetime.js:39
62 | msgid "AM PM"
63 | msgstr ""
64 |
65 | #: static/xadmin/js/xadmin.widget.datetime.js:40
66 | msgid "am pm"
67 | msgstr ""
68 |
69 | #: static/xadmin/js/xadmin.widget.datetime.js:43
70 | msgid "%T"
71 | msgstr ""
72 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/locale/zh_Hans/LC_MESSAGES/django.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/extra_apps/xadmin/locale/zh_Hans/LC_MESSAGES/django.mo
--------------------------------------------------------------------------------
/extra_apps/xadmin/locale/zh_Hans/LC_MESSAGES/djangojs.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/extra_apps/xadmin/locale/zh_Hans/LC_MESSAGES/djangojs.mo
--------------------------------------------------------------------------------
/extra_apps/xadmin/migrations/0002_log.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by Django 1.9.7 on 2016-07-15 05:50
3 | from __future__ import unicode_literals
4 |
5 | from django.conf import settings
6 | from django.db import migrations, models
7 | import django.db.models.deletion
8 | import django.utils.timezone
9 |
10 |
11 | class Migration(migrations.Migration):
12 |
13 | dependencies = [
14 | ('contenttypes', '0002_remove_content_type_name'),
15 | migrations.swappable_dependency(settings.AUTH_USER_MODEL),
16 | ('xadmin', '0001_initial'),
17 | ]
18 |
19 | operations = [
20 | migrations.CreateModel(
21 | name='Log',
22 | fields=[
23 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
24 | ('action_time', models.DateTimeField(default=django.utils.timezone.now, editable=False, verbose_name='action time')),
25 | ('ip_addr', models.GenericIPAddressField(blank=True, null=True, verbose_name='action ip')),
26 | ('object_id', models.TextField(blank=True, null=True, verbose_name='object id')),
27 | ('object_repr', models.CharField(max_length=200, verbose_name='object repr')),
28 | ('action_flag', models.PositiveSmallIntegerField(verbose_name='action flag')),
29 | ('message', models.TextField(blank=True, verbose_name='change message')),
30 | ('content_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='contenttypes.ContentType', verbose_name='content type')),
31 | ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='user')),
32 | ],
33 | options={
34 | 'ordering': ('-action_time',),
35 | 'verbose_name': 'log entry',
36 | 'verbose_name_plural': 'log entries',
37 | },
38 | ),
39 | ]
40 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/migrations/0003_auto_20160715_0100.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by Django 1.9.7 on 2016-07-15 06:00
3 | from __future__ import unicode_literals
4 |
5 | from django.db import migrations, models
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('xadmin', '0002_log'),
12 | ]
13 |
14 | operations = [
15 | migrations.AlterField(
16 | model_name='log',
17 | name='action_flag',
18 | field=models.CharField(max_length=32, verbose_name='action flag'),
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/extra_apps/xadmin/migrations/__init__.py
--------------------------------------------------------------------------------
/extra_apps/xadmin/plugins/__init__.py:
--------------------------------------------------------------------------------
1 |
2 | PLUGINS = (
3 | 'actions',
4 | 'filters',
5 | 'bookmark',
6 | 'export',
7 | 'layout',
8 | 'refresh',
9 | 'details',
10 | 'editable',
11 | 'relate',
12 | 'chart',
13 | 'ajax',
14 | 'relfield',
15 | 'inline',
16 | 'topnav',
17 | 'portal',
18 | 'quickform',
19 | 'wizard',
20 | 'images',
21 | 'auth',
22 | 'multiselect',
23 | 'themes',
24 | 'aggregation',
25 | 'mobile',
26 | 'passwords',
27 | 'sitemenu',
28 | 'language',
29 | 'quickfilter',
30 | 'sortablelist',
31 | 'importexport',
32 | 'ueditor'
33 | )
34 |
35 |
36 | def register_builtin_plugins(site):
37 | from importlib import import_module
38 | from django.conf import settings
39 |
40 | exclude_plugins = getattr(settings, 'XADMIN_EXCLUDE_PLUGINS', [])
41 |
42 | [import_module('xadmin.plugins.%s' % plugin) for plugin in PLUGINS if plugin not in exclude_plugins]
43 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/plugins/aggregation.py:
--------------------------------------------------------------------------------
1 | from django.db.models import FieldDoesNotExist, Avg, Max, Min, Count, Sum
2 | from django.utils.translation import ugettext as _
3 |
4 | from xadmin.sites import site
5 | from xadmin.views import BaseAdminPlugin, ListAdminView
6 |
7 | from xadmin.views.list import ResultRow, ResultItem
8 | from xadmin.util import display_for_field
9 |
10 | AGGREGATE_METHODS = {
11 | 'min': Min, 'max': Max, 'avg': Avg, 'sum': Sum, 'count': Count
12 | }
13 | AGGREGATE_TITLE = {
14 | 'min': _('Min'), 'max': _('Max'), 'avg': _('Avg'), 'sum': _('Sum'), 'count': _('Count')
15 | }
16 |
17 |
18 | class AggregationPlugin(BaseAdminPlugin):
19 |
20 | aggregate_fields = {}
21 |
22 | def init_request(self, *args, **kwargs):
23 | return bool(self.aggregate_fields)
24 |
25 | def _get_field_aggregate(self, field_name, obj, row):
26 | item = ResultItem(field_name, row)
27 | item.classes = ['aggregate', ]
28 | if field_name not in self.aggregate_fields:
29 | item.text = ""
30 | else:
31 | try:
32 | f = self.opts.get_field(field_name)
33 | agg_method = self.aggregate_fields[field_name]
34 | key = '%s__%s' % (field_name, agg_method)
35 | if key not in obj:
36 | item.text = ""
37 | else:
38 | item.text = display_for_field(obj[key], f)
39 | item.wraps.append('%%s%s ' % AGGREGATE_TITLE[agg_method])
40 | item.classes.append(agg_method)
41 | except FieldDoesNotExist:
42 | item.text = ""
43 |
44 | return item
45 |
46 | def _get_aggregate_row(self):
47 | queryset = self.admin_view.list_queryset._clone()
48 | obj = queryset.aggregate(*[AGGREGATE_METHODS[method](field_name) for field_name, method in
49 | self.aggregate_fields.items() if method in AGGREGATE_METHODS])
50 |
51 | row = ResultRow()
52 | row['is_display_first'] = False
53 | row.cells = [self._get_field_aggregate(field_name, obj, row) for field_name in self.admin_view.list_display]
54 | row.css_class = 'info aggregate'
55 | return row
56 |
57 | def results(self, rows):
58 | if rows:
59 | rows.append(self._get_aggregate_row())
60 | return rows
61 |
62 | # Media
63 | def get_media(self, media):
64 | media.add_css({'screen': [self.static(
65 | 'xadmin/css/xadmin.plugin.aggregation.css'), ]})
66 | return media
67 |
68 |
69 | site.register_plugin(AggregationPlugin, ListAdminView)
70 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/plugins/language.py:
--------------------------------------------------------------------------------
1 |
2 | from django.conf import settings
3 | from django.template import loader
4 | from django.views.i18n import set_language
5 | from xadmin.plugins.utils import get_context_dict
6 | from xadmin.sites import site
7 | from xadmin.views import BaseAdminPlugin, CommAdminView, BaseAdminView
8 |
9 |
10 | class SetLangNavPlugin(BaseAdminPlugin):
11 |
12 | def block_top_navmenu(self, context, nodes):
13 | context = get_context_dict(context)
14 | context['redirect_to'] = self.request.get_full_path()
15 | nodes.append(loader.render_to_string('xadmin/blocks/comm.top.setlang.html', context=context))
16 |
17 | class SetLangView(BaseAdminView):
18 |
19 | def post(self, request, *args, **kwargs):
20 | if 'nav_menu' in request.session:
21 | del request.session['nav_menu']
22 | return set_language(request)
23 |
24 | if settings.LANGUAGES and 'django.middleware.locale.LocaleMiddleware' in settings.MIDDLEWARE_CLASSES:
25 | site.register_plugin(SetLangNavPlugin, CommAdminView)
26 | site.register_view(r'^i18n/setlang/$', SetLangView, 'set_language')
27 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/plugins/mobile.py:
--------------------------------------------------------------------------------
1 | #coding:utf-8
2 | from xadmin.sites import site
3 | from xadmin.views import BaseAdminPlugin, CommAdminView
4 |
5 |
6 | class MobilePlugin(BaseAdminPlugin):
7 |
8 | def _test_mobile(self):
9 | try:
10 | return self.request.META['HTTP_USER_AGENT'].find('Android') >= 0 or \
11 | self.request.META['HTTP_USER_AGENT'].find('iPhone') >= 0
12 | except Exception:
13 | return False
14 |
15 | def init_request(self, *args, **kwargs):
16 | return self._test_mobile()
17 |
18 | def get_context(self, context):
19 | #context['base_template'] = 'xadmin/base_mobile.html'
20 | context['is_mob'] = True
21 | return context
22 |
23 | # Media
24 | # def get_media(self, media):
25 | # return media + self.vendor('xadmin.mobile.css', )
26 |
27 | def block_extrahead(self, context, nodes):
28 | nodes.append('')
29 |
30 | site.register_plugin(MobilePlugin, CommAdminView)
31 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/plugins/refresh.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 | from django.template import loader
3 |
4 | from xadmin.plugins.utils import get_context_dict
5 | from xadmin.sites import site
6 | from xadmin.views import BaseAdminPlugin, ListAdminView
7 |
8 | REFRESH_VAR = '_refresh'
9 |
10 |
11 | class RefreshPlugin(BaseAdminPlugin):
12 |
13 | refresh_times = []
14 |
15 | # Media
16 | def get_media(self, media):
17 | if self.refresh_times and self.request.GET.get(REFRESH_VAR):
18 | media = media + self.vendor('xadmin.plugin.refresh.js')
19 | return media
20 |
21 | # Block Views
22 | def block_top_toolbar(self, context, nodes):
23 | if self.refresh_times:
24 | current_refresh = self.request.GET.get(REFRESH_VAR)
25 | context.update({
26 | 'has_refresh': bool(current_refresh),
27 | 'clean_refresh_url': self.admin_view.get_query_string(remove=(REFRESH_VAR,)),
28 | 'current_refresh': current_refresh,
29 | 'refresh_times': [{
30 | 'time': r,
31 | 'url': self.admin_view.get_query_string({REFRESH_VAR: r}),
32 | 'selected': str(r) == current_refresh,
33 | } for r in self.refresh_times],
34 | })
35 | nodes.append(loader.render_to_string('xadmin/blocks/model_list.top_toolbar.refresh.html',
36 | get_context_dict(context)))
37 |
38 |
39 | site.register_plugin(RefreshPlugin, ListAdminView)
40 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/plugins/sitemenu.py:
--------------------------------------------------------------------------------
1 |
2 | from xadmin.sites import site
3 | from xadmin.views import BaseAdminPlugin, CommAdminView
4 |
5 | BUILDIN_STYLES = {
6 | 'default': 'xadmin/includes/sitemenu_default.html',
7 | 'accordion': 'xadmin/includes/sitemenu_accordion.html',
8 | }
9 |
10 |
11 | class SiteMenuStylePlugin(BaseAdminPlugin):
12 |
13 | menu_style = None
14 |
15 | def init_request(self, *args, **kwargs):
16 | return bool(self.menu_style) and self.menu_style in BUILDIN_STYLES
17 |
18 | def get_context(self, context):
19 | context['menu_template'] = BUILDIN_STYLES[self.menu_style]
20 | return context
21 |
22 | site.register_plugin(SiteMenuStylePlugin, CommAdminView)
23 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/plugins/ueditor.py:
--------------------------------------------------------------------------------
1 | import xadmin
2 | from xadmin.views import BaseAdminPlugin, CreateAdminView, ModelFormAdminView, UpdateAdminView
3 | from DjangoUeditor.models import UEditorField
4 | from DjangoUeditor.widgets import UEditorWidget
5 | from django.conf import settings
6 |
7 |
8 | class XadminUEditorWidget(UEditorWidget):
9 | def __init__(self, **kwargs):
10 | self.ueditor_options = kwargs
11 | self.Media.js = None
12 | super(XadminUEditorWidget, self).__init__(kwargs)
13 |
14 |
15 | class UeditorPlugin(BaseAdminPlugin):
16 |
17 | def get_field_style(self, attrs, db_field, style, **kwargs):
18 | if style == 'ueditor':
19 | if isinstance(db_field, UEditorField):
20 | widget = db_field.formfield().widget
21 | param = {}
22 | param.update(widget.ueditor_settings)
23 | param.update(widget.attrs)
24 | return {'widget': XadminUEditorWidget(**param)}
25 | return attrs
26 |
27 | def block_extrahead(self, context, nodes):
28 | js = '' % (
29 | settings.STATIC_URL + "ueditor/ueditor.config.js") # 自己的静态目录
30 | js += '' % (
31 | settings.STATIC_URL + "ueditor/ueditor.all.min.js") # 自己的静态目录
32 | nodes.append(js)
33 |
34 |
35 | xadmin.site.register_plugin(UeditorPlugin, UpdateAdminView)
36 | xadmin.site.register_plugin(UeditorPlugin, CreateAdminView)
--------------------------------------------------------------------------------
/extra_apps/xadmin/plugins/utils.py:
--------------------------------------------------------------------------------
1 | from django.template.context import RequestContext
2 |
3 |
4 | def get_context_dict(context):
5 | """
6 | Contexts in django version 1.9+ must be dictionaries. As xadmin has a legacy with older versions of django,
7 | the function helps the transition by converting the [RequestContext] object to the dictionary when necessary.
8 | :param context: RequestContext
9 | :return: dict
10 | """
11 | if isinstance(context, RequestContext):
12 | ctx = context.flatten()
13 | else:
14 | ctx = context
15 | return ctx
16 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/404.html:
--------------------------------------------------------------------------------
1 | {% extends base_template %}
2 | {% load i18n %}
3 |
4 | {% block title %}{% trans 'Page not found' %}{% endblock %}
5 |
6 | {% block content %}
7 |
8 | {% trans 'Page not found' %}
9 |
10 | {% trans "We're sorry, but the requested page could not be found." %}
11 |
12 | {% endblock %}
13 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/500.html:
--------------------------------------------------------------------------------
1 | {% extends base_template %}
2 | {% load i18n %}
3 |
4 |
5 | {% block breadcrumbs %}
6 |
10 | {% endblock %}
11 |
12 | {% block title %}{% trans 'Server error (500)' %}{% endblock %}
13 |
14 | {% block content %}
15 | {% trans 'Server Error (500) ' %}
16 | {% trans "There's been an error. It's been reported to the site administrators via e-mail and should be fixed shortly. Thanks for your patience." %}
17 |
18 | {% endblock %}
19 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/auth/password_reset/complete.html:
--------------------------------------------------------------------------------
1 | {% extends base_template %}
2 | {% load i18n xadmin_tags %}
3 |
4 | {% load crispy_forms_tags %}
5 |
6 | {% block body %}
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
{% trans "Your password has been set. You may go ahead and log in now." %}
15 |
{% trans 'Log in' %}
16 |
17 |
18 |
19 |
20 | {% endblock %}
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/auth/password_reset/confirm.html:
--------------------------------------------------------------------------------
1 | {% extends base_template %}
2 | {% load i18n xadmin_tags %}
3 |
4 | {% load crispy_forms_tags %}
5 |
6 | {% block body %}
7 |
8 |
9 |
10 | {% if validlink %}
11 |
12 |
13 |
14 |
22 | {% else %}
23 |
24 |
25 |
26 |
27 |
{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}
28 |
29 | {% endif %}
30 |
31 |
32 |
33 | {% endblock %}
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/auth/password_reset/done.html:
--------------------------------------------------------------------------------
1 | {% extends base_template %}
2 | {% load i18n xadmin_tags %}
3 |
4 | {% load crispy_forms_tags %}
5 |
6 | {% block body %}
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
{% trans "We've e-mailed you instructions for setting your password to the e-mail address you submitted. You should be receiving it shortly." %}
15 |
16 |
17 |
18 |
19 | {% endblock %}
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/auth/password_reset/email.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}{% autoescape off %}
2 | {% blocktrans %}You're receiving this e-mail because you requested a password reset for your user account at {{ site_name }}.{% endblocktrans %}
3 |
4 | {% trans "Please go to the following page and choose a new password:" %}
5 | {% block reset_link %}
6 | {{ protocol }}://{{ domain }}{% url 'xadmin:xadmin_password_reset_confirm' uidb36=uid token=token %}
7 | {% endblock %}
8 | {% trans "Your username, in case you've forgotten:" %} {{ user.username }}
9 |
10 | {% trans "Thanks for using our site!" %}
11 |
12 | {% blocktrans %}The {{ site_name }} team{% endblocktrans %}
13 |
14 | {% endautoescape %}
15 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/auth/password_reset/form.html:
--------------------------------------------------------------------------------
1 | {% extends base_template %}
2 | {% load i18n xadmin_tags %}
3 |
4 | {% load crispy_forms_tags %}
5 |
6 | {% block body %}
7 |
40 |
41 |
44 | {% endblock %}
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/auth/user/add_form.html:
--------------------------------------------------------------------------------
1 | {% extends "xadmin/views/model_form.html" %}
2 | {% load i18n %}
3 |
4 | {% block form_top %}
5 | {% if not is_popup %}
6 | {% trans "First, enter a username and password. Then, you'll be able to edit more user options." %}
7 | {% else %}
8 | {% trans "Enter a username and password." %}
9 | {% endif %}
10 | {% endblock %}
11 |
12 | {% block after_field_sets %}
13 |
14 | {% endblock %}
15 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/auth/user/change_password.html:
--------------------------------------------------------------------------------
1 | {% extends "xadmin/views/model_form.html" %}
2 | {% load i18n %}
3 |
4 | {% load xadmin_tags %}
5 | {% load crispy_forms_tags %}
6 |
7 | {% block breadcrumbs %}
8 | {% if account_view %}
9 |
13 | {% else %}
14 |
24 | {% endif %}
25 | {% endblock %}
26 |
27 | {% block content %}
28 |
58 |
59 | {% endblock %}
60 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/base.html:
--------------------------------------------------------------------------------
1 | {% load xadmin_tags %}{% load i18n %}
2 |
3 |
4 |
5 | {% block extrameta %}
6 |
7 |
8 | {% endblock %}
9 | {% block blockbots %} {% endblock %}
10 | {% block title %}{% endblock %}
11 | {% if LANGUAGE_BIDI %} {% endif %}
12 | {% vendor 'bootstrap.css' %}
13 | {% if site_theme %}
14 |
15 | {% else %}
16 |
17 | {% endif %}
18 | {% vendor 'font-awesome.css' 'xadmin.main.css' 'xadmin.plugins.css' 'xadmin.responsive.css' %}
19 | {{ media.css }}
20 | {% block extrastyle %}{% endblock %}
21 | {% vendor 'jquery.js' %}
22 | {% url 'xadmin:index' as indexurl %}
23 |
28 |
29 | {% block extrahead %}{% endblock %}
30 | {% view_block 'extrahead' %}
31 |
32 |
33 | {% block body %}
34 |
35 | {% block content %}{% endblock content %}
36 |
37 | {% endblock body %}
38 | {% vendor 'jquery-ui-sortable.js' 'bootstrap.js' 'xadmin.main.js' 'xadmin.responsive.js' %}
39 | {{ media.js }}
40 | {% block extrabody %}{% endblock %}
41 | {% view_block 'extrabody' %}
42 |
43 |
44 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/blocks/comm.top.setlang.html:
--------------------------------------------------------------------------------
1 | {% load i18n xadmin_tags %}
2 |
3 |
4 |
5 |
6 | {% get_language_info for LANGUAGE_CODE as l %}{{ l.name_local }}
7 |
8 |
13 |
19 |
20 |
32 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/blocks/comm.top.theme.html:
--------------------------------------------------------------------------------
1 | {% load i18n xadmin_tags %}
2 |
3 |
4 | {% trans "Themes" %}
5 |
10 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/blocks/comm.top.topnav.html:
--------------------------------------------------------------------------------
1 | {% load i18n xadmin_tags %}
2 | {% autoescape off %}
3 | {% if search_models %}
4 |
19 | {% endif %}
20 | {% if add_models %}
21 |
22 |
23 | {% trans "Add" %}
24 |
29 |
30 | {% endif %}
31 | {% endautoescape %}
32 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/blocks/modal_list.left_navbar.quickfilter.html:
--------------------------------------------------------------------------------
1 |
2 | {% for spec in cl.quickfilter.filter_specs %}{{ spec|safe }}{% endfor %}
3 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/blocks/model_form.before_fieldsets.wizard.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 | {{ wizard.management_form }}
3 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/blocks/model_form.submit_line.wizard.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 |
3 |
← {% trans "Prev step" %}
10 |
11 |
12 | {% if wizard.steps.last != wizard.steps.current %}
13 | {% trans "Next step" %} →
14 | {% else %}
15 | {% trans "Save" %}
16 | {% endif %}
17 |
18 |
19 |
20 | ← {% trans "Prev step" %}
27 |
28 | {% if wizard.steps.last != wizard.steps.current %}
29 | {% trans "Next step" %} →
30 | {% else %}
31 | {% trans "Save" %}
32 | {% endif %}
33 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/blocks/model_list.nav_form.search_form.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 | {% if cl.search_fields %}
3 |
13 | {% endif %}
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/blocks/model_list.nav_menu.bookmarks.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 |
3 |
4 | {{ bk_menu_title|truncatechars:9 }}
5 |
40 |
41 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/blocks/model_list.nav_menu.filters.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 |
3 |
4 | {% trans "Filters" %}{% if cl.used_filter_num > 0 %} {{cl.used_filter_num}} {% endif %}
5 |
6 |
13 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/blocks/model_list.results_bottom.actions.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 |
25 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/blocks/model_list.results_top.charts.html:
--------------------------------------------------------------------------------
1 | {% extends "xadmin/includes/box.html" %}
2 | {% load i18n xadmin_tags %}
3 | {% block box_title %}
4 | {% trans "Charts" %}
5 | {% endblock box_title %}
6 |
7 | {% block box_content_class %}nopadding{% endblock box_content_class %}
8 | {% block box_content %}
9 |
10 | {% for c in charts %}
11 | {{c.title}}
12 | {% endfor %}
13 |
14 |
15 | {% for c in charts %}
16 |
18 | {% endfor %}
19 |
20 | {% endblock box_content %}
21 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/blocks/model_list.results_top.date_hierarchy.html:
--------------------------------------------------------------------------------
1 | {% if show %}
2 |
10 | {% endif %}
11 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/blocks/model_list.top_toolbar.importexport.import.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/blocks/model_list.top_toolbar.layouts.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/blocks/model_list.top_toolbar.refresh.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/blocks/model_list.top_toolbar.saveorder.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 |
7 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/edit_inline/accordion.html:
--------------------------------------------------------------------------------
1 | {% extends "xadmin/edit_inline/base.html" %}
2 | {% load i18n xadmin_tags crispy_forms_tags %}
3 |
4 | {% block box_content_class %}{{ block.super }} panel-group{% endblock box_content_class %}
5 |
6 | {% block formset_form %}
7 |
21 | {% endblock formset_form %}
22 | {% block formset_empty %}
23 |
38 | {% endblock formset_empty %}
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/edit_inline/base.html:
--------------------------------------------------------------------------------
1 | {% extends "xadmin/includes/box.html" %}
2 | {% load i18n xadmin_tags crispy_forms_tags %}
3 |
4 | {% block box_class %}formset fieldset{% if formset.css_class or inline_style %} {{ formset.css_class }} {{ inline_style }}{% endif %}{% endblock box_class %}
5 | {% block box_attrs %}id="{{ formset.css_id }}" {{ formset.flat_attrs|safe }}{% endblock box_attrs %}
6 |
7 | {% block box_title %}
8 | {% if not formset.formset.detail_page %}
9 | {% if has_add_permission %}
10 |
11 | {% endif %}
12 | {% endif %}
13 | {{ formset.opts.verbose_name_plural|title }}
14 | {% endblock box_title %}
15 |
16 | {% block box_content_class %}{{inline_style}} formset-content{% endblock box_content_class %}
17 | {% block box_content_attrs %}id="{{ formset.css_id }}-{{inline_style}}" data-prefix="{{ prefix }}" data-style="{{inline_style}}"{% endblock box_content_attrs %}
18 |
19 | {% block box_content %}
20 | {% if not formset.formset.detail_page %}
21 | {{ formset.formset.management_form }}
22 | {{ formset.formset.non_form_errors }}
23 | {% endif %}
24 | {% block formset_content %}
25 | {% for fs in formset.formset %}
26 | {% block formset_form %}{% endblock formset_form %}
27 | {% endfor %}
28 | {% endblock formset_content %}
29 | {% endblock box_content %}
30 |
31 | {% block box_extra %}
32 | {% if not formset.formset.detail_page %}
33 |
34 | {% blockcapture inline_html %}{% block formset_empty %}{% endblock formset_empty %}{% endblockcapture %}
35 | {{inline_html}} {# html escaped #}
36 |
37 | {% endif %}
38 | {% endblock box_extra %}
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/edit_inline/blank.html:
--------------------------------------------------------------------------------
1 | {% extends "xadmin/edit_inline/base.html" %}
2 | {% load i18n xadmin_tags crispy_forms_tags %}
3 |
4 | {% block box_content_class %}formset-content{% endblock box_content_class %}
5 | {% block box_content %}{% trans "Null" %}
{% endblock box_content %}
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/edit_inline/one.html:
--------------------------------------------------------------------------------
1 | {% extends "xadmin/edit_inline/base.html" %}
2 | {% load i18n xadmin_tags crispy_forms_tags %}
3 |
4 | {% block box_title %}{{ formset.opts.verbose_name_plural|title }}{% endblock box_title %}
5 | {% block box_content %}
6 | {{ formset.formset.management_form }}
7 | {{ formset.formset.non_form_errors }}
8 | {% crispy formset.formset.0 formset.formset.helper %}
9 | {% endblock box_content %}
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/edit_inline/stacked.html:
--------------------------------------------------------------------------------
1 | {% extends "xadmin/edit_inline/base.html" %}
2 | {% load i18n xadmin_tags crispy_forms_tags %}
3 |
4 | {% block box_content_class %}{{ block.super }} panel-group{% endblock box_content_class %}
5 |
6 | {% block formset_form %}
7 |
18 | {% endblock formset_form %}
19 |
20 | {% block formset_empty %}
21 |
32 | {% endblock formset_empty %}
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/edit_inline/tab.html:
--------------------------------------------------------------------------------
1 | {% extends "xadmin/edit_inline/base.html" %}
2 | {% load i18n xadmin_tags crispy_forms_tags %}
3 |
4 | {% block box_content_class %}tabs{% endblock box_content_class %}
5 | {% block box_content_attrs %}id="{{ formset.css_id }}-tabs"{% endblock box_content_attrs %}
6 |
7 | {% block formset_content %}
8 |
16 |
17 | {% for fs in formset.formset %}
18 |
19 | {% if formset.formset.can_delete %}
20 |
21 | {% endif %}
22 | {% crispy fs formset.formset.helper %}
23 |
24 | {% endfor %}
25 |
26 | {% endblock formset_content %}
27 |
28 | {% block formset_empty %}
29 |
35 | {% endblock formset_empty %}
36 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/edit_inline/tabular.html:
--------------------------------------------------------------------------------
1 | {% extends "xadmin/edit_inline/base.html" %}
2 | {% load i18n xadmin_tags crispy_forms_tags %}
3 |
4 | {% block box_content_class %}nopadding{% endblock box_content_class %}
5 | {% block box_content_attrs %}{% endblock box_content_attrs %}
6 |
7 | {% block formset_content %}
8 |
9 |
10 | {% for field in fields %}
11 | {% if not field.widget.is_hidden %}
12 | {{ field.label|capfirst }}
13 | {% if field.help_text %} {% endif %}
14 |
15 | {% endif %}
16 | {% endfor %}
17 | {% for field in readonly_fields %}
18 | {{ field.label }}
19 | {% endfor %}
20 | {% if formset.formset.can_delete %} {% endif %}
21 |
22 |
23 | {% for fs in formset.formset %}
24 |
25 | {% crispy fs formset.formset.helper %}
26 | {% for r_o_f in fs.readonly_fields %}
27 | {{ r_o_f.contents|safe }}
28 | {% endfor %}
29 | {% if formset.formset.can_delete %}
30 |
31 | {% endif %}
32 |
33 | {% endfor %}
34 |
35 |
36 | {% endblock formset_content %}
37 |
38 | {% block formset_empty %}
39 |
40 | {% crispy formset.formset.empty_form formset.formset.helper %}
41 | {% if formset.formset.can_delete %}
42 |
43 | {% endif %}
44 |
45 | {% endblock formset_empty %}
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/filters/char.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/filters/checklist.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/filters/fk_search.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 |
32 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/filters/list.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/filters/quickfilter.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 |
3 | {% for choice in choices %}
4 |
5 |
6 |
7 | {{ choice.display }}
8 |
9 |
10 | {% endfor %}
11 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/filters/rel.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/forms/transfer.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 |
3 |
4 |
{% trans "Available" %} {{verbose_name}}
5 |
6 |
7 |
8 |
9 |
10 | {{available_options|safe}}
11 |
12 |
{% trans "Choose all" %}
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
29 |
30 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/grids/thumbnails.html:
--------------------------------------------------------------------------------
1 | {% extends "xadmin/views/model_list.html" %}
2 |
3 | {% block toolbar_layouts %}{% endblock toolbar_layouts %}
4 | {% block results_grid_body %}{% endblock results_grid_body %}
5 |
6 | {% block results_grid %}
7 | {{ block.super }}
8 |
9 |
10 |
11 | {% for obj in results %}
12 | {% block grid_item %}
13 |
14 |
15 | {% if obj.thumbnail_img %}
16 | {{obj.thumbnail_img.label}}
17 | {% else %}
18 |
19 | {% endif %}
20 | {% if obj.thumbnail_label %}
21 |
{{obj.thumbnail_label.label}}
22 | {% endif %}
23 |
54 |
55 |
56 | {% endblock grid_item %}
57 | {% endfor %}
58 |
59 |
60 |
61 | {% endblock results_grid %}
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/import_export/export_action.html:
--------------------------------------------------------------------------------
1 | {% extends 'xadmin/base_site.html' %}
2 | {% load i18n %}
3 | {% load admin_urls %}
4 | {% load import_export_tags %}
5 |
6 | {% block breadcrumbs_last %}
7 | {% trans "Export" %}
8 | {% endblock %}
9 | {% load xadmin_tags %}
10 |
11 | {% block breadcrumbs %}
12 |
17 | {% endblock %}
18 | {% block nav_title %}
19 | {{title}}
20 | {% endblock %}
21 |
22 | {% block content %}
23 |
46 | {% endblock %}
47 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/includes/box.html:
--------------------------------------------------------------------------------
1 |
2 |
{% block box_title %}{% endblock box_title %}
3 |
4 | {% block box_content %}{% endblock box_content %}
5 |
6 | {% block box_extra %}{% endblock box_extra %}
7 |
8 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/includes/pagination.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 | {{ cl.result_count }} {% ifequal cl.result_count 1 %}{{ cl.opts.verbose_name }}{% else %}{{ cl.opts.verbose_name_plural }}{% endifequal %}
3 | {% if pagination_required %}
4 | {% for num in page_range %}
5 | {{ num }}
6 | {% endfor %}
7 | {% endif %}
8 | {% if show_all_url %}
9 | {% trans 'Show all' %}
10 | {% endif %}
11 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/includes/sitemenu_accordion.html:
--------------------------------------------------------------------------------
1 | {% extends 'xadmin/includes/sitemenu_default.html' %}
2 | {% load i18n xadmin_tags %}
3 |
4 |
5 | {% block navbar_md %}
6 |
33 | {% endblock navbar_md %}
34 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/includes/sitemenu_default.html:
--------------------------------------------------------------------------------
1 | {% load i18n xadmin_tags %}
2 |
3 |
4 | {% block navbar_md %}
5 |
25 | {% endblock navbar_md %}
26 |
27 | {% block navbar_sm %}
28 |
52 | {% endblock navbar_sm %}
53 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/includes/submit_line.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 | {% load xadmin_tags %}
3 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/includes/toggle_back.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/includes/toggle_menu.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/layout/field_value.html:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/layout/field_value_td.html:
--------------------------------------------------------------------------------
1 |
2 | {{ result.val }}
3 |
4 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/layout/fieldset.html:
--------------------------------------------------------------------------------
1 | {% extends "xadmin/includes/box.html" %}
2 | {% block box_class %}fieldset{% if fieldset.css_class %} {{ fieldset.css_class }}{% endif %}{% endblock box_class %}
3 | {% block box_attrs %}{% if fieldset.css_id %}id="{{ fieldset.css_id }}"{% endif %} {{ fieldset.flat_attrs|safe }}{% endblock box_attrs %}
4 | {% block box_title %}{{ legend|safe }}{% if fieldset.description %} {{fieldset.description}} {% endif %}{% endblock box_title %}
5 | {% block box_content %}
6 | {{ fields|safe }}
7 | {% endblock box_content %}
8 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/layout/input_group.html:
--------------------------------------------------------------------------------
1 | {% load crispy_forms_field %}
2 |
3 | {% if field.is_hidden %}
4 | {{ field }}
5 | {% else %}
6 |
28 | {% endif %}
29 |
30 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/layout/td-field.html:
--------------------------------------------------------------------------------
1 | {% load crispy_forms_field %}
2 |
3 | {% if field.is_hidden %}
4 | {{ field }}
5 | {% else %}
6 |
7 | {% if field.is_readonly %}
8 | {{ field.contents }}
9 | {% else %}
10 | {% crispy_field field %}
11 | {% if field.errors %}
12 | {% for error in field.errors %}
13 | {{ error }}
14 | {% endfor %}
15 | {% endif %}
16 | {% endif %}
17 |
18 | {% endif %}
19 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/views/app_index.html:
--------------------------------------------------------------------------------
1 | {% extends "xadmin/index.html" %}
2 | {% load i18n %}
3 |
4 |
5 | {% if not is_popup %}
6 | {% block breadcrumbs %}
7 |
8 |
9 | {% trans 'Home' %}
10 |
11 | {% for app in app_list %}
12 |
13 | {% blocktrans with app.name as name %}{{ name }}{% endblocktrans %}
14 |
15 | {% endfor %}
16 |
17 | {% endblock %}
18 | {% endif %}
19 |
20 | {% block sidebar %}{% endblock %}
21 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/views/batch_change_form.html:
--------------------------------------------------------------------------------
1 | {% extends base_template %}
2 | {% load i18n l10n %}
3 |
4 | {% load xadmin_tags %}
5 | {% load crispy_forms_tags %}
6 |
7 | {% block breadcrumbs %}
8 |
13 | {% endblock %}
14 |
15 | {% block nav_title %}{% if model_icon %} {% endif %}
16 | {% blocktrans count counter=count %}Change one {{ objects_name }}{% plural %}Batch change {{ counter }} {{ objects_name }}{% endblocktrans %}
17 | {% endblock %}
18 |
19 | {% block content %}
20 |
41 | {% endblock %}
42 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/views/dashboard.html:
--------------------------------------------------------------------------------
1 | {% extends base_template %}
2 | {% load i18n xadmin_tags %}
3 |
4 |
5 | {% block bodyclass %}dashboard{% endblock %}
6 | {% block breadcrumbs %}{% endblock %}
7 |
8 | {% block nav_title %}
9 | {% if icon %} {%endif%} {{ title }}
10 | {% endblock %}
11 |
12 | {% block nav_toggles %}
13 | {% include "xadmin/includes/toggle_menu.html" %}
14 | {% if has_add_widget_permission %}
15 |
16 |
17 | {% endif %}
18 | {% endblock %}
19 |
20 | {% block nav_btns %}
21 | {% if has_add_widget_permission %}
22 |
23 | {% trans "Add Widget" %}
24 | {% endif %}
25 | {% endblock %}
26 |
27 | {% block content %}
28 |
29 | {% for c in columns %}
30 |
31 | {% for widget in c.1 %}
32 | {{ widget.widget|safe }}
33 | {% endfor %}
34 |
35 | {% endfor %}
36 |
37 |
38 | {% endblock %}
39 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/views/form.html:
--------------------------------------------------------------------------------
1 | {% extends base_template %}
2 | {% load i18n %}
3 |
4 | {% load xadmin_tags %}
5 | {% load crispy_forms_tags %}
6 |
7 | {% block nav_title %}{% if model_icon %} {% endif %}
8 | {{ title }}{% endblock %}
9 |
10 | {% block content %}
11 |
35 | {% endblock %}
36 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/views/invalid_setup.html:
--------------------------------------------------------------------------------
1 | {% extends base_template %}
2 | {% load i18n %}
3 |
4 |
5 | {% block breadcrumbs %}
6 |
10 | {% endblock %}
11 |
12 | {% block content %}
13 | {% trans "Something's wrong with your database installation. Make sure the appropriate database tables have been created, and make sure the database is readable by the appropriate user." %}
14 | {% endblock %}
15 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/views/logged_out.html:
--------------------------------------------------------------------------------
1 | {% extends base_template %}
2 | {% load i18n %}
3 |
4 |
5 | {% block extrastyle %}{{ block.super }}
6 |
9 | {% endblock %}
10 |
11 | {% block body %}
12 |
26 |
27 | {% endblock %}
28 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/views/model_dashboard.html:
--------------------------------------------------------------------------------
1 | {% extends 'xadmin/views/dashboard.html' %}
2 | {% load i18n xadmin_tags %}
3 |
4 |
5 | {% block breadcrumbs %}
6 |
15 | {% endblock %}
16 |
17 | {% block nav_toggles %}
18 | {% include "xadmin/includes/toggle_back.html" %}
19 | {% if has_change_permission %}
20 |
21 | {% endif %}
22 | {% endblock %}
23 |
24 | {% block nav_btns %}
25 | {% if has_change_permission %}
26 | {% trans "Edit" %}
27 | {% endif %}
28 | {% endblock %}
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/views/model_delete_confirm.html:
--------------------------------------------------------------------------------
1 | {% extends base_template %}
2 | {% load i18n %}
3 |
4 | {% load xadmin_tags %}
5 |
6 | {% block nav_title %}{{title}}{% endblock %}
7 |
8 | {% block content %}
9 | {% if perms_lacking or protected %}
10 | {% if perms_lacking %}
11 | {% blocktrans with escaped_object=object %}Deleting the {{ verbose_name }} '{{ escaped_object }}' would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktrans %}
12 |
13 | {% for obj in perms_lacking %}
14 | {{ obj }}
15 | {% endfor %}
16 |
17 | {% endif %}
18 | {% if protected %}
19 | {% blocktrans with escaped_object=object %}Deleting the {{ verbose_name }} '{{ escaped_object }}' would require deleting the following protected related objects:{% endblocktrans %}
20 |
21 | {% for obj in protected %}
22 | {{ obj }}
23 | {% endfor %}
24 |
25 | {% endif %}
26 | {% else %}
27 | {% blocktrans with escaped_object=object %}Are you sure you want to delete the {{ verbose_name }} "{{ escaped_object }}"? All of the following related items will be deleted:{% endblocktrans %}
28 | {{ deleted_objects|unordered_list }}
29 |
39 | {% endif %}
40 | {% endblock %}
41 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/views/model_delete_selected_confirm.html:
--------------------------------------------------------------------------------
1 | {% extends base_template %}
2 | {% load i18n l10n %}
3 |
4 | {% load xadmin_tags %}
5 |
6 | {% block breadcrumbs %}
7 |
12 | {% endblock %}
13 | {% block nav_title %}{{title}}{% endblock %}
14 |
15 | {% block content %}
16 | {% if perms_lacking or protected %}
17 | {% if perms_lacking %}
18 | {% blocktrans %}Deleting the selected {{ objects_name }} would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktrans %}
19 |
20 | {% for obj in perms_lacking %}
21 | {{ obj }}
22 | {% endfor %}
23 |
24 | {% endif %}
25 | {% if protected %}
26 | {% blocktrans %}Deleting the selected {{ objects_name }} would require deleting the following protected related objects:{% endblocktrans %}
27 |
28 | {% for obj in protected %}
29 | {{ obj }}
30 | {% endfor %}
31 |
32 | {% endif %}
33 | {% else %}
34 | {% blocktrans %}Are you sure you want to delete the selected {{ objects_name }}? All of the following objects and their related items will be deleted:{% endblocktrans %}
35 | {% for deletable_object in deletable_objects %}
36 |
37 | {{ deletable_object|unordered_list }}
38 |
39 | {% endfor %}
40 |
54 | {% endif %}
55 | {% endblock %}
56 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/views/model_detail.html:
--------------------------------------------------------------------------------
1 | {% extends base_template %}
2 | {% load i18n %}
3 |
4 | {% load xadmin_tags %}
5 | {% load crispy_forms_tags %}
6 |
7 | {% block bodyclass %}{{ opts.app_label }}-{{ opts.object_name.lower }} detail{% endblock %}
8 |
9 | {% block nav_title %}
10 | {% if model_icon %} {% endif %}{{ object|truncatewords:"18" }}
11 | {% endblock %}
12 |
13 | {% block nav_toggles %}
14 | {% include "xadmin/includes/toggle_back.html" %}
15 | {% if has_change_permission %}
16 |
17 | {% endif %}
18 | {% if has_delete_permission %}
19 |
20 | {% endif %}
21 | {% endblock %}
22 |
23 | {% block nav_btns %}
24 | {% if has_change_permission %}
25 | {% trans "Edit" %}
26 | {% endif %}
27 | {% if has_delete_permission %}
28 | {% trans "Delete" %}
29 | {% endif %}
30 | {% endblock %}
31 |
32 | {% block content %}
33 | {% view_block 'before_fieldsets' %}
34 | {% crispy form %}
35 | {% view_block 'after_fieldsets' %}
36 | {% endblock %}
37 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/views/model_form.html:
--------------------------------------------------------------------------------
1 | {% extends base_template %}
2 | {% load i18n %}
3 |
4 | {% load xadmin_tags %}
5 | {% load crispy_forms_tags %}
6 |
7 | {% block bodyclass %}{{ opts.app_label }}-{{ opts.object_name.lower }} change-form{% endblock %}
8 |
9 | {% block nav_title %}{% if model_icon %} {% endif %}
10 | {{ title }}{% endblock %}
11 |
12 | {% block content %}
13 |
32 | {% endblock %}
33 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/views/model_history.html:
--------------------------------------------------------------------------------
1 | {% extends base_template %}
2 | {% load i18n %}
3 |
4 | {% load xadmin_tags %}
5 |
6 | {% block breadcrumbs %}
7 |
13 | {% endblock %}
14 |
15 | {% block nav_title %}
16 | {{title}}
17 | {% endblock %}
18 |
19 | {% block content %}
20 |
21 | {% if action_list %}
22 |
57 | {% else %}
58 |
{% trans "This object doesn't have a change history. It probably wasn't added via this admin site." %}
59 | {% endif %}
60 |
61 | {% endblock %}
62 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/views/quick_detail.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 | {% load xadmin_tags %}
3 | {% load crispy_forms_tags %}
4 | {% crispy form %}
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/views/quick_form.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 | {% load xadmin_tags %}
3 | {% load crispy_forms_tags %}
4 |
7 | {{ media.css }}
8 | {{ media.js }}
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/views/recover_form.html:
--------------------------------------------------------------------------------
1 | {% extends "xadmin/views/model_form.html" %}
2 | {% load i18n %}
3 |
4 | {% load xadmin_tags %}
5 |
6 | {% block breadcrumbs %}
7 |
17 | {% endblock %}
18 |
19 | {% block content %}
20 | {% blocktrans %}Press the recover button below to recover this version of the object.{% endblocktrans %}
21 | {{block.super}}
22 | {% endblock %}
23 |
24 | {% block submit_buttons_bottom %}
25 |
26 | {% trans 'Recover' %}
27 |
28 | {% endblock %}
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/views/recover_list.html:
--------------------------------------------------------------------------------
1 | {% extends base_template %}
2 | {% load i18n %}
3 |
4 | {% load xadmin_tags %}
5 |
6 | {% block breadcrumbs %}
7 |
12 | {% endblock %}
13 |
14 | {% block nav_title %}
15 | {{title}}
16 | {% endblock %}
17 |
18 | {% block content %}
19 | {% blocktrans %}Choose a date from the list below to recover a deleted version of an object.{% endblocktrans %}
20 |
21 | {% if deleted %}
22 |
23 |
24 |
25 | {% trans 'Date/time' %}
26 | {{opts.verbose_name|capfirst}}
27 |
28 |
29 |
30 | {% for deletion in deleted %}
31 |
32 | {{deletion.revision.date_created}}
33 | {{deletion.object_repr}}
34 |
35 | {% endfor %}
36 |
37 |
38 | {% else %}
39 |
{% trans "There are no deleted objects to recover." %}
40 | {% endif %}
41 |
42 | {% endblock %}
43 |
44 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/views/revision_diff.html:
--------------------------------------------------------------------------------
1 | {% extends "xadmin/views/model_form.html" %}
2 | {% load i18n %}
3 |
4 | {% load xadmin_tags %}
5 |
6 | {% block breadcrumbs %}
7 |
14 | {% endblock %}
15 |
16 | {% block nav_title %}
17 | {% blocktrans with opts.verbose_name as verbose_name %}Diff {{verbose_name}}{% endblocktrans %}
18 | {% endblock %}
19 |
20 | {% block content %}
21 |
22 |
23 |
24 |
25 | {% trans 'Field' %}
26 | {% trans 'Version A' %}
27 | {% trans 'Version B' %}
28 |
29 |
30 |
31 | {% for label, value_a, value_b, diff in diffs %}
32 |
33 | {{ label }}
34 | {{value_a}}
35 | {{value_b}}
36 |
37 | {% endfor %}
38 |
39 | {% trans "Revert to" %}
40 | {% trans 'Revert' %}
41 | {% trans 'Revert' %}
42 |
43 |
44 |
45 |
46 | {% endblock %}
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/views/revision_form.html:
--------------------------------------------------------------------------------
1 | {% extends "xadmin/views/model_form.html" %}
2 | {% load i18n %}
3 |
4 | {% load xadmin_tags %}
5 |
6 | {% block breadcrumbs %}
7 |
18 | {% endblock %}
19 |
20 | {% block content %}
21 | {% blocktrans %}Press the revert button below to revert to this version of the object.{% endblocktrans %}
22 | {{block.super}}
23 | {% endblock %}
24 |
25 | {% block submit_buttons_bottom %}
26 |
27 | {% trans 'Revert this revision' %}
28 |
29 | {% endblock %}
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/widgets/addform.html:
--------------------------------------------------------------------------------
1 | {% extends "xadmin/widgets/base.html" %}
2 | {% load i18n xadmin_tags %}
3 | {% load crispy_forms_tags %}
4 |
5 | {% block box_class %}{{block.super}} form-horizontal short_label fieldset{% endblock box_class %}
6 |
7 | {% block content %}
8 |
22 | {% endblock content %}
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/widgets/base.html:
--------------------------------------------------------------------------------
1 | {% extends "xadmin/includes/box.html" %}
2 | {% load i18n xadmin_tags %}
3 | {% load crispy_forms_tags %}
4 |
5 | {% block box_attrs %}id="{{ widget_id }}"{% endblock box_attrs %}
6 | {% block box_class %}widget {{widget_type}}{% endblock box_class %}
7 |
8 | {% block box_title %}
9 | {% if widget.dashboard.widget_customiz %}
10 |
11 | {% endif %}
12 | {% block title %}
13 |
14 | {{ widget_title }}
15 | {% endblock title %}
16 | {% endblock box_title %}
17 |
18 | {% block box_content %}
19 | {% block content %}
20 | {{ content|safe }}
21 | {% endblock content %}
22 | {% endblock box_content %}
23 |
24 | {% block box_extra %}
25 |
47 | {% endblock box_extra %}
48 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/widgets/chart.html:
--------------------------------------------------------------------------------
1 | {% extends "xadmin/widgets/base.html" %}
2 | {% load i18n xadmin_tags %}
3 |
4 | {% block content_css %}tabs{% endblock content_css %}
5 | {% block content %}
6 | {% if not widget.one_chart %}
7 |
8 | {% for c in charts %}
9 | {{c.title}}
10 | {% endfor %}
11 |
12 | {% endif %}
13 |
14 | {% for c in charts %}
15 |
17 | {% endfor %}
18 |
19 | {% endblock content %}
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/widgets/list.html:
--------------------------------------------------------------------------------
1 | {% extends "xadmin/widgets/base.html" %}
2 | {% load i18n xadmin_tags %}
3 |
4 | {% block title %}
5 | {{ result_count }}
6 | {{ block.super }}
7 | {% endblock title %}
8 |
9 | {% block box_content_class %}{% if results %}nopadding x-scroll{% endif %}{% endblock box_content_class %}
10 |
11 | {% block content %}
12 | {% if results %}
13 |
14 |
15 |
16 | {% for o in result_headers %}
17 | {{ o.text }}
18 | {% endfor %}
19 |
20 |
21 |
22 | {% for row in results %}
23 | {% for o in row %}
24 |
25 | {{ o.label }}
26 |
27 | {% endfor %}
28 |
29 | {% endfor %}
30 |
31 |
32 | {% else %}
33 | {% trans "Empty list" %}
34 | {% endif %}
35 | {% endblock content %}
--------------------------------------------------------------------------------
/extra_apps/xadmin/templates/xadmin/widgets/qbutton.html:
--------------------------------------------------------------------------------
1 | {% extends "xadmin/widgets/base.html" %}
2 | {% load i18n xadmin_tags %}
3 |
4 | {% block content %}
5 |
6 | {% for btn in btns %}
7 |
13 | {% endfor %}
14 |
15 | {% endblock content %}
16 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/templatetags/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/extra_apps/xadmin/templatetags/__init__.py
--------------------------------------------------------------------------------
/extra_apps/xadmin/templatetags/xadmin_tags.py:
--------------------------------------------------------------------------------
1 | from django import template
2 | from django.template import Library
3 | from django.utils import six
4 | from django.utils.safestring import mark_safe
5 |
6 | from xadmin.util import static, vendor as util_vendor
7 |
8 | register = Library()
9 |
10 | @register.simple_tag(takes_context=True)
11 | def view_block(context, block_name, *args, **kwargs):
12 | if 'admin_view' not in context:
13 | return ""
14 |
15 | admin_view = context['admin_view']
16 | nodes = []
17 | method_name = 'block_%s' % block_name
18 |
19 | cls_str = str if six.PY3 else basestring
20 | for view in [admin_view] + admin_view.plugins:
21 | if hasattr(view, method_name) and callable(getattr(view, method_name)):
22 | block_func = getattr(view, method_name)
23 | result = block_func(context, nodes, *args, **kwargs)
24 | if result and isinstance(result, cls_str):
25 | nodes.append(result)
26 | if nodes:
27 | return mark_safe(''.join(nodes))
28 | else:
29 | return ""
30 |
31 | @register.filter
32 | def admin_urlname(value, arg):
33 | return 'xadmin:%s_%s_%s' % (value.app_label, value.model_name, arg)
34 |
35 | static = register.simple_tag(static)
36 |
37 |
38 | @register.simple_tag(takes_context=True)
39 | def vendor(context, *tags):
40 | return util_vendor(*tags).render()
41 |
42 |
43 | class BlockcaptureNode(template.Node):
44 | """https://chriskief.com/2013/11/06/conditional-output-of-a-django-block/"""
45 | def __init__(self, nodelist, varname):
46 | self.nodelist = nodelist
47 | self.varname = varname
48 |
49 | def render(self, context):
50 | output = self.nodelist.render(context)
51 | context[self.varname] = str(output)
52 | return ''
53 |
54 |
55 | @register.tag(name='blockcapture')
56 | def do_blockcapture(parser, token):
57 | try:
58 | tag_name, args = token.contents.split(None, 1)
59 | except ValueError:
60 | raise template.TemplateSyntaxError("'blockcapture' node requires a variable name.")
61 |
62 | nodelist = parser.parse(('endblockcapture',))
63 | parser.delete_first_token()
64 |
65 | return BlockcaptureNode(nodelist, args)
66 |
--------------------------------------------------------------------------------
/extra_apps/xadmin/views/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 |
3 | from .base import BaseAdminPlugin, BaseAdminView, CommAdminView, ModelAdminView, filter_hook, csrf_protect_m, BaseAdminObject
4 |
5 | from .list import ListAdminView
6 | from .edit import CreateAdminView, UpdateAdminView, ModelFormAdminView
7 | from .delete import DeleteAdminView
8 | from .detail import DetailAdminView
9 | from .form import FormAdminView
10 | from .dashboard import Dashboard, BaseWidget, widget_manager, ModelDashboard
11 | from .website import IndexView, LoginView, LogoutView, UserSettingView
12 |
13 | __all__ = (
14 | 'BaseAdminObject',
15 | 'BaseAdminPlugin', 'BaseAdminView', 'CommAdminView', 'ModelAdminView', 'ListAdminView',
16 | 'ModelFormAdminView', 'CreateAdminView', 'UpdateAdminView', 'DeleteAdminView', 'DetailAdminView', 'FormAdminView',
17 | 'Dashboard', 'BaseWidget',
18 | 'IndexView', 'LoginView', 'LogoutView',
19 | 'filter_hook', 'csrf_protect_m'
20 | )
21 |
22 | # admin site-wide views
23 | def register_builtin_views(site):
24 | site.register_view(r'^$', IndexView, name='index')
25 | site.register_view(r'^login/$', LoginView, name='login')
26 | site.register_view(r'^logout/$', LogoutView, name='logout')
27 |
28 | site.register_view(r'^settings/user$', UserSettingView, name='user_settings')
29 |
30 | site.register_modelview(r'^$', ListAdminView, name='%s_%s_changelist')
31 | site.register_modelview(r'^add/$', CreateAdminView, name='%s_%s_add')
32 | site.register_modelview(
33 | r'^(.+)/delete/$', DeleteAdminView, name='%s_%s_delete')
34 | site.register_modelview(
35 | r'^(.+)/update/$', UpdateAdminView, name='%s_%s_change')
36 | site.register_modelview(
37 | r'^(.+)/detail/$', DetailAdminView, name='%s_%s_detail')
38 | site.register_modelview(
39 | r'^(.+)/dashboard/$', ModelDashboard, name='%s_%s_dashboard')
40 |
41 | site.set_loginview(LoginView)
--------------------------------------------------------------------------------
/help_tools/Helper.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from __future__ import division
3 | import datetime
4 |
5 | '''
6 | 自定义分页类
7 | '''
8 | def iPagination( params ):
9 | import math
10 |
11 | ret = {
12 | "is_prev":1,
13 | "is_next":1,
14 | "from" :0 ,
15 | "end":0,
16 | "current":0,
17 | "total_pages":0,
18 | "page_size" : 0,
19 | "total" : 0,
20 | "url":params['url']
21 | }
22 |
23 | total = int( params['total'] )
24 | page_size = int( params['page_size'] )
25 | page = int( params['page'] )
26 | display = int( params['display'] )
27 | total_pages = int( math.ceil( total / page_size ) )
28 | total_pages = total_pages if total_pages > 0 else 1
29 | if page <= 1:
30 | ret['is_prev'] = 0
31 |
32 | if page >= total_pages:
33 | ret['is_next'] = 0
34 |
35 | semi = int( math.ceil( display / 2 ) )
36 |
37 | if page - semi > 0 :
38 | ret['from'] = page - semi
39 | else:
40 | ret['from'] = 1
41 |
42 | if page + semi <= total_pages :
43 | ret['end'] = page + semi
44 | else:
45 | ret['end'] = total_pages
46 |
47 | ret['current'] = page
48 | ret['total_pages'] = total_pages
49 | ret['page_size'] = page_size
50 | ret['total'] = total
51 | ret['range'] = range( ret['from'],ret['end'] + 1 )
52 | return ret
53 |
54 |
--------------------------------------------------------------------------------
/help_tools/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/help_tools/__init__.py
--------------------------------------------------------------------------------
/help_tools/format_time.py:
--------------------------------------------------------------------------------
1 | import time
2 | import datetime
3 |
4 | # 计算两个日期相差天数,自定义函数名,和两个日期的变量名。
5 | def Caltime(date1, date2):
6 | date1 = time.strptime(date1,"%Y-%m-%d")
7 | date2 = time.strptime(date2, "%Y-%m-%d")
8 | date1 = datetime.datetime(date1[0], date1[1], date1[2])
9 | date2 = datetime.datetime(date2[0], date2[1], date2[2])
10 | return (date2 - date1).days
11 | # print(Caltime(date1='2018-11-14',date2='2018-12-10'))
12 | # today_time=datetime.datetime.now().strftime("%Y-%m-%d")
13 | # all_day=Caltime('2015-10-15',today_time)
14 | # print(all_day)
--------------------------------------------------------------------------------
/help_tools/send_mail_tools.py:
--------------------------------------------------------------------------------
1 | from django.core.mail import send_mail
2 | from random import randint
3 | from users.models import VerifyCodeEmail
4 | from MyBlog.settings import EMAIL_FROM
5 |
6 |
7 | def makecode(length):
8 | code_source = '1234567890QWERTYUIOPASDFGHJKLZXCVBNMzxcvbnmasdfghjklqwertyuiop'
9 | code = ''
10 | for i in range(length):
11 | code += code_source[randint(0, len(code_source) - 1)]
12 | return code
13 |
14 |
15 | def send_email_code(e, type):
16 | code = makecode(8)
17 | new = VerifyCodeEmail()
18 | new.email = e
19 | new.code = code
20 | new.code_type = type
21 | new.save()
22 |
23 | send_title = ''
24 | send_content = ''
25 | send_type = type
26 | if send_type == '1':
27 | send_title = '欢迎注册Debug5'
28 | send_content = '点击链接激活账号\n http://www.debug5.com/user_active/' + code
29 | send_mail(send_title, send_content, EMAIL_FROM, [e])
30 | if send_type == '2':
31 | send_title = '请重置密码_From Debug5'
32 | send_content = '点击链接重置密码\n http://www.debug5.com/user/user_reset/' + code
33 | send_mail(send_title, send_content, EMAIL_FROM, [e])
34 | if send_type == '3':
35 | send_title = '请重置邮箱_From Debug5'
36 | send_content = '请复制验证码去验证:' + code
37 | send_mail(send_title, send_content, EMAIL_FROM, [e])
38 |
39 |
40 | def send_pwd(e, type, pwd):
41 | if type == '4':
42 | send_title = '您已修改密码'
43 | send_content = '您的新密码:' + pwd
44 | send_mail(send_title, send_content, EMAIL_FROM, [e])
45 |
--------------------------------------------------------------------------------
/manage.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | import os
3 | import sys
4 |
5 | if __name__ == "__main__":
6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "MyBlog.settings")
7 | try:
8 | from django.core.management import execute_from_command_line
9 | except ImportError:
10 | # The above import may fail for some other reason. Ensure that the
11 | # issue is really that Django is missing to avoid masking other
12 | # exceptions on Python 2.
13 | try:
14 | import django
15 | except ImportError:
16 | raise ImportError(
17 | "Couldn't import Django. Are you sure it's installed and "
18 | "available on your PYTHONPATH environment variable? Did you "
19 | "forget to activate a virtual environment?"
20 | )
21 | raise
22 | execute_from_command_line(sys.argv)
23 |
--------------------------------------------------------------------------------
/requirement.txt:
--------------------------------------------------------------------------------
1 | asn1crypto==0.24.0
2 | cffi==1.11.5
3 | cryptography==2.4.2
4 | diff-match-patch==20121119
5 | Django==1.11
6 | django-crispy-forms==1.7.2
7 | django-crontab==0.7.1
8 | django-formtools==2.1
9 | django-import-export==1.0.1
10 | django-reversion==3.0.0
11 | et-xmlfile==1.0.1
12 | future==0.15.2
13 | gunicorn==19.9.0
14 | httplib2==0.9.2
15 | idna==2.8
16 | jdcal==1.4
17 | mysqlclient==1.4.6
18 | odfpy==1.3.6
19 | openpyxl==2.5.7
20 | Pillow==5.2.0
21 | pycparser==2.19
22 | PyJWT==1.6.4
23 | PyMySQL==0.9.2
24 | pytz==2018.5
25 | PyYAML==3.13
26 | six==1.10.0
27 | tablib==0.12.1
28 | unicodecsv==0.14.1
29 | uWSGI==2.0.17.1
30 | xlrd==1.1.0
31 | xlwt==1.3.0
32 |
--------------------------------------------------------------------------------
/static/css/nprogress.css:
--------------------------------------------------------------------------------
1 | @charset "utf-8";#nprogress{pointer-events:none;}#nprogress .bar{background:#3399CC;position:fixed;z-index:1000;top:0;left:0;width:100%;height:2px;}#nprogress .peg{display:block;position:absolute;right:0px;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1.0;-webkit-transform:rotate(3deg) translate(0px,-4px);-ms-transform:rotate(3deg) translate(0px,-4px);transform:rotate(3deg) translate(0px,-4px);}.nprogress-custom-parent{overflow:hidden;position:relative;}.nprogress-custom-parent #nprogress .spinner,.nprogress-custom-parent #nprogress .bar{position:absolute;}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg);}100%{-webkit-transform:rotate(360deg);}}@keyframes nprogress-spinner{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}@media (min-width:1280px){#nprogress .spinner{display:block;position:fixed;z-index:10000;top:18px;right:15px;}#nprogress .spinner-icon{width:22px;height:22px;box-sizing:border-box;border:solid 2px transparent;border-top-color:#3399CC;border-left-color:#4CC3FF;border-radius:50%;-webkit-animation:nprogress-spinner 400ms linear infinite;animation:nprogress-spinner 400ms linear infinite;}}
--------------------------------------------------------------------------------
/static/css/test/dig_close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/css/test/dig_close.png
--------------------------------------------------------------------------------
/static/css/test/error-img.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/css/test/error-img.png
--------------------------------------------------------------------------------
/static/css/test/saved_resource.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/static/css/test/top_down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/css/test/top_down.png
--------------------------------------------------------------------------------
/static/fonts/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/fonts/FontAwesome.otf
--------------------------------------------------------------------------------
/static/fonts/TaurusNormal.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/fonts/TaurusNormal.ttf
--------------------------------------------------------------------------------
/static/fonts/TaurusNormal.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/fonts/TaurusNormal.woff
--------------------------------------------------------------------------------
/static/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/fonts/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/static/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/static/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/static/fonts/fontawesome-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/fonts/fontawesome-webfont.woff2
--------------------------------------------------------------------------------
/static/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/static/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/static/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/static/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/static/images/201610181557196870.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/images/201610181557196870.jpg
--------------------------------------------------------------------------------
/static/images/201610241224221511.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/images/201610241224221511.jpg
--------------------------------------------------------------------------------
/static/images/201610241227558789.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/images/201610241227558789.jpg
--------------------------------------------------------------------------------
/static/images/Thumbs.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/images/Thumbs.db
--------------------------------------------------------------------------------
/static/images/ad.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/images/ad.jpg
--------------------------------------------------------------------------------
/static/images/backtop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/images/backtop.png
--------------------------------------------------------------------------------
/static/images/default.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/images/default.jpg
--------------------------------------------------------------------------------
/static/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/images/favicon.ico
--------------------------------------------------------------------------------
/static/images/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/images/loading.gif
--------------------------------------------------------------------------------
/static/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/images/logo.png
--------------------------------------------------------------------------------
/static/images/news-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/images/news-icon.png
--------------------------------------------------------------------------------
/static/images/occupying.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/images/occupying.png
--------------------------------------------------------------------------------
/static/images/timg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/images/timg.jpg
--------------------------------------------------------------------------------
/static/js/html5shiv.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @preserve HTML5 Shiv 3.7.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
3 | */
4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.2",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML=" ",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b)}(this,document);
--------------------------------------------------------------------------------
/static/media/article/default.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/media/article/default.jpg
--------------------------------------------------------------------------------
/static/media/article/default1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/media/article/default1.jpg
--------------------------------------------------------------------------------
/static/media/article/default2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/media/article/default2.jpg
--------------------------------------------------------------------------------
/static/media/article/default3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/media/article/default3.jpg
--------------------------------------------------------------------------------
/static/media/article/default4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/media/article/default4.jpg
--------------------------------------------------------------------------------
/static/media/article/default5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/static/media/article/default5.jpg
--------------------------------------------------------------------------------
/t.py:
--------------------------------------------------------------------------------
1 | import random
2 |
3 | print("choice([1, 2, 3, 5, 9]) : ", random.choice([1, 2, 3, 5, 9]))
4 | print("choice('A String') : ", random.choice('A String'))
--------------------------------------------------------------------------------
/templates/.base.html.swp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whisnos/Django_Blog/afc29a8f0422e28936e7eed6324135ba40d3672f/templates/.base.html.swp
--------------------------------------------------------------------------------
/templates/404.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 | {% block title %}
3 | 很抱歉,没有相关内容
4 | {% endblock %}
5 | {% block bigcontain %}
6 |
7 |
8 |
9 |
10 | 很抱歉,没有相关内容 o(╥﹏╥)o
11 |
12 |
24 |
25 |
26 |
27 |
28 | {% endblock %}
29 | {% block mycss %}
30 |
76 | {% endblock %}
77 |
--------------------------------------------------------------------------------
/templates/abc.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Title
7 |
8 |
9 | Hello World1
10 |
11 |
--------------------------------------------------------------------------------
/templates/list.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 | {% block title %}{{ cate_obj.title }}_Debug5_官方网站{% endblock %}
3 | {% block content %}
4 |
5 |
6 |
{{ cate_obj.name }}主题
7 |
8 |
9 | {% for art in all_articles %}
10 |
15 |
19 |
20 | {{ art.add_time }}
21 | {{ art.click_num }}
27 | {{ art.desc }}
28 |
29 | {% endfor %}
30 |
31 | {% include 'pagenation.html' %}
32 |
33 | {% endblock %}
34 | {% block Tag %}
35 |
48 | {% endblock %}
49 | {% block TongJi %}
50 | {% endblock %}
51 |
--------------------------------------------------------------------------------
/templates/none.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 | {% block title %}
3 | 很抱歉,没有相关内容
4 | {% endblock %}
5 | {% block bigcontain %}
6 |
7 |
8 |
9 |
10 | 很抱歉,没有相关内容 o(╥﹏╥)o
11 |
12 |
24 |
25 |
26 |
27 |
28 | {% endblock %}
29 | {% block mycss %}
30 |
76 | {% endblock %}
77 |
--------------------------------------------------------------------------------
/templates/pagenation.html:
--------------------------------------------------------------------------------
1 |
26 |
--------------------------------------------------------------------------------
/templates/te.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Title
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/templates/user_center.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 | {% load staticfiles %}
3 | {% block title %}
4 | 个人中心页面
5 | {% endblock %}
6 | {% block bigcontain %}
7 |
35 | {% endblock %}
36 | {% block js %}
37 |
38 |
39 | {##}
40 | {% endblock %}
--------------------------------------------------------------------------------
/templates/user_login.html:
--------------------------------------------------------------------------------
1 |
2 | {% load staticfiles %}
3 |
4 |
5 |
6 |
7 | {# #}
8 |
9 |
10 |
11 |
12 |
13 |
16 |
17 |
37 |
38 | {#
#}
53 | {{ msg }}
54 | {% for key,err in loginform.errors.items %}
55 | {{ err }}
56 | {% endfor %}
57 |
58 |
59 |
--------------------------------------------------------------------------------
/templates/user_register.html:
--------------------------------------------------------------------------------
1 |
2 | {% load staticfiles %}
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
14 |
15 |
39 | {{ msg }}
40 | {% for key,err in register_form.errors.items %}
41 | {{ err }}
42 | {% endfor %}
43 |
44 |
45 |
--------------------------------------------------------------------------------