http://pastebin.com/m78d7486f
http://docs.djangoproject.com/en/dev/ref/contrib/sites/ i have reffered this link but i have doubt shall i keep Article model's class in both site. On Feb 11, 7:37 pm, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Wed, Feb 11, 2009 at 2:11 AM, Praveen > <praveen.python.pl...@gmail.com>wrote: > > > > > > > > > lets assume all in lowercase > > > expo/expoapp/models.py > > ------------------------ > > > class events(models.Model): > > title = models.CharField(max_length = 50) > > summary = models.CharField(max_length = 100) > > description = models.CharField(max_length = 300) > > event_type = models.ForeignKey(event_type) > > start_date = models.DateField() > > end_date = models.DateField() > > contact_detail = models.CharField(max_length = 100) > > booking_url = models.URLField(max_length = 50) > > venue = models.CharField(max_length = 100, blank = True) > > address = models.CharField(max_length = 100, blank = True) > > > foodie/foodieapp/models.py > > ------------------------ > > > class events(models.Model): > > title = models.CharField(max_length = 50) > > summary = models.CharField(max_length = 100) > > description = models.CharField(max_length = 300) > > event_type = models.ForeignKey(event_type) > > start_date = models.DateField() > > end_date = models.DateField() > > contact_detail = models.CharField(max_length = 100) > > booking_url = models.URLField(max_length = 50) > > venue = models.CharField(max_length = 100, blank = True) > > address = models.CharField(max_length = 100, blank = True) > > > we have same structure events class in both sites. > > Both sites use the same events database, and an events is associated > > with one or more sites > > It lets the site producers edit all events -- on both sites -- in a > > single interface (the Django admin). > > so my doubt is: > > Is it necessary to write events class in both application and if it is > > not then where should i keep events class in which app. if it should > > be in both sites then how may i proceed ahead? > > If i keep events class in both models.py then i will face this problem > > No, that would mean for app a and b you will get tables: a_eventtype > > and b_eventtype. > > Take a look at the sites > framework:http://docs.djangoproject.com/en/dev/ref/contrib/sites/?from=olddocs > > Alex > > -- > "I disapprove of what you say, but I will defend to the death your right to > say it." --Voltaire > "The people's good is the highest law."--Cicero --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---