Skip to content

Commit c01a480

Browse files
nirizrNir Izraeli
authored and
Nir Izraeli
committed
Add a basic template and include registration urls
Signed-off-by: Nir Izraeli <nirizr@gmail.com>
1 parent cc0e392 commit c01a480

File tree

7 files changed

+2893
-4
lines changed

7 files changed

+2893
-4
lines changed

server/accounts/urls.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33

44
urlpatterns = [
55
url(r'^profile/$', views.profile, name='profile'),
6-
url(r'', include('rest_auth.urls')),
6+
url(r'/', include('rest_auth.urls')),
7+
url('^/', include('django.contrib.auth.urls'))
78
]

server/accounts/views.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ def profile(request):
1616
"last_name": request.user.last_name,
1717
"email": request.user.email,
1818
})
19-
return Response(user)
19+
return Response(user, template_name='profile.html')

server/rematch/settings.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
# SECURITY WARNING: don't run with debug turned on in production!
2626
DEBUG = True
2727

28-
2928
# As of django 1.10, allowed hosts are validated in debug as well,
3029
# this disables that and makes sure all hosts are acceptible when
3130
# running in debug mode. for more details see
@@ -41,12 +40,14 @@
4140
# Application definition
4241

4342
INSTALLED_APPS = [
43+
'allauth',
4444
'accounts',
4545
'collab',
4646
'rest_framework',
4747
'rest_framework.authtoken',
4848
'rest_auth',
4949
'djcelery',
50+
'registration',
5051
'django.contrib.admin',
5152
'django.contrib.auth',
5253
'django.contrib.contenttypes',
@@ -72,7 +73,9 @@
7273
TEMPLATES = [
7374
{
7475
'BACKEND': 'django.template.backends.django.DjangoTemplates',
75-
'DIRS': [],
76+
'DIRS': [
77+
os.path.join(BASE_DIR, 'template')
78+
],
7679
'APP_DIRS': True,
7780
'OPTIONS': {
7881
'context_processors': [
@@ -158,10 +161,14 @@
158161

159162
STATIC_URL = '/static/'
160163

164+
STATICFILES_DIRS = [os.path.join(BASE_DIR, "template/static")]
161165

162166
# Celery configuration
163167

164168
CELERY_RESULT_BACKEND = 'djcelery.backends.database:DatabaseBackend'
165169
CELERY_ACCEPT_CONTENT = ['json']
166170
CELERY_TASK_SERIALIZER = 'json'
167171
CELERY_RESULT_SERIALIZER = 'json'
172+
173+
# Django Registration Redux configuration
174+
ACCOUNT_ACTIVATION_DAYS = 1

server/rematch/urls.py

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
urlpatterns = [
2020
url(r'^admin/', admin.site.urls),
2121
url(r'^accounts/', include('accounts.urls')),
22+
url(r'^accounts/', include('registration.backends.default.urls')),
2223
url(r'^collab/', include('collab.urls')),
2324
url(r'^api-auth/', include('rest_framework.urls')),
2425
]

server/template/base.html

+331
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,295 @@
1+
@media (min-width: 980px) {
2+
/*-----*/
3+
.custom-bar-chart {
4+
margin-bottom: 40px;
5+
}
6+
7+
}
8+
9+
@media (min-width: 768px) and (max-width: 979px) {
10+
11+
/*-----*/
12+
.custom-bar-chart {
13+
margin-bottom: 40px;
14+
}
15+
16+
/*chat room*/
17+
18+
19+
}
20+
21+
@media (max-width: 768px) {
22+
23+
.header {
24+
position: absolute;
25+
}
26+
27+
/*sidebar*/
28+
29+
#sidebar {
30+
height: auto;
31+
overflow: hidden;
32+
position: absolute;
33+
width: 100%;
34+
z-index: 1001;
35+
}
36+
37+
38+
/* body container */
39+
#main-content {
40+
margin: 0px!important;
41+
position: none !important;
42+
}
43+
44+
#sidebar > ul > li > a > span {
45+
line-height: 35px;
46+
}
47+
48+
#sidebar > ul > li {
49+
margin: 0 10px 5px 10px;
50+
}
51+
#sidebar > ul > li > a {
52+
height:35px;
53+
line-height:35px;
54+
padding: 0 10px;
55+
text-align: left;
56+
}
57+
#sidebar > ul > li > a i{
58+
/*display: none !important;*/
59+
}
60+
61+
#sidebar ul > li > a .arrow, #sidebar > ul > li > a .arrow.open {
62+
margin-right: 10px;
63+
margin-top: 15px;
64+
}
65+
66+
#sidebar ul > li.active > a .arrow, #sidebar ul > li > a:hover .arrow, #sidebar ul > li > a:focus .arrow,
67+
#sidebar > ul > li.active > a .arrow.open, #sidebar > ul > li > a:hover .arrow.open, #sidebar > ul > li > a:focus .arrow.open{
68+
margin-top: 15px;
69+
}
70+
71+
#sidebar > ul > li > a, #sidebar > ul > li > ul.sub > li {
72+
width: 100%;
73+
}
74+
#sidebar > ul > li > ul.sub > li > a {
75+
background: transparent !important ;
76+
}
77+
#sidebar > ul > li > ul.sub > li > a:hover {
78+
79+
}
80+
81+
82+
/* sidebar */
83+
#sidebar {
84+
margin: 0px !important;
85+
}
86+
87+
/* sidebar collabler */
88+
#sidebar .btn-navbar.collapsed .arrow {
89+
display: none;
90+
}
91+
92+
#sidebar .btn-navbar .arrow {
93+
position: absolute;
94+
right: 35px;
95+
width: 0;
96+
height: 0;
97+
top:48px;
98+
border-bottom: 15px solid #282e36;
99+
border-left: 15px solid transparent;
100+
border-right: 15px solid transparent;
101+
}
102+
103+
104+
/*---------*/
105+
106+
.modal-footer .btn {
107+
margin-bottom: 0px !important;
108+
}
109+
110+
.btn {
111+
margin-bottom: 5px;
112+
}
113+
114+
115+
/* full calendar fix */
116+
.fc-header-right {
117+
left:25px;
118+
position: absolute;
119+
}
120+
121+
.fc-header-left .fc-button {
122+
margin: 0px !important;
123+
top: -10px !important;
124+
}
125+
126+
.fc-header-right .fc-button {
127+
margin: 0px !important;
128+
top: -50px !important;
129+
}
130+
131+
.fc-state-active, .fc-state-active .fc-button-inner, .fc-state-hover, .fc-state-hover .fc-button-inner {
132+
background: none !important;
133+
color: #FFFFFF !important;
134+
}
135+
136+
.fc-state-default, .fc-state-default .fc-button-inner {
137+
background: none !important;
138+
}
139+
140+
.fc-button {
141+
border: none !important;
142+
margin-right: 2px;
143+
}
144+
145+
.fc-view {
146+
top: 0px !important;
147+
}
148+
149+
.fc-button .fc-button-inner {
150+
margin: 0px !important;
151+
padding: 2px !important;
152+
border: none !important;
153+
margin-right: 2px !important;
154+
background-color: #fafafa !important;
155+
background-image: -moz-linear-gradient(top, #fafafa, #efefef) !important;
156+
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fafafa), to(#efefef)) !important;
157+
background-image: -webkit-linear-gradient(top, #fafafa, #efefef) !important;
158+
background-image: -o-linear-gradient(top, #fafafa, #efefef) !important;
159+
background-image: linear-gradient(to bottom, #fafafa, #efefef) !important;
160+
filter: progid:dximagetransform.microsoft.gradient(startColorstr='#fafafa', endColorstr='#efefef', GradientType=0) !important;
161+
-webkit-box-shadow: 0 1px 0px rgba(255, 255, 255, .8) !important;
162+
-moz-box-shadow: 0 1px 0px rgba(255, 255, 255, .8) !important;
163+
box-shadow: 0 1px 0px rgba(255, 255, 255, .8) !important;
164+
-webkit-border-radius: 3px !important;
165+
-moz-border-radius: 3px !important;
166+
border-radius: 3px !important;
167+
color: #646464 !important;
168+
border: 1px solid #ddd !important;
169+
text-shadow: 0 1px 0px rgba(255, 255, 255, .6) !important;
170+
text-align: center;
171+
}
172+
173+
.fc-button.fc-state-disabled .fc-button-inner {
174+
color: #bcbbbb !important;
175+
}
176+
177+
.fc-button.fc-state-active .fc-button-inner {
178+
background-color: #e5e4e4 !important;
179+
background-image: -moz-linear-gradient(top, #e5e4e4, #dddcdc) !important;
180+
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e5e4e4), to(#dddcdc)) !important;
181+
background-image: -webkit-linear-gradient(top, #e5e4e4, #dddcdc) !important;
182+
background-image: -o-linear-gradient(top, #e5e4e4, #dddcdc) !important;
183+
background-image: linear-gradient(to bottom, #e5e4e4, #dddcdc) !important;
184+
filter: progid:dximagetransform.microsoft.gradient(startColorstr='#e5e4e4', endColorstr='#dddcdc', GradientType=0) !important;
185+
}
186+
187+
.fc-content {
188+
margin-top: 50px;
189+
}
190+
191+
.fc-header-title h2 {
192+
line-height: 40px !important;
193+
font-size: 12px !important;
194+
}
195+
196+
.fc-header {
197+
margin-bottom:0px !important;
198+
}
199+
200+
/*--*/
201+
202+
/*.chart-position {*/
203+
/*margin-top: 0px;*/
204+
/*}*/
205+
206+
.stepy-titles li {
207+
margin: 10px 3px;
208+
}
209+
210+
/*-----*/
211+
.custom-bar-chart {
212+
margin-bottom: 40px;
213+
}
214+
215+
/*menu icon plus minus*/
216+
.dcjq-icon {
217+
top: 10px;
218+
}
219+
ul.sidebar-menu li ul.sub li a {
220+
padding: 0;
221+
}
222+
223+
/*---*/
224+
225+
.img-responsive {
226+
width: 100%;
227+
}
228+
229+
}
230+
231+
232+
233+
@media (max-width: 480px) {
234+
235+
.notify-row, .search, .dont-show , .inbox-head .sr-input, .inbox-head .sr-btn{
236+
display: none;
237+
}
238+
239+
#top_menu .nav > li, ul.top-menu > li {
240+
float: right;
241+
}
242+
.hidden-phone {
243+
display: none !important;
244+
}
245+
246+
.chart-position {
247+
margin-top: 0px;
248+
}
249+
250+
.navbar-inverse .navbar-toggle:hover, .navbar-inverse .navbar-toggle:focus {
251+
background-color: #ccc;
252+
border-color:#ccc ;
253+
}
254+
255+
}
256+
257+
@media (max-width:320px) {
258+
.login-social-link a {
259+
padding: 15px 17px !important;
260+
}
261+
262+
.notify-row, .search, .dont-show, .inbox-head .sr-input, .inbox-head .sr-btn {
263+
display: none;
264+
}
265+
266+
#top_menu .nav > li, ul.top-menu > li {
267+
float: right;
268+
}
269+
270+
.hidden-phone {
271+
display: none !important;
272+
}
273+
274+
.chart-position {
275+
margin-top: 0px;
276+
}
277+
278+
.lock-wrapper {
279+
margin: 10% auto;
280+
max-width: 310px;
281+
}
282+
.lock-input {
283+
width: 82%;
284+
}
285+
286+
.cmt-form {
287+
display: inline-block;
288+
width: 75%;
289+
}
290+
291+
}
292+
293+
294+
295+

0 commit comments

Comments
 (0)