вот эти таблицы в models.py
class Users(models.Model):
id = models.IntegerField(primary_key=True)
login = models.CharField(max_length=765, blank=True)
password = models.CharField(max_length=765, blank=True)
basic_account = models.IntegerField(null=True, blank=True)
is_blocked = models.IntegerField(null=True, blank=True)
discount_period_id = models.IntegerField(null=True, blank=True)
advance_payment = models.IntegerField(null=True, blank=True)
create_date = models.IntegerField(null=True, blank=True)
last_change_date = models.IntegerField(null=True, blank=True)
who_create = models.IntegerField(null=True, blank=True)
who_change = models.IntegerField(null=True, blank=True)
is_juridical = models.IntegerField(null=True, blank=True)
full_name = models.TextField(blank=True)
juridical_address = models.TextField(blank=True)
actual_address = models.TextField(blank=True)
work_telephone = models.CharField(max_length=765, blank=True)
home_telephone = models.CharField(max_length=765, blank=True)
mobile_telephone = models.CharField(max_length=765, blank=True)
web_page = models.CharField(max_length=765, blank=True)
icq_number = models.CharField(max_length=765, blank=True)
tax_number = models.CharField(max_length=765, blank=True)
kpp_number = models.CharField(max_length=765, blank=True)
bank_id = models.IntegerField(null=True, blank=True)
bank_account = models.CharField(max_length=765, blank=True)
email = models.CharField(max_length=765, blank=True)
house_id = models.IntegerField(null=True, blank=True)
flat_number = models.CharField(max_length=765, blank=True)
entrance = models.CharField(max_length=765, blank=True)
floor = models.CharField(max_length=765, blank=True)
district = models.CharField(max_length=765, blank=True)
building = models.CharField(max_length=765, blank=True)
passport = models.CharField(max_length=765, blank=True)
comments = models.TextField(blank=True)
personal_manager = models.CharField(max_length=765, blank=True)
connect_date = models.IntegerField(null=True, blank=True)
remote_switch_id = models.IntegerField(null=True, blank=True)
port_number = models.IntegerField(null=True, blank=True)
personal_currency_coef = models.FloatField(null=True, blank=True)
binded_currency_code = models.IntegerField(null=True, blank=True)
is_deleted = models.IntegerField(null=True, blank=True)
is_send_invoice = models.IntegerField(null=True, blank=True)
def __unicode__(self):
return self.id
class Meta:
db_table = u'users'
class IpGroups(models.Model):
user = models.ForeignKey(Users)
id = models.IntegerField(primary_key=False)
ip_group_id = models.IntegerField(primary_key=False)
ip = models.IntegerField(null=True, blank=True)
mask = models.IntegerField(null=True, blank=True)
uname = models.CharField(max_length=192, blank=True)
upass = models.CharField(max_length=192, blank=True)
mac = models.CharField(max_length=96, blank=True)
allowed_cid = models.CharField(max_length=96, blank=True)
ip_type = models.IntegerField(null=True, blank=True)
router_id = models.IntegerField(null=True, blank=True)
create_date = models.IntegerField(null=True, blank=True)
delete_date = models.IntegerField(null=True, blank=True)
is_deleted = models.IntegerField(null=True, blank=True)
def __unicode__(self):
return self.id
class Meta:
db_table = u'ip_groups'