Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
roomlist
Commits
c0cb4007
Commit
c0cb4007
authored
Jan 29, 2015
by
Daniel W Bond
Browse files
things run again... sorry about that
parent
505b65f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
roomlist/accounts/models.py
View file @
c0cb4007
from
django.db
import
models
from
housing.models
import
User
,
Room
,
Class
from
autoslug
import
AutoSlugField
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
import
hashlib
# Create your models here.
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
):
user
=
models
.
OneToOneField
(
User
)
...
...
roomlist/housing/models.py
View file @
c0cb4007
...
...
@@ -2,8 +2,6 @@ from django.db import models
from
autoslug
import
AutoSlugField
from
model_utils.models
import
TimeStampedModel
from
accounts.models
import
Student
from
localflavor.us.models
import
USStateField
class
Building
(
TimeStampedModel
):
...
...
@@ -46,7 +44,6 @@ class Building(TimeStampedModel):
class
Room
(
TimeStampedModel
):
number
=
models
.
IntegerField
()
floor
=
models
.
IntegerField
()
students
=
models
.
ManyToManyField
(
Student
)
building
=
models
.
ForeignKey
(
'Building'
)
slug
=
AutoSlugField
(
populate_from
=
'number'
,
unique
=
True
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment