Updated links to the "project website" and made the READMEs consistent with the docs.
[philo.git] / philo / migrations / __init__.py
1 from south.creator.freezer import prep_for_freeze
2 from django.conf import settings
3 from django.db import models
4
5
6 person_model = getattr(settings, 'PHILO_PERSON_MODULE', 'auth.User')
7
8
9 def freeze_person_model():
10         try:
11                 app_label, model = person_model.split('.')
12         except ValueError:
13                 raise ValueError("Invalid PHILO_PERSON_MODULE definition: %s" % person_model)
14         
15         model = models.get_model(app_label, model.lower())
16         
17         if model is None:
18                 raise ValueError("PHILO_PERSON_MODULE not found: %s" % person_model)
19         
20         return prep_for_freeze(model)
21
22
23 frozen_person = freeze_person_model()