JourneyJoker/partners/models.py
Klaus-Uwe Mitterer f6b7fab525 Creating custom admin model
Modifying inquiry model and creating offer model
Creating client profile views
Fixing stars and hearts template tags
2021-03-24 07:43:05 +01:00

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)