From d984b455408d7bb3f7b9cc14f95456376f0f6563 Mon Sep 17 00:00:00 2001 From: leidel Date: Sun, 9 Nov 2008 13:55:20 +0000 Subject: [PATCH] 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 --HG-- extra : convert_revision : 49af8f284937e75d0878354684fb1ce9addb04a0 --- INSTALL | 2 +- README.rst | 4 ++-- dbtemplates/models.py | 9 --------- dbtemplates/sync_templates.py | 17 ----------------- docs/overview.txt | 23 ++++------------------- setup.py | 8 ++++---- 6 files changed, 11 insertions(+), 52 deletions(-) delete mode 100644 dbtemplates/sync_templates.py diff --git a/INSTALL b/INSTALL index ecf0b30..6bcf12e 100644 --- a/INSTALL +++ b/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/ \ No newline at end of file +package, http://www.bitbucket.org/ubernostrum/django-registration/ \ No newline at end of file diff --git a/README.rst b/README.rst index 1965871..cf91262 100644 --- a/README.rst +++ b/README.rst @@ -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/ diff --git a/dbtemplates/models.py b/dbtemplates/models.py index eb115ca..18d3e12 100644 --- a/dbtemplates/models.py +++ b/dbtemplates/models.py @@ -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: diff --git a/dbtemplates/sync_templates.py b/dbtemplates/sync_templates.py deleted file mode 100644 index fd71e60..0000000 --- a/dbtemplates/sync_templates.py +++ /dev/null @@ -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() diff --git a/docs/overview.txt b/docs/overview.txt index 5dac3e2..c1b6777 100644 --- a/docs/overview.txt +++ b/docs/overview.txt @@ -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/ diff --git a/setup.py b/setup.py index 56dfccf..e074b7c 100644 --- a/setup.py +++ b/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', ] )