Skip to content

Commit

Permalink
Add backwards compatibility layer for previous commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
peritus committed Jan 21, 2009
1 parent 0d67e7c commit 7156def
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
12 changes: 12 additions & 0 deletions __init__.py
@@ -0,0 +1,12 @@
# this is for backwards compatability

print "'django_templatecomponents' module name has changed. You should use 'templatecomponents' instead."

import sys, os
sys.path.append(os.path.dirname(__file__))

from templatecomponents import *
import templatecomponents

class views:
pass
1 change: 1 addition & 0 deletions management
Expand Up @@ -2,13 +2,14 @@
import os
from django.core.management.base import BaseCommand
from django.conf import settings
from templatecomponents import templatecomponents, views
import templatecomponents
import templatecomponents.views

class Command(BaseCommand):
def handle(self, **options):
for group, extension in templatecomponents.all().available():
filename = '%s.%s' % (group, extension)
print "Generating %s" % filename
handle = open(os.path.join(settings.MEDIA_ROOT, filename), 'w')
handle.write(views.generate_templatecomponents(None, filename).content)
handle.write(templatecomponents.views.generate_templatecomponents(None, filename).content)
handle.close()
2 changes: 2 additions & 0 deletions views.py
@@ -0,0 +1,2 @@
# this is for backwards compatibility
from templatecomponents.views import generate_templatecomponents

0 comments on commit 7156def

Please sign in to comment.