Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
BeHub-web
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dominik Rosiek
BeHub-web
Commits
d4fa7172
Commit
d4fa7172
authored
Nov 21, 2015
by
Rafal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add front
parent
42b4f077
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
407 additions
and
11 deletions
+407
-11
urls.py
BeHub/BeHub/urls.py
+3
-1
models.py
BeHub/Hub/models.py
+11
-0
footer.css
BeHub/Hub/static/css/footer.css
+44
-0
register.css
BeHub/Hub/static/css/register.css
+0
-0
style.css
BeHub/Hub/static/css/style.css
+22
-0
the-big-picture.css
BeHub/Hub/static/css/the-big-picture.css
+20
-0
background_main_page.png
BeHub/Hub/static/img/background_main_page.png
+0
-0
login.jpg
BeHub/Hub/static/img/login.jpg
+0
-0
invalid_login.html
BeHub/Hub/templates/page/content/invalid_login.html
+8
-0
login.html
BeHub/Hub/templates/page/content/login.html
+5
-8
main_page.html
BeHub/Hub/templates/page/content/main_page.html
+13
-0
register.html
BeHub/Hub/templates/page/content/register.html
+62
-0
base.html
BeHub/Hub/templates/page/default/base.html
+32
-0
footer.html
BeHub/Hub/templates/page/default/footer.html
+21
-0
main_bar.html
BeHub/Hub/templates/page/default/main_bar.html
+19
-0
dashboard.html
BeHub/Hub/templates/user_panel/content/dashboard.html
+24
-0
base.html
BeHub/Hub/templates/user_panel/default/base.html
+44
-0
footer.html
BeHub/Hub/templates/user_panel/default/footer.html
+21
-0
left_bar.html
BeHub/Hub/templates/user_panel/default/left_bar.html
+24
-0
user_bar.html
BeHub/Hub/templates/user_panel/default/user_bar.html
+22
-0
views.py
BeHub/Hub/views.py
+12
-2
No files found.
BeHub/BeHub/urls.py
View file @
d4fa7172
...
@@ -5,7 +5,7 @@ from django.conf.urls.static import static
...
@@ -5,7 +5,7 @@ from django.conf.urls.static import static
from
BeHub
import
settings
from
BeHub
import
settings
from
Hub
import
views
as
hub_views
from
Hub
import
views
as
hub_views
from
Hub.views
import
login_page
from
Hub.views
import
login_page
,
main_page
,
dashboard
router
=
routers
.
DefaultRouter
()
router
=
routers
.
DefaultRouter
()
router
.
register
(
r'beacons'
,
hub_views
.
BeaconViewSet
)
router
.
register
(
r'beacons'
,
hub_views
.
BeaconViewSet
)
...
@@ -16,7 +16,9 @@ router.register(r'uuid', hub_views.UuidBeaconViewSet)
...
@@ -16,7 +16,9 @@ router.register(r'uuid', hub_views.UuidBeaconViewSet)
urlpatterns
=
patterns
(
''
,
urlpatterns
=
patterns
(
''
,
url
(
r'^$'
,
main_page
),
url
(
r'^login/$'
,
login_page
),
url
(
r'^login/$'
,
login_page
),
url
(
r'^dashboard/$'
,
dashboard
),
url
(
r'^api/'
,
include
(
router
.
urls
)),
url
(
r'^api/'
,
include
(
router
.
urls
)),
url
(
r'^admin/'
,
include
(
admin
.
site
.
urls
)),
url
(
r'^admin/'
,
include
(
admin
.
site
.
urls
)),
url
(
r'^api/uuid/(?P<pk>[0-9]+)/$'
,
hub_views
.
UuidBeaconViewSet
.
as_view
()),
url
(
r'^api/uuid/(?P<pk>[0-9]+)/$'
,
hub_views
.
UuidBeaconViewSet
.
as_view
()),
...
...
BeHub/Hub/models.py
View file @
d4fa7172
from
django.contrib.auth.models
import
User
from
django.db
import
models
from
django.db
import
models
...
@@ -7,6 +8,7 @@ class Site(models.Model):
...
@@ -7,6 +8,7 @@ class Site(models.Model):
link_url
=
models
.
CharField
(
max_length
=
2000
)
link_url
=
models
.
CharField
(
max_length
=
2000
)
description
=
models
.
CharField
(
max_length
=
300
,
null
=
True
)
description
=
models
.
CharField
(
max_length
=
300
,
null
=
True
)
category
=
models
.
ManyToManyField
(
'Category'
,
null
=
True
)
category
=
models
.
ManyToManyField
(
'Category'
,
null
=
True
)
author
=
models
.
ForeignKey
(
User
)
def
__str__
(
self
):
def
__str__
(
self
):
return
self
.
link_url
return
self
.
link_url
...
@@ -36,3 +38,12 @@ class BeaconManager(models.Model):
...
@@ -36,3 +38,12 @@ class BeaconManager(models.Model):
def
__str__
(
self
):
def
__str__
(
self
):
return
str
(
self
.
beacon
)
return
str
(
self
.
beacon
)
class
UserProject
(
models
.
Model
):
author
=
models
.
ForeignKey
(
User
)
beacons
=
models
.
ManyToManyField
(
'Beacon'
)
name
=
models
.
CharField
(
max_length
=
300
)
description
=
models
.
CharField
(
max_length
=
300
,
null
=
True
)
def
__str__
(
self
):
return
self
.
name
\ No newline at end of file
BeHub/Hub/static/css/footer.css
0 → 100644
View file @
d4fa7172
/* Sticky footer styles
-------------------------------------------------- */
/* Wrapper for page content to push down footer */
/* Set the fixed height of the footer here */
#footer
{
height
:
60px
;
background-color
:
#f5f5f5
;
position
:
fixed
;
width
:
100%
;
bottom
:
0px
;
}
/* Custom page CSS
-------------------------------------------------- */
/* Not required for template or sticky footer method. */
.caret-up
{
/* Safari */
-webkit-transform
:
rotate
(
-180deg
);
/* Firefox */
-moz-transform
:
rotate
(
-180deg
);
/* IE */
-ms-transform
:
rotate
(
-180deg
);
/* Opera */
-o-transform
:
rotate
(
-180deg
);
/* Internet Explorer */
filter
:
progid
:
DXImageTransform
.
Microsoft
.
BasicImage
(
rotation
=
6
);
}
.drop-up
{
top
:
auto
;
bottom
:
100%
!important
;
}
BeHub/Hub/static/css/register.css
0 → 100644
View file @
d4fa7172
BeHub/Hub/static/css/style.css
0 → 100644
View file @
d4fa7172
html
{
overflow-x
:
hidden
;
}
body
{
height
:
100%
;
color
:
white
;
background-color
:
white
;
/* The html and body elements cannot have any padding or margin. */
}
#wrap
{
min-height
:
100%
;
height
:
auto
;
/* Negative indent footer by its height */
margin
:
0
auto
-60px
;
/* Pad bottom by footer height */
padding
:
100
0
60px
;
}
BeHub/Hub/static/css/the-big-picture.css
0 → 100644
View file @
d4fa7172
/*!
* Start Bootstrap - The Big Picture HTML Template (http://startbootstrap.com)
* Code licensed under the Apache License v2.0.
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
.full
{
background
:
url('../img/background_main_page.png')
no-repeat
center
center
fixed
;
background-repeat
:
no-repeat
;
background-position
:
center
center
;
background-attachment
:
fixed
;
-webkit-background-size
:
cover
;
-moz-background-size
:
cover
;
-o-background-size
:
cover
;
background-size
:
cover
;
}
\ No newline at end of file
BeHub/Hub/static/img/background_main_page.png
0 → 100644
View file @
d4fa7172
This diff is collapsed.
Click to expand it.
BeHub/Hub/static/login.jpg
→
BeHub/Hub/static/
img/
login.jpg
View file @
d4fa7172
File moved
BeHub/Hub/templates/page/content/invalid_login.html
0 → 100644
View file @
d4fa7172
{% extends 'welcome_page/default/base.html' %}
{% block content %}
<h2>
Hi Your login details are invalid!
</h2>
<p>
Click
<a
href=
"/login/"
>
here
</a>
to login again
</p>
{% endblock %}
\ No newline at end of file
BeHub/Hub/templates/page/login.html
→
BeHub/Hub/templates/page/
content/
login.html
View file @
d4fa7172
{% load staticfiles%}
{% extends 'page/default/base.html' %}
<link
href=
"{% static 'css/bootstrap.min.css' %}"
rel=
"stylesheet"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/login.css' %}"
/>
{% block content %}
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-sm-6 col-md-4 col-md-offset-4"
>
<div
class=
"col-sm-6 col-md-4 col-md-offset-4"
>
<div
class=
"account-wall"
>
<div
class=
"account-wall"
>
<img
class=
"profile-img"
src=
"{{STATIC_URL}}login.jpg"
<img
class=
"profile-img"
src=
"{{STATIC_URL}}
img/
login.jpg"
alt=
""
>
alt=
""
>
<form
action=
"/login/"
method=
"post"
class=
"form-signin"
>
<form
action=
"/login/"
method=
"post"
class=
"form-signin"
>
{% csrf_token %}
{% csrf_token %}
...
@@ -23,4 +19,5 @@
...
@@ -23,4 +19,5 @@
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
{% endblock content %}
\ No newline at end of file
BeHub/Hub/templates/page/content/main_page.html
0 → 100644
View file @
d4fa7172
{% extends 'page/default/base.html' %}
{% block content %}
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-md-6 col-sm-12"
>
<h1>
Chcesz ukrasc beacona?
</h1>
<p>
Smialo
<h1>
xD
</h1>
Logowanie z prawej
<h1>
xD
</h1></p>
</div>
</div>
<!-- /.row -->
</div>
{% endblock content %}
\ No newline at end of file
BeHub/Hub/templates/page/content/register.html
0 → 100644
View file @
d4fa7172
{% extends 'welcome_page/default/base.html' %}
{% block content %}
<div
class=
"container"
>
<div
class=
"row"
>
<form
role=
"form"
method=
"post"
>
{% csrf_token %}
<div
class=
"col-lg-6"
>
<div
class=
"well well-sm"
><strong><span
class=
"glyphicon glyphicon-asterisk"
></span>
Required Field
</strong></div>
<div
class=
"form-group"
>
<label
for=
"InputName"
>
Enter Name
</label>
<div
class=
"input-group"
>
<input
type=
"text"
class=
"form-control"
name=
"username"
id=
"InputName"
placeholder=
"Enter Name"
required
>
<span
class=
"input-group-addon"
><span
class=
"glyphicon glyphicon-asterisk"
></span></span>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"InputEmail"
>
Enter Email
</label>
<div
class=
"input-group"
>
<input
type=
"email"
class=
"form-control"
id=
"InputEmailFirst"
name=
"email"
placeholder=
"Enter Email"
required
>
<span
class=
"input-group-addon"
><span
class=
"glyphicon glyphicon-asterisk"
></span></span>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"InputPassword"
>
Input password
</label>
<div
class=
"input-group"
>
<input
type=
"password"
class=
"form-control"
id=
"InputPasswordFirst"
name=
"password"
placeholder=
"Password"
required
>
<span
class=
"input-group-addon"
><span
class=
"glyphicon glyphicon-asterisk"
></span></span>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"ConfirmPassword"
>
ConfirmPassword
</label>
<div
class=
"input-group"
>
<input
type=
"password"
class=
"form-control"
id=
"InputPasswordSecond"
name=
"confirmed_password"
placeholder=
"Password"
required
>
<span
class=
"input-group-addon"
><span
class=
"glyphicon glyphicon-asterisk"
></span></span>
</div>
</div>
<input
type=
"submit"
name=
"submit"
id=
"submit"
value=
"Submit"
class=
"btn btn-info pull-right"
>
</div>
</form>
<div
class=
"col-lg-5 col-md-push-1"
>
<div
class=
"col-md-12"
>
<div
class=
"alert alert-success"
>
<strong><span
class=
"glyphicon "
></span>
Welcome to register form!
</strong>
</div>
{% for error, content in errors.items %}
<div
class=
"alert alert-danger"
>
<span
class=
"glyphicon glyphicon-remove"
></span><strong>
{{ content }}
</strong>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
{% endblock content %}
\ No newline at end of file
BeHub/Hub/templates/page/default/base.html
0 → 100644
View file @
d4fa7172
<html
>
{% load staticfiles %}
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<!-- Bootstrap -->
<link
href=
"{% static 'css/bootstrap.min.css' %}"
rel=
"stylesheet"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/style.css' %}"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/login.css' %}"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/footer.css' %}"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/the-big-picture.css' %}"
/>
<title>
Free Beacons
</title>
</head>
<body
class=
"full"
>
{% include 'page/default/main_bar.html' %}
<div
id=
"wrap"
>
{% block content %}
{% endblock %}
</div>
{% include 'page/default/footer.html' %}
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script
src=
"https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"
></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script
src=
"{% static 'js/bootstrap.min.js' %}"
></script>
</body>
</html>
\ No newline at end of file
BeHub/Hub/templates/page/default/footer.html
0 → 100644
View file @
d4fa7172
<div
id=
"footer"
>
<div
class=
"container"
>
<p
class=
"text-muted credit"
>
<div
class=
"btn-group"
>
<button
type=
"button"
class=
"btn btn-default dropdown-toggle"
data-toggle=
"dropdown"
>
Links
<span
class=
"caret caret-up"
></span>
</button>
<ul
class=
"dropdown-menu drop-up"
role=
"menu"
>
<li><a
href=
""
>
Authors:
</a></li>
<li><a
href=
"https://pl.linkedin.com/pub/kamil-rogalski/a4/a06/a6a"
>
Kamil Rogalski
</a></li>
<li><a
href=
"https://pl.linkedin.com/pub/rafał-lizoń/82/20a/ab"
>
Rafał Lizoń
</a></li>
<li
class=
"divider"
></li>
<li><a
href=
"#"
>
TMBK
</a></li>
</ul>
</div>
</p>
</div>
</div>
BeHub/Hub/templates/page/default/main_bar.html
0 → 100644
View file @
d4fa7172
<nav
class=
"navbar navbar-default navbar-fixed-top"
>
<div
class=
"container-fluid"
>
<!-- Brand and toggle get grouped for better mobile display -->
<div
class=
"navbar-header"
>
<button
type=
"button"
class=
"navbar-toggle collapsed"
data-toggle=
"collapse"
data-target=
"#bs-example-navbar-collapse-1"
aria-expanded=
"false"
>
</button>
<a
class=
"navbar-brand"
href=
"/"
>
Free Beacons
</a>
</div>
<ul
class=
"nav navbar-nav navbar-right"
>
<li><a
href=
"/login"
>
Login
</a></li>
<li><a
href=
"/register"
>
Register
</a></li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container-fluid -->
</nav>
\ No newline at end of file
BeHub/Hub/templates/user_panel/content/dashboard.html
0 → 100644
View file @
d4fa7172
{% extends 'user_panel/default/base.html' %}
{% block content %}
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<h2>
Twoje projekty
</h2>
{% for user_activity in activity_data.taken_activity %}
{% with template="user_panel/content/activity//"|add:user_activity.activity.kind|add:".html" activity=user_activity.activity %}
{% include template %}
{% endwith %}
{% endfor %}
</div>
</div>
</div>
{% endblock content %}
\ No newline at end of file
BeHub/Hub/templates/user_panel/default/base.html
0 → 100644
View file @
d4fa7172
<html
>
{% load staticfiles %}
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<!-- Bootstrap -->
<link
href=
"{% static 'css/bootstrap.min.css' %}"
rel=
"stylesheet"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/dashboard.css' %}"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/login.css' %}"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/footer.css' %}"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/left_bar.css' %}"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/user_profile.css' %}"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/friend_conversation.css' %}"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/friends.css' %}"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/profile.css' %}"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/hobby_list.css' %}"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/hobby_detail.css' %}"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/hobby_display.css' %}"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/font-awesome.min.css' %}"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/article.css' %}"
/>
<title>
Activy
</title>
</head>
<body>
{% include 'user_panel/default/user_bar.html' %}
{% include 'user_panel/default/left_bar.html' %}
<div
id=
"wrap"
style=
"margin-top:20px;"
>
{% block content %}
{% endblock %}
</div>
{% include 'user_panel/default/footer.html' %}
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script
src=
"https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"
></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script
src=
"{% static 'js/bootstrap.min.js' %}"
></script>
<script
src=
"{% static 'js/hobby_detail.js' %}"
></script>
<
</
body
>
</html>
\ No newline at end of file
BeHub/Hub/templates/user_panel/default/footer.html
0 → 100644
View file @
d4fa7172
<div
id=
"footer"
>
<div
class=
"container"
>
<p
class=
"text-muted credit"
>
<div
class=
"btn-group"
>
<button
type=
"button"
class=
"btn btn-default dropdown-toggle"
data-toggle=
"dropdown"
>
Links
<span
class=
"caret caret-up"
></span>
</button>
<ul
class=
"dropdown-menu drop-up"
role=
"menu"
>
<li><a
href=
""
>
Authors:
</a></li>
<li><a
href=
"https://pl.linkedin.com/pub/kamil-rogalski/a4/a06/a6a"
>
Kamil Rogalski
</a></li>
<li><a
href=
"https://pl.linkedin.com/pub/rafał-lizoń/82/20a/ab"
>
Rafał Lizoń
</a></li>
<li
class=
"divider"
></li>
<li><a
href=
"#"
>
TMBK
</a></li>
</ul>
</div>
</p>
</div>
</div>
BeHub/Hub/templates/user_panel/default/left_bar.html
0 → 100644
View file @
d4fa7172
<div
id=
"wrapper"
>
<!-- Sidebar -->
<div
id=
"sidebar-wrapper"
>
<ul
class=
"sidebar-nav"
>
<li
class=
"sidebar-brand"
>
</li>
{% for user_hobby in default_data.user_hobby %}
<li>
<a
href=
"/hobby/{{ user_hobby.hobby.id }}"
><img
src=
"{{ user_hobby.hobby.icon.photo_url }}"
></a>
</li>
{% endfor %}
</ul>
</div>
</div>
BeHub/Hub/templates/user_panel/default/user_bar.html
0 → 100644
View file @
d4fa7172
<nav
class=
"navbar navbar-default navbar-fixed-top"
>
<div
class=
"container-fluid"
>
<!-- Brand and toggle get grouped for better mobile display -->
<div
class=
"navbar-header"
>
<button
type=
"button"
class=
"navbar-toggle collapsed"
data-toggle=
"collapse"
data-target=
"#bs-example-navbar-collapse-1"
aria-expanded=
"false"
>
</button>
<a
class=
"navbar-brand"
href=
"/"
>
Activy
</a>
</div>
<ul
class=
"nav navbar-nav navbar-right"
>
<li><a
href=
"/"
>
Projekty
</a></li>
<li><a
href=
"/maps"
>
Mapa beaconow
</a></li>
<li><a
href=
"/logout"
>
Logout
</a></li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container-fluid -->
</nav>
\ No newline at end of file
BeHub/Hub/views.py
View file @
d4fa7172
...
@@ -2,7 +2,7 @@ from django.contrib import auth
...
@@ -2,7 +2,7 @@ from django.contrib import auth
from
django.contrib.auth
import
login
from
django.contrib.auth
import
login
from
django.core.exceptions
import
ObjectDoesNotExist
from
django.core.exceptions
import
ObjectDoesNotExist
from
django.http
import
HttpResponseRedirect
,
HttpResponse
from
django.http
import
HttpResponseRedirect
,
HttpResponse
from
django.shortcuts
import
render
,
render_to_response
from
django.shortcuts
import
render
,
render_to_response
,
redirect
from
django.template
import
RequestContext
from
django.template
import
RequestContext
# Create your views here.
# Create your views here.
...
@@ -83,7 +83,7 @@ def login_page(request):
...
@@ -83,7 +83,7 @@ def login_page(request):
context
=
RequestContext
(
request
)
context
=
RequestContext
(
request
)
if
not
request
.
method
==
'POST'
:
if
not
request
.
method
==
'POST'
:
return
render_to_response
(
'page/login.html'
,
{},
context
)
return
render_to_response
(
'page/
content/
login.html'
,
{},
context
)
username
=
request
.
POST
.
get
(
'username'
,
''
)
username
=
request
.
POST
.
get
(
'username'
,
''
)
password
=
request
.
POST
.
get
(
'password'
,
''
)
password
=
request
.
POST
.
get
(
'password'
,
''
)
...
@@ -95,3 +95,13 @@ def login_page(request):
...
@@ -95,3 +95,13 @@ def login_page(request):
else
:
else
:
return
HttpResponse
(
"Invalid login details supplied."
)
return
HttpResponse
(
"Invalid login details supplied."
)
def
main_page
(
request
):
context
=
RequestContext
(
request
)
if
request
.
user
.
is_authenticated
():
return
redirect
(
'/dashboard'
)
else
:
return
render_to_response
(
'page/content/main_page.html'
,
{},
context
)
def
dashboard
(
request
):
context
=
RequestContext
(
request
)
return
render_to_response
(
'user_panel/content/dashboard.html'
,
{},
context
)
\ No newline at end of file
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