在完成我的项目的核心功能之后,是时候从其他次要但重要的事情开始了。
我有类似以下models.py文件:
class Category(models.Model):
name = models.CharField(max_length=30)
class Transaction(models.Model):
name = models.CharField(max_length=30)
description = models.TextField(blank=True)
amount = models.DecimalField(max_digits=12, decimal_places=2)
category = models.ForeignKey(Category, related_name='transacciones', blank=True, null=True)
以下是我想要实现的事情的列表:
用户注册:为每个不同的用户(user.domain.com)创建一个子域。
帐户:每个用户可以创建不同的帐户。例如:用户 A 有一个家庭帐户,类别为汽车和房屋,以及一个工作帐户,类别为工资和奖金。
不同的用户可以使用不同的权限访问同一个子域(现在不是我的优先级)。
我阅读了不同的 django 应用程序来完成这项工作,但我很困惑如何将它们集成在一起以正常工作。我不知道从哪里开始。
Django 注册:http ://bitbucket.org/ubernostrum/django-registration
Django 子域:http://github.com/tkaemming/django-subdomains或http://github.com/agiliq/django-subdomain。
Django 帐户:http ://code.google.com/p/django-accounts/ 。