From 0672fa42bf289fb540fc543ea59571f3e4e36a68 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Sat, 19 May 2012 13:08:02 +0200 Subject: [PATCH 01/12] Set env vars before installing and use crate. --- .travis.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 29545e8..5a802ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,12 +3,14 @@ python: # - "2.5" - "2.6" - "2.7" +before_install: + - export PIP_USE_MIRRORS=true + - export PIP_INDEX_URL=https://simple.crate.io/ + - export DJANGO_SETTINGS_MODULE=dbtemplates.test_settings install: - - pip install . + - pip install -e . - pip install -r requirements/tests.txt Django==$DJANGO before_script: - - export PIP_USE_MIRRORS=true - - export DJANGO_SETTINGS_MODULE=dbtemplates.test_settings - flake8 dbtemplates --ignore=E501 script: - django-admin.py test dbtemplates From 6d356db2ef070b32fc35566d4804cf4091d5abc4 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Sat, 19 May 2012 13:10:03 +0200 Subject: [PATCH 02/12] Trying 2.5 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5a802ee..603b8ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: python python: -# - "2.5" + - "2.5" - "2.6" - "2.7" before_install: From c36d649e4d0412a3cfc38e4c25d21364d4878e54 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Sat, 19 May 2012 13:27:09 +0200 Subject: [PATCH 03/12] Disabled Python 2.5 again as flake8 doesn't support it at the moment :( --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 603b8ae..8860170 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: python python: - - "2.5" + # - "2.5" - "2.6" - "2.7" before_install: From 1c520b0fad303519a5c7cee989e2481124207c97 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Sat, 19 May 2012 19:24:17 +0200 Subject: [PATCH 04/12] Re-enabled 2.5 now that flake8 works on it again. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8860170..603b8ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: python python: - # - "2.5" + - "2.5" - "2.6" - "2.7" before_install: From f7378df802140983dc3011a66ef4351e4283dc1d Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Sat, 19 May 2012 21:40:35 +0200 Subject: [PATCH 05/12] Use __isnull for querying a non-site specific template. Refs #33. --- dbtemplates/loader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbtemplates/loader.py b/dbtemplates/loader.py index a467305..118de33 100644 --- a/dbtemplates/loader.py +++ b/dbtemplates/loader.py @@ -66,7 +66,7 @@ class Loader(BaseLoader): except (Template.MultipleObjectsReturned, Template.DoesNotExist): try: return self.load_and_store_template(template_name, cache_key, - site, sites__in=[]) + site, sites__isnull=True) except (Template.MultipleObjectsReturned, Template.DoesNotExist): pass From d2f595ce821264acad1ed8f81688533d276338e9 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Wed, 23 May 2012 23:50:32 +0200 Subject: [PATCH 06/12] Moved to django-discover-runner. --- .travis.yml | 3 ++- dbtemplates/test_settings.py | 3 +-- docs/changelog.txt | 8 ++++++++ requirements/tests.txt | 2 +- setup.cfg | 4 ---- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 603b8ae..69dfce6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,8 @@ install: before_script: - flake8 dbtemplates --ignore=E501 script: - - django-admin.py test dbtemplates + - coverage run --branch --source=dbtemplates `which django-admin.py` test dbtemplates + - coverage report --omit="dbtemplates/test*,dbtemplates/migrations*" env: - DJANGO=1.3.1 - DJANGO=1.4 diff --git a/dbtemplates/test_settings.py b/dbtemplates/test_settings.py index 6ce4617..a948cba 100644 --- a/dbtemplates/test_settings.py +++ b/dbtemplates/test_settings.py @@ -21,7 +21,6 @@ INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'dbtemplates', - 'django_nose', ] TEMPLATE_LOADERS = ( @@ -30,4 +29,4 @@ TEMPLATE_LOADERS = ( 'dbtemplates.loader.Loader', ) -TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' +TEST_RUNNER = 'discover_runner.DiscoverRunner' diff --git a/docs/changelog.txt b/docs/changelog.txt index b324766..43a9f28 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -1,6 +1,14 @@ Changelog ========= +v1.3.1 (2012-05-23) +------------------- + +* Minor release to move away from nose again and use own + `django-discover-runner`_. + +.. _`django-discover-runner`: http://pypi.python.org/pypi/django-discover-runner + v1.3 (2012-05-07) ----------------- diff --git a/requirements/tests.txt b/requirements/tests.txt index 68eba17..b29024e 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -1,3 +1,3 @@ flake8 -django-nose +django-discover-runner coverage diff --git a/setup.cfg b/setup.cfg index 78ce9b8..cf6fb59 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,7 +11,3 @@ upload-dir = docs/_build/html [upload_sphinx] upload-dir = docs/_build/html - -[nosetests] -with-coverage=1 -cover-package=dbtemplates From 4b024de9650f47e8d9a511054c8385f6771ab0d1 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Thu, 4 Apr 2013 11:33:00 +0200 Subject: [PATCH 07/12] Minor cosmetic changes to please flake8. --- dbtemplates/admin.py | 11 ++-- dbtemplates/conf.py | 6 ++- .../commands/create_error_templates.py | 3 +- .../management/commands/sync_templates.py | 52 ++++++++++--------- dbtemplates/test_cases.py | 8 +-- dbtemplates/utils/template.py | 2 +- 6 files changed, 44 insertions(+), 38 deletions(-) diff --git a/dbtemplates/admin.py b/dbtemplates/admin.py index 9505d26..4b12095 100644 --- a/dbtemplates/admin.py +++ b/dbtemplates/admin.py @@ -6,8 +6,8 @@ from django.utils.translation import ungettext, ugettext_lazy as _ from django.utils.safestring import mark_safe from dbtemplates.conf import settings -from dbtemplates.models import (Template, - remove_cached_template, add_template_to_cache) +from dbtemplates.models import (Template, remove_cached_template, + add_template_to_cache) from dbtemplates.utils.template import check_template_syntax # Check if django-reversion is installed and use reversions' VersionAdmin @@ -55,14 +55,15 @@ else: if settings.DBTEMPLATES_AUTO_POPULATE_CONTENT: content_help_text = _("Leaving this empty causes Django to look for a " - "template with the given name and populate this field with its " - "content.") + "template with the given name and populate this " + "field with its content.") else: content_help_text = "" if settings.DBTEMPLATES_USE_CODEMIRROR and settings.DBTEMPLATES_USE_TINYMCE: raise ImproperlyConfigured("You may use either CodeMirror or TinyMCE " - "with dbtemplates, not both. Please disable one of them.") + "with dbtemplates, not both. Please disable " + "one of them.") if settings.DBTEMPLATES_USE_TINYMCE: from tinymce.widgets import AdminTinyMCE diff --git a/dbtemplates/conf.py b/dbtemplates/conf.py index 0bcf4ec..eb401fb 100644 --- a/dbtemplates/conf.py +++ b/dbtemplates/conf.py @@ -39,11 +39,13 @@ class DbTemplatesConf(AppConf): def configure_use_reversion(self, value): if value and 'reversion' not in settings.INSTALLED_APPS: raise ImproperlyConfigured("Please add 'reversion' to your " - "INSTALLED_APPS setting to make use of it in dbtemplates.") + "INSTALLED_APPS setting to make " + "use of it in dbtemplates.") return value def configure_use_tinymce(self, value): if value and 'tinymce' not in settings.INSTALLED_APPS: raise ImproperlyConfigured("Please add 'tinymce' to your " - "INSTALLED_APPS setting to make use of it in dbtemplates.") + "INSTALLED_APPS setting to make " + "use of it in dbtemplates.") return value diff --git a/dbtemplates/management/commands/create_error_templates.py b/dbtemplates/management/commands/create_error_templates.py index 37c6167..cbaa1d5 100644 --- a/dbtemplates/management/commands/create_error_templates.py +++ b/dbtemplates/management/commands/create_error_templates.py @@ -30,7 +30,8 @@ class Command(NoArgsCommand): help = "Creates the default error templates as database template objects." option_list = NoArgsCommand.option_list + ( make_option("-f", "--force", action="store_true", dest="force", - default=False, help="overwrite existing database templates"),) + default=False, + help="overwrite existing database templates"),) def handle_noargs(self, **options): force = options.get('force') diff --git a/dbtemplates/management/commands/sync_templates.py b/dbtemplates/management/commands/sync_templates.py index cffa7db..33feb52 100644 --- a/dbtemplates/management/commands/sync_templates.py +++ b/dbtemplates/management/commands/sync_templates.py @@ -15,20 +15,25 @@ ALWAYS_ASK, FILES_TO_DATABASE, DATABASE_TO_FILES = ('0', '1', '2') class Command(NoArgsCommand): help = "Syncs file system templates with the database bidirectionally." option_list = NoArgsCommand.option_list + ( - make_option("-e", "--ext", dest="ext", action="store", default="html", - help="extension of the files you want to sync with the database " - "[default: %default]"), - make_option("-f", "--force", action="store_true", dest="force", - default=False, help="overwrite existing database templates"), - make_option("-o", "--overwrite", action="store", dest="overwrite", - default='0', help="'0' - ask always, '1' - overwrite database " - "templates from template files, '2' - overwrite template " - "files from database templates"), - make_option("-a", "--app-first", action="store_true", dest="app_first", - default=False, help="look for templates in applications " - "directories before project templates"), - make_option("-d", "--delete", action="store_true", dest="delete", - default=False, help="Delete templates after syncing")) + make_option("-e", "--ext", + dest="ext", action="store", default="html", + help="extension of the files you want to " + "sync with the database [default: %default]"), + make_option("-f", "--force", + action="store_true", dest="force", default=False, + help="overwrite existing database templates"), + make_option("-o", "--overwrite", + action="store", dest="overwrite", default='0', + help="'0' - ask always, '1' - overwrite database " + "templates from template files, '2' - overwrite " + "template files from database templates"), + make_option("-a", "--app-first", + action="store_true", dest="app_first", default=False, + help="look for templates in applications " + "directories before project templates"), + make_option("-d", "--delete", + action="store_true", dest="delete", default=False, + help="Delete templates after syncing")) def handle_noargs(self, **options): extension = options.get('ext') @@ -71,23 +76,21 @@ class Command(NoArgsCommand): confirm = raw_input( "\nA '%s' template doesn't exist in the " "database.\nCreate it with '%s'?" - " (y/[n]): """ % (name, path)) + " (y/[n]): """ % (name, path)) if force or confirm.lower().startswith('y'): t = Template(name=name, - content=codecs.open(path, "r").read()) + content=codecs.open(path, "r").read()) t.save() t.sites.add(site) else: while 1: if overwrite == ALWAYS_ASK: confirm = raw_input( - "\n%s exists in the database.\n" - "(1) Overwrite %s with '%s'\n" - "(2) Overwrite '%s' with %s\n" - "Type 1 or 2 or press to skip: " - % (t.__repr__(), - t.__repr__(), path, - path, t.__repr__())) + "\n%(template)s exists in the database.\n" + "(1) Overwrite %(template)s with '%(path)s'\n" + "(2) Overwrite '%(path)s' with %(template)s\n" + "Type 1 or 2 or press to skip: " % + {'template': t.__repr__(), 'path': path}) else: confirm = overwrite if confirm in ('', FILES_TO_DATABASE, @@ -100,8 +103,7 @@ class Command(NoArgsCommand): try: os.remove(path) except OSError: - raise CommandError( - u"Couldn't delete %s" % path) + raise CommandError(u"Couldn't delete %s" % path) elif confirm == DATABASE_TO_FILES: f = codecs.open(path, 'w', 'utf-8') try: diff --git a/dbtemplates/test_cases.py b/dbtemplates/test_cases.py index 42b2a31..1878b29 100644 --- a/dbtemplates/test_cases.py +++ b/dbtemplates/test_cases.py @@ -108,16 +108,16 @@ class DbTemplatesTestCase(TestCase): settings.TEMPLATE_DIRS = (temp_template_dir,) self.assertFalse( Template.objects.filter(name='temp_test.html').exists()) - call_command('sync_templates', - force=True, verbosity=0, overwrite=FILES_TO_DATABASE) + call_command('sync_templates', force=True, + verbosity=0, overwrite=FILES_TO_DATABASE) self.assertTrue( Template.objects.filter(name='temp_test.html').exists()) t = Template.objects.get(name='temp_test.html') t.content = 'temp test modified' t.save() - call_command('sync_templates', - force=True, verbosity=0, overwrite=DATABASE_TO_FILES) + call_command('sync_templates', force=True, + verbosity=0, overwrite=DATABASE_TO_FILES) self.assertTrue( 'modified' in codecs.open(temp_template_path).read()) diff --git a/dbtemplates/utils/template.py b/dbtemplates/utils/template.py index 679a7d9..93bc1fd 100644 --- a/dbtemplates/utils/template.py +++ b/dbtemplates/utils/template.py @@ -1,6 +1,6 @@ from django import VERSION from django.template import (Template, TemplateDoesNotExist, - TemplateSyntaxError) + TemplateSyntaxError) from django.utils.importlib import import_module From b051161aea5097280a05a45627cfaedfe49bb3ee Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Thu, 4 Apr 2013 11:34:18 +0200 Subject: [PATCH 08/12] Test on Django 1.5.X, too. --- .travis.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 69dfce6..743312d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,6 @@ python: - "2.6" - "2.7" before_install: - - export PIP_USE_MIRRORS=true - - export PIP_INDEX_URL=https://simple.crate.io/ - export DJANGO_SETTINGS_MODULE=dbtemplates.test_settings install: - pip install -e . @@ -16,8 +14,9 @@ script: - coverage run --branch --source=dbtemplates `which django-admin.py` test dbtemplates - coverage report --omit="dbtemplates/test*,dbtemplates/migrations*" env: - - DJANGO=1.3.1 - - DJANGO=1.4 + - DJANGO=1.3.7 + - DJANGO=1.4.5 + - DJANGO=1.5.1 branches: only: - develop From f668370eee24f12636d13be9696b0b231848fc47 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Thu, 4 Apr 2013 11:41:38 +0200 Subject: [PATCH 09/12] Drop support for Python 2.5. --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 743312d..71163ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: python python: - - "2.5" - "2.6" - "2.7" before_install: From 12ffd84380a1f3ea02cb199d72436d7926d79fac Mon Sep 17 00:00:00 2001 From: Wasil W Sergejczyk Date: Tue, 30 Jul 2013 14:35:07 +0600 Subject: [PATCH 10/12] add Russian locale --- dbtemplates/locale/ru/LC_MESSAGES/django.mo | Bin 0 -> 2837 bytes dbtemplates/locale/ru/LC_MESSAGES/django.po | 107 ++++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 dbtemplates/locale/ru/LC_MESSAGES/django.mo create mode 100644 dbtemplates/locale/ru/LC_MESSAGES/django.po diff --git a/dbtemplates/locale/ru/LC_MESSAGES/django.mo b/dbtemplates/locale/ru/LC_MESSAGES/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..82f769ef15b93418388f55c33a214a3b365c95ec GIT binary patch literal 2837 zcmb_dU2NM_6u!VVAp8$_00BBf>ee!xI_m^e+H4DrJEA3R>9UFOW|EuKn`2k8Q&w#f zT`RPr4JHs{5@H}Eo>5m8)@@yYSDvoLGkbvto)B+{H@@REY0`!b0avj<`}+KR=R3#F zt*x6b2&~6(JcHv3j%RUX?!pP{JK%l5?}0_&55Qx<*xf=r3H%gzKX3`S4Y&f_4!i}d z0yp0yL@)3pa3AnXpbh*5crWm^O+q{bJPLdeSOVfFe4I7|XMmjlZ6N1a0R9RN9|E7o z{mCstoB@6eJP&*hL3abc0&-111786C0Zaj(N3b7(CEy5f5JAhpIp9U$@4zR33lSln z0$u|40Ivcc1^xuYPyB`x^ZgU}FmTHQLV#9laZQ|`YiKUEZ(r;OHvy@_wH0TS73#t{ zAW>NJBS6;RF&ro})Q)qGxhUa@N1Gh{i_ zrfn6lUx=>R_w?r7s^j++T3+5A-8#ZnX_-2T=HGAUH3Q@-3pm4$40R}R4-Z6(jmtzOER4T zHRWgoELzfD6~^*C%Dav)9X~22TC%N@3$^P)FV|{jr~r)}jEaqWA-S$PuD8XUK-ZCE zI%A|(y_mY!=WUGJ#dgEA#HpvZ6=1bIk*`S8w_JyK+=OjNR(6VD%DoL-7#k1+1 zZ;Xu^kql^Sxr*s{7%;aIr;)>%42>qU1`Qcm2)I9)N=+Dt4()}hQ>tPFwVX7|ampk| z4;*I7Lz&Ee+lsoC(wYsZX46??t-e@Pj|?~FLd(refwwPD`2Bc=EoYE*t9a5+9L|ks zd)DljR#8?o!^yh^jBlLwylMH7al2YEZEeJ@l)X4PQ{k1IEN4H8v8)>*Guu zY7YLL%RtMx*XfDriA0RHZzsOgw==%EkAbUJma;Q|}I z4?Z#Y?CKkg2=$Swt8a1KP&d_bFsEwjMsN<-b)h~9-U}8;UBS+I3KrC&x(u^A9xhTa zADo6?4co9KRS(X<{av`BTxP^7DSR1h1M}3C;_3iOF&hwZg$}^9@y>h5DXG zh(<=_X=@IGo<*O~J8l4&oDJUTWB|TGT>!TmYMI!aTgKrQQApT#Lclq0WkbFiAy7@N ztDZxvl^2_zWOX^1=e)rjanb5J7s-0G4GY9ULY7Ni2|j4BQ!B9NqQe|~LminwsEtQW zeGOg+Uk`K5s&CktiD1+&wl(}eNb|)V8c3+E9?XWlyAGWivvmhA9`>$&m*C%+AJ+3) z*ZG<6P!X?O+xH!l^N#{>yIJ=6;C;NC%Uy<|<8NcV#1OnDpm{jCjRsuhTXb!i=NFR_ pP83pvjl|3>qmRwL!ixRzxxnU9!wnm7Syb0BCuc?boOIma*, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-07-30 14:03+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" +"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" + +#: admin.py:57 +msgid "" +"Leaving this empty causes Django to look for a template with the given name " +"and populate this field with its content." +msgstr "Если вы оставите это поле незаполненным, Django будет искать шаблон с введённым именем и заполнит поле его содержимым." + +#: admin.py:92 +msgid "Advanced" +msgstr "Дополнительно" + +#: admin.py:95 +msgid "Date/time" +msgstr "Дата/время" + +#: admin.py:112 +#, python-format +msgid "Cache of one template successfully invalidated." +msgid_plural "Cache of %(count)d templates successfully invalidated." +msgstr[0] "Кэш для шаблона успешно очищен." +msgstr[1] "Кэш для шаблонов (%(count)d шт.) успешно очищен." + +#: admin.py:116 +msgid "Invalidate cache of selected templates" +msgstr "Очистить кэш для выделенных шаблонов" + +#: admin.py:124 +#, python-format +msgid "Cache successfully repopulated with one template." +msgid_plural "Cache successfully repopulated with %(count)d templates." +msgstr[0] "Кэш для шаблона успешно заполнен." +msgstr[1] "Кэш для шаблонов (%(count)d шт.) успешно заполнен." + +#: admin.py:128 +msgid "Repopulate cache with selected templates" +msgstr "Заполнить кэш для выделенных шаблонов" + +#: admin.py:140 +#, python-format +msgid "Template syntax check FAILED for %(names)s." +msgid_plural "Template syntax check FAILED for %(count)d templates: %(names)s." +msgstr[0] "Неверный синтаксис у шаблона %(names)s." +msgstr[1] "Неверный синтаксис у следующих шаблонов: %(names)s." + +#: admin.py:148 +#, python-format +msgid "Template syntax OK." +msgid_plural "Template syntax OK for %(count)d templates." +msgstr[0] "Синтаксис шаблона корректен." +msgstr[1] "Синтаксис шаблонов корректен." + +#: admin.py:151 +msgid "Check template syntax" +msgstr "Проверить синтаксис шаблона" + +#: admin.py:155 models.py:29 +msgid "sites" +msgstr "сайты" + +#: models.py:26 +msgid "name" +msgstr "название" + +#: models.py:27 +msgid "Example: 'flatpages/default.html'" +msgstr "Например: 'flatpages/default.html'" + +#: models.py:28 +msgid "content" +msgstr "содержимое" + +#: models.py:31 +msgid "creation date" +msgstr "дата создания" + +#: models.py:33 +msgid "last changed" +msgstr "последнее изменение" + +#: models.py:41 +msgid "template" +msgstr "шаблон" + +#: models.py:42 +msgid "templates" +msgstr "шаблоны" From bfd7186db0914f6ba994dd871f3cdd0755a410ee Mon Sep 17 00:00:00 2001 From: Jannis Date: Wed, 6 Nov 2013 14:35:34 +0100 Subject: [PATCH 11/12] Fix URL to django-reversion doc. Fix URL of django-reversion's documentation. Apparently, django-reversion uses Readthedocs instead of GitHub's wiki now. --- docs/advanced.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/advanced.txt b/docs/advanced.txt index dc62866..273ab03 100644 --- a/docs/advanced.txt +++ b/docs/advanced.txt @@ -62,7 +62,7 @@ Short installation howto 4. Set ``DBTEMPLATES_USE_REVERSION`` setting to ``True`` .. _django-reversion: https://github.com/etianen/django-reversion -.. _django-reversion's documentation: https://github.com/etianen/django-reversion/wiki/getting-started +.. _django-reversion's documentation: http://django-reversion.readthedocs.org/en/latest/ .. _commands: From 4352fb639e3fecafd661d964227739e9e70c5adb Mon Sep 17 00:00:00 2001 From: Sutrisno Efendi Date: Tue, 23 Sep 2014 15:19:16 +0700 Subject: [PATCH 12/12] Include fields to class Meta --- dbtemplates/admin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dbtemplates/admin.py b/dbtemplates/admin.py index 4b12095..0a74237 100644 --- a/dbtemplates/admin.py +++ b/dbtemplates/admin.py @@ -80,6 +80,7 @@ class TemplateAdminForm(forms.ModelForm): class Meta: model = Template + fields = ('name', 'content', 'sites', 'creation_date', 'last_changed') class TemplateAdmin(TemplateModelAdmin):