Commit c0cb4007 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

things run again... sorry about that

parent 505b65f3
from django.db import models from django.db import models
from housing.models import User, Room, Class
from autoslug import AutoSlugField
from model_utils.models import TimeStampedModel from model_utils.models import TimeStampedModel
from django.contrib.auth.models import User
from autoslug import AutoSlugField
from housing.models import Building, Room, Class
from allauth.socialaccount.models import SocialAccount from allauth.socialaccount.models import SocialAccount
import hashlib import hashlib
# Create your models here. # Create your models here.
class Major(TimeStampedModel): class Major(TimeStampedModel):
major_name = models.CharField(max_length = 30) name = models.CharField(max_length = 50)
# I believe the longest is "Government and International Politics"
class Student(TimeStampedModel): class Student(TimeStampedModel):
user = models.OneToOneField(User) user = models.OneToOneField(User)
......
...@@ -2,8 +2,6 @@ from django.db import models ...@@ -2,8 +2,6 @@ from django.db import models
from autoslug import AutoSlugField from autoslug import AutoSlugField
from model_utils.models import TimeStampedModel from model_utils.models import TimeStampedModel
from accounts.models import Student
from localflavor.us.models import USStateField from localflavor.us.models import USStateField
class Building(TimeStampedModel): class Building(TimeStampedModel):
...@@ -46,7 +44,6 @@ class Building(TimeStampedModel): ...@@ -46,7 +44,6 @@ class Building(TimeStampedModel):
class Room(TimeStampedModel): class Room(TimeStampedModel):
number = models.IntegerField() number = models.IntegerField()
floor = models.IntegerField() floor = models.IntegerField()
students = models.ManyToManyField(Student)
building = models.ForeignKey('Building') building = models.ForeignKey('Building')
slug = AutoSlugField(populate_from='number', unique=True) slug = AutoSlugField(populate_from='number', unique=True)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment