2014-01-05 05:49:35 +08:00
|
|
|
from django.apps import AppConfig
|
2014-11-25 20:35:39 +08:00
|
|
|
from django.db.models.signals import post_migrate
|
2014-01-05 05:49:35 +08:00
|
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
|
2014-11-25 20:35:39 +08:00
|
|
|
from .management import create_default_site
|
|
|
|
|
2014-01-05 05:49:35 +08:00
|
|
|
|
|
|
|
class SitesConfig(AppConfig):
|
|
|
|
name = 'django.contrib.sites'
|
2014-03-06 23:03:25 +08:00
|
|
|
verbose_name = _("Sites")
|
2014-11-25 20:35:39 +08:00
|
|
|
|
|
|
|
def ready(self):
|
|
|
|
post_migrate.connect(create_default_site, sender=self)
|