mirror of
https://github.com/jazzband/django-dbtemplates.git
synced 2026-03-16 22:20:28 +00:00
Removed old sync_templates.py script, use the django-admin.py sync_templates please. Removes unneeded code that registers the model with django-reversion manually. Updated docs after move from Google Code to Bitbucket.
git-svn-id: https://django-dbtemplates.googlecode.com/svn/trunk@65 cfb8ba98-e953-0410-9cff-959ffddf5974 committer: leidel <leidel@cfb8ba98-e953-0410-9cff-959ffddf5974> --HG-- extra : convert_revision : 49af8f284937e75d0878354684fb1ce9addb04a0
This commit is contained in:
parent
74482aca1e
commit
d984b45540
6 changed files with 11 additions and 52 deletions
2
INSTALL
2
INSTALL
|
|
@ -12,4 +12,4 @@ Subversion checkout of Django. You can obtain Python from
|
|||
http://www.python.org/ and Django from http://www.djangoproject.com/.
|
||||
|
||||
This install notice was bluntly stolen from James Bennett's registration
|
||||
package, http://code.google.com/p/django-registration/
|
||||
package, http://www.bitbucket.org/ubernostrum/django-registration/
|
||||
|
|
@ -50,6 +50,6 @@ How to use it in your own Django application
|
|||
Support
|
||||
=======
|
||||
|
||||
Please leave your questions and messages on the designated Google Code site:
|
||||
Please leave your questions and messages on the designated site:
|
||||
|
||||
http://code.google.com/p/django-dbtemplates/
|
||||
http://www.bitbucket.org/jezdez/django-dbtemplates/issues/
|
||||
|
|
|
|||
|
|
@ -42,15 +42,6 @@ class Template(models.Model):
|
|||
pass
|
||||
super(Template, self).save(*args, **kwargs)
|
||||
|
||||
# Check if django-reversion is installed and register the model with it if yes
|
||||
try:
|
||||
models.get_app('reversion')
|
||||
except ImproperlyConfigured:
|
||||
pass
|
||||
else:
|
||||
import reversion
|
||||
reversion.register(Template)
|
||||
|
||||
def get_cache_backend():
|
||||
path = getattr(settings, 'DBTEMPLATES_CACHE_BACKEND', False)
|
||||
if path:
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
"""This is just for backwards compatiblity"""
|
||||
from optparse import OptionParser
|
||||
from django.core.management import call_command
|
||||
|
||||
def main():
|
||||
parser = OptionParser()
|
||||
parser.add_option("-e", "--ext", dest="ext", action="store", type="string",
|
||||
help="file extension of the files you want to sync [default: %default]",
|
||||
default="html")
|
||||
parser.add_option("-f", "--force", action="store_true", dest="force",
|
||||
default=False, help="overwrite existing database templates")
|
||||
opts, args = parser.parse_args()
|
||||
|
||||
call_command('sync_templates', **{'ext': opts.ext, 'force': opts.force})
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
@ -140,7 +140,7 @@ follwing three reuqired methods:
|
|||
|
||||
Please see also the `source of the default backends`_ to see how it works.
|
||||
|
||||
.. _source of the default backends: http://code.google.com/p/django-dbtemplates/source/browse/trunk/dbtemplates/cache.py
|
||||
.. _source of the default backends: http://www.bitbucket.org/jezdez/django-dbtemplates/src/tip/dbtemplates/cache.py
|
||||
|
||||
Versionizing your templates
|
||||
===========================
|
||||
|
|
@ -159,24 +159,9 @@ about how it works. ``dbtemplates`` automatically recognizes if
|
|||
Short installation howto
|
||||
------------------------
|
||||
|
||||
1. Get the source from the `django-reversion`_ project site.
|
||||
2. Edit the settings.py of your Django project:
|
||||
|
||||
* Add ``reversion`` to the ``INSTALLED_APPS`` of your django site
|
||||
|
||||
* Add ``reversion.middleware.RevisionMiddleware`` to the end of the
|
||||
``MIDDLEWARE_CLASSES`` list.
|
||||
|
||||
It should look something like this::
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.cache.CacheMiddleware',
|
||||
# ..
|
||||
'reversion.middleware.RevisionMiddleware',
|
||||
)
|
||||
|
||||
1. Get the source from the `django-reversion`_ project site and put it
|
||||
somewhere on your `PYTHONPATH`.
|
||||
2. Add ``reversion`` to the ``INSTALLED_APPS`` setting of your Django project
|
||||
3. Sync your database with ``python manage.py syncdb``
|
||||
|
||||
.. _django-reversion: http://code.google.com/p/django-reversion/
|
||||
|
|
|
|||
8
setup.py
8
setup.py
|
|
@ -2,13 +2,13 @@ from distutils.core import setup
|
|||
|
||||
setup(
|
||||
name='django-dbtemplates',
|
||||
version='0.5.0',
|
||||
version='0.5.1',
|
||||
description='Template loader for database stored templates',
|
||||
long_description=open('README.rst').read(),
|
||||
author='Jannis Leidel',
|
||||
author_email='jannis@leidel.info',
|
||||
url='http://code.google.com/p/django-dbtemplates/',
|
||||
scripts=['dbtemplates/sync_templates.py',],
|
||||
url='http://www.bitbucket.org/jezdez/django-dbtemplates/wiki/',
|
||||
download_url='http://www.bitbucket.org/jezdez/django-dbtemplates/get/v0.5.1.gz',
|
||||
packages=[
|
||||
'dbtemplates',
|
||||
'dbtemplates.management',
|
||||
|
|
@ -22,6 +22,6 @@ setup(
|
|||
'License :: OSI Approved :: BSD License',
|
||||
'Operating System :: OS Independent',
|
||||
'Programming Language :: Python',
|
||||
'Topic :: Utilities'
|
||||
'Framework :: Django',
|
||||
]
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue