KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Hey i have looked around through some simliar posts here on SO but havent found anything that has solved my problem. I have the following models, from django.db import models class Areas(models.Model): name = models.CharField(max_length = 120) order_in_sidebar_network = models.IntegerField(blank=True, null=True) order_in_section_network = models.IntegerField(blank=True, null=True) def __unicode__ (self): return self.area_name class Meta: verbose_name_plural = "Areas" verbose_name = "Area" class Countries(models.Model): name = models.CharField(max_length = 120, help_text = "The name of the country") area = models.ForeignKey(Areas, verbose_name = 'Area') def __unicode__ (self): return self.name class Meta: verbose_name_plural = "Countries" verbose_name = "Country" ordering = ['name'] class Offices(models.Model): country = models.ForeignKey(Countries, verbose_name = 'Country') name = models.CharField(max_length = 255, help_text = "The name of this office, IE London") main_office = models.BooleanField(default= False, help_text = "Is this office a key location?", verbose_name = "Key Location") address_1 = models.CharField(max_length = 255, null = True, blank = True) address_2 = models.CharField(max_length = 255, null = True, blank = True) address_3 = models.CharField(max_length = 255, null = True, blank = True) city = models.CharField(max_length = 255, null = True, blank = True) postcode = models.CharField(max_length = 20) tel = models.CharField(max_length = 30, null= True, blank = True, help_text = "Optional telephone contact number") mobile = models.CharField(max_length = 30, null= True, blank = True, help_text = "Optional mobile contact number") fax = models.CharField(max_length = 30, null= True, blank = True, help_text = "Optional fax contact number") data_1 = models.CharField(max_length = 255, null
Tags (comma-separated)
Save Edits
Cancel