Klaus-Uwe Mitterer
f6b7fab525
Modifying inquiry model and creating offer model Creating client profile views Fixing stars and hearts template tags
23 lines
No EOL
754 B
Python
23 lines
No EOL
754 B
Python
from django.contrib.gis.db import models
|
|
|
|
from localauth.models import User, Profile
|
|
|
|
from django_countries.fields import CountryField
|
|
|
|
class PartnerProfile(Profile):
|
|
pass
|
|
|
|
class Establishment(models.Model):
|
|
owner = models.ForeignKey(PartnerProfile, models.CASCADE)
|
|
name = models.CharField(max_length=64)
|
|
stars = models.IntegerField(null=True, blank=True)
|
|
street = models.CharField(max_length=64)
|
|
city = models.CharField(max_length=64)
|
|
zip = models.CharField(max_length=16)
|
|
state = models.CharField(max_length=64)
|
|
country = CountryField()
|
|
coords = models.PointField()
|
|
|
|
class RoomCategory(models.Model):
|
|
establishment = models.ForeignKey(Establishment, models.CASCADE)
|
|
name = models.CharField(max_length=64) |