Update init files to register more app with the app registre app as well as the backup app

This commit is contained in:
Roberto Rosario
2012-08-17 03:33:39 -04:00
parent 29654c5f99
commit c9811c6a76
17 changed files with 170 additions and 79 deletions

View File

@@ -2,11 +2,14 @@ from __future__ import absolute_import
from south.signals import post_migrate
from project_tools.api import register_tool
from django.dispatch import receiver
from django.db.utils import DatabaseError
from django.db import transaction
from django.utils.translation import ugettext_lazy as _
from backups.api import AppBackup, ModelBackup
from app_registry import register_app, UnableToRegister
from project_tools.api import register_tool
from .links import installation_details
from .models import Installation
@@ -35,3 +38,10 @@ def check_first_run():
register_tool(installation_details)
check_first_run()
try:
app = register_app('installation', _(u'Installation'))
except UnableToRegister:
pass
else:
AppBackup(app, [ModelBackup()])