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
9d0a93be
Commit
9d0a93be
authored
Jan 27, 2015
by
Daniel W Bond
Browse files
pointed urls to new apps
parent
3d8eaeb5
Changes
2
Hide whitespace changes
Inline
Side-by-side
bookshare/core/models.py
View file @
9d0a93be
from
django.db
import
models
from
django.conf
import
settings
#from django.conf import settings
from
django.contrib.auth.models
import
User
from
model_utils.models
import
TimeStampedModel
from
django.core.validators
import
RegexValidator
...
...
@@ -23,9 +24,8 @@ def create_user_profile(sender, instance, created, **kwargs):
if
created
:
Seller
.
objects
.
create
(
user
=
instance
)
post_save
.
connect
(
create_user_profile
,
sender
=
User
)
#
post_save.connect(create_user_profile, sender=User)
# Create your models here.
class
Course
(
TimeStampedModel
):
name
=
models
.
CharField
(
max_length
=
255
)
department
=
models
.
CharField
(
max_length
=
255
)
...
...
bookshare/settings/urls.py
View file @
9d0a93be
...
...
@@ -4,7 +4,7 @@ from django.views.generic import TemplateView
from
django.contrib
import
admin
# FIX SEARCH #
from
trades
.forms
import
StyledSearchForm
#
from
core
.forms import StyledSearchForm
from
haystack.views
import
SearchView
# Uncomment the next two lines to enable the admin:
...
...
@@ -23,9 +23,9 @@ urlpatterns = patterns('',
# home page
url
(
r
'^$'
,
TemplateView
.
as_view
(
template_name
=
'index.html'
),
name
=
'homepage'
),
# user profile page
url
(
r
'^u/(?P<username>\w+)/?$'
,
'
trades
.views.profile'
,
name
=
'profile'
),
url
(
r
'^u/(?P<username>\w+)/?$'
,
'
core
.views.profile'
,
name
=
'profile'
),
# create lookout
url
(
r
'^u/(?P<username>\w+)/create-lookout/?$'
,
'
trade
s.views.create_lookout'
,
name
=
'create_lookout'
),
url
(
r
'^u/(?P<username>\w+)/create-lookout/?$'
,
'
lookout
s.views.create_lookout'
,
name
=
'create_lookout'
),
#### LISTING PAGES ####
# book listing page
...
...
@@ -37,19 +37,19 @@ urlpatterns = patterns('',
# privacy policy
url
(
r
'^privacy/?$'
,
TemplateView
.
as_view
(
template_name
=
'privacy.html'
),
name
=
'privacy'
),
# privacy opt-out (for piwik)
url
(
r
'^privacy/opt-out/?$'
,
'
trades
.views.privacy_opt_out'
,
name
=
'privacy_opt_out'
),
url
(
r
'^privacy/opt-out/?$'
,
'
core
.views.privacy_opt_out'
,
name
=
'privacy_opt_out'
),
#### SEARCH PAGES ####
# points to a SearchView Instance
#url(r'^search/', include('haystack.urls')),
url
(
r
'^search/?'
,
SearchView
(
form_class
=
StyledSearchForm
,
results_per_page
=
20
,
),
name
=
'haystack_search'
,
),
#
url(
#
r'^search/?',
#
SearchView(
#
form_class = StyledSearchForm,
#
results_per_page = 20,
#
),
#
name = 'haystack_search',
#
),
url
(
r
'^login/$'
,
'cas.views.login'
,
name
=
'login'
),
url
(
r
'^logout/$'
,
'cas.views.logout'
,
name
=
'logout'
),
...
...
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