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
bookshare
Commits
f9ee1dac
Commit
f9ee1dac
authored
Apr 18, 2015
by
Daniel W Bond
Browse files
added comments to imports in core app
parent
4f5d960f
Changes
5
Hide whitespace changes
Inline
Side-by-side
bookshare/core/admin.py
View file @
f9ee1dac
# core django imports
from
django.contrib
import
admin
# imports from your apps
from
.models
import
Student
,
Course
admin
.
site
.
register
(
Student
)
...
...
bookshare/core/cas_callbacks.py
View file @
f9ee1dac
from
django
.contrib.auth.models
import
User
# core
django import
s
from
django.conf
import
settings
from
.models
import
Student
from
django.contrib.auth.models
import
User
# third-part imports
import
requests
# imports from your apps
from
.models
import
Student
def
pfinfo
(
u_name
):
...
...
bookshare/core/models.py
View file @
f9ee1dac
# core django imports
from
django.db
import
models
from
django.contrib.auth.models
import
User
from
autoslug
import
AutoSlugField
from
model_utils.models
import
TimeStampedModel
#from django.core.validators import RegexValidator
from
django.core.urlresolvers
import
reverse
# third-party imports
from
autoslug
import
AutoSlugField
from
model_utils.models
import
TimeStampedModel
class
Student
(
TimeStampedModel
):
user
=
models
.
OneToOneField
(
User
)
# django user includes username, password, first name, and last name
# implement ratings later
#rating = models.IntegerField(null=True, default=0)
user
=
models
.
OneToOneField
(
User
)
slug
=
AutoSlugField
(
populate_from
=
'user'
,
unique
=
True
)
...
...
bookshare/core/urls.py
View file @
f9ee1dac
# core django imports
from
django.conf.urls
import
patterns
,
url
from
core.views
import
DetailStudent
,
StudentRatings
# imports from your apps
from
.views
import
DetailStudent
,
StudentRatings
urlpatterns
=
patterns
(
''
,
url
(
r
'^(?P<slug>[\w-]+)/$'
,
...
...
bookshare/core/views.py
View file @
f9ee1dac
# core django imports
from
django.views.generic
import
DetailView
# third-party imports
from
braces.views
import
LoginRequiredMixin
from
core
.models
import
Student
# imports from your apps
from
.models
import
Student
from
lookouts.models
import
Lookout
from
trades.models
import
Listing
,
Bid
,
Rating
...
...
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