Skip to content

Commit

Permalink
Add a basic template and include registration urls
Browse files Browse the repository at this point in the history
Signed-off-by: Nir Izraeli <nirizr@gmail.com>
  • Loading branch information
nirizr committed Nov 12, 2016
1 parent cc0e392 commit 7bdf33f
Show file tree
Hide file tree
Showing 6 changed files with 2,891 additions and 3 deletions.
2 changes: 2 additions & 0 deletions server/accounts/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
urlpatterns = [
url(r'^profile/$', views.profile, name='profile'),
url(r'', include('rest_auth.urls')),
url(r'', include('registration.backends.default.urls')),
# url('^/', include('django.contrib.auth.urls')),
]
2 changes: 1 addition & 1 deletion server/accounts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ def profile(request):
"last_name": request.user.last_name,
"email": request.user.email,
})
return Response(user)
return Response(user, template_name='profile.html')
10 changes: 8 additions & 2 deletions server/rematch/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True


# As of django 1.10, allowed hosts are validated in debug as well,
# this disables that and makes sure all hosts are acceptible when
# running in debug mode. for more details see
Expand All @@ -47,6 +46,7 @@
'rest_framework.authtoken',
'rest_auth',
'djcelery',
'registration',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
Expand All @@ -72,7 +72,9 @@
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'DIRS': [
os.path.join(BASE_DIR, 'template')
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
Expand Down Expand Up @@ -158,10 +160,14 @@

STATIC_URL = '/static/'

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

# Celery configuration

CELERY_RESULT_BACKEND = 'djcelery.backends.database:DatabaseBackend'
CELERY_ACCEPT_CONTENT = ['json']
CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'

# Django Registration Redux configuration
ACCOUNT_ACTIVATION_DAYS = 1
331 changes: 331 additions & 0 deletions server/template/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,331 @@
{% load staticfiles %}

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<meta name="keyword" content="">

<title>Rematch</title>

<!-- Bootstrap core CSS -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!--external css-->
<link href="{% static "font-awesome/css/font-awesome.css" %}" rel="stylesheet" />

<!-- Custom styles -->
<link href="{% static "css/style.css" %}" rel="stylesheet">
<link href="{% static "css/style-responsive.css" %}" rel="stylesheet">

<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>

<body>
<section id="container" >
<!-- **********************************************************************************************************************************************************
TOP BAR CONTENT & NOTIFICATIONS
*********************************************************************************************************************************************************** -->
<!--header start-->
<header class="header black-bg">
<div class="sidebar-toggle-box">
<div class="fa fa-bars tooltips" data-placement="right" data-original-title="Toggle Navigation"></div>
</div>
<!--logo start-->
<a href="/" class="logo"><b>Rematch</b></a>
<!--logo end-->
<div class="nav notify-row" id="top_menu">
{% comment %}
<!-- notification start -->
<ul class="nav top-menu">
<!-- settings start -->
<li class="dropdown">
<a data-toggle="dropdown" class="dropdown-toggle" href="index.html#">
<i class="fa fa-tasks"></i>
<span class="badge bg-theme">4</span>
</a>
<ul class="dropdown-menu extended tasks-bar">
<div class="notify-arrow notify-arrow-green"></div>
<li>
<p class="green">You have 4 pending tasks</p>
</li>
<li>
<a href="index.html#">
<div class="task-info">
<div class="desc">DashGum Admin Panel</div>
<div class="percent">40%</div>
</div>
<div class="progress progress-striped">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
<span class="sr-only">40% Complete (success)</span>
</div>
</div>
</a>
</li>
<li>
<a href="index.html#">
<div class="task-info">
<div class="desc">Database Update</div>
<div class="percent">60%</div>
</div>
<div class="progress progress-striped">
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%">
<span class="sr-only">60% Complete (warning)</span>
</div>
</div>
</a>
</li>
<li>
<a href="index.html#">
<div class="task-info">
<div class="desc">Product Development</div>
<div class="percent">80%</div>
</div>
<div class="progress progress-striped">
<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%">
<span class="sr-only">80% Complete</span>
</div>
</div>
</a>
</li>
<li>
<a href="index.html#">
<div class="task-info">
<div class="desc">Payments Sent</div>
<div class="percent">70%</div>
</div>
<div class="progress progress-striped">
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width: 70%">
<span class="sr-only">70% Complete (Important)</span>
</div>
</div>
</a>
</li>
<li class="external">
<a href="#">See All Tasks</a>
</li>
</ul>
</li>
<!-- settings end -->
<!-- inbox dropdown start-->
<li id="header_inbox_bar" class="dropdown">
<a data-toggle="dropdown" class="dropdown-toggle" href="index.html#">
<i class="fa fa-envelope-o"></i>
<span class="badge bg-theme">5</span>
</a>
<ul class="dropdown-menu extended inbox">
<div class="notify-arrow notify-arrow-green"></div>
<li>
<p class="green">You have 5 new messages</p>
</li>
<li>
<a href="index.html#">
<span class="photo"><img alt="avatar" src="{% static "img/ui-zac.jpg"></span>
<span class="subject">
<span class="from">Zac Snider</span>
<span class="time">Just now</span>
</span>
<span class="message">
Hi mate, how is everything?
</span>
</a>
</li>
<li>
<a href="index.html#">
<span class="photo"><img alt="avatar" src="{% static "img/ui-divya.jpg"></span>
<span class="subject">
<span class="from">Divya Manian</span>
<span class="time">40 mins.</span>
</span>
<span class="message">
Hi, I need your help with this.
</span>
</a>
</li>
<li>
<a href="index.html#">
<span class="photo"><img alt="avatar" src="{% static "img/ui-danro.jpg"></span>
<span class="subject">
<span class="from">Dan Rogers</span>
<span class="time">2 hrs.</span>
</span>
<span class="message">
Love your new Dashboard.
</span>
</a>
</li>
<li>
<a href="index.html#">
<span class="photo"><img alt="avatar" src="{% static "img/ui-sherman.jpg"></span>
<span class="subject">
<span class="from">Dj Sherman</span>
<span class="time">4 hrs.</span>
</span>
<span class="message">
Please, answer asap.
</span>
</a>
</li>
<li>
<a href="index.html#">See all messages</a>
</li>
</ul>
</li>
<!-- inbox dropdown end -->
</ul>
<!-- notification end -->
{% endcomment %}
</div>
<div class="top-menu">
<ul class="nav pull-right top-menu">
{% if user.is_authenticated %}
<li><a class="logout" href="/accounts/logout/">Logout</a></li>
{% else %}
<li><a class="login" href="/accounts/register/">Register</a></li>
<li><a class="login" href="/accounts/login/">Login</a></li>
{% endif %}
</ul>
</div>
</header>
<!--header end-->

<!-- **********************************************************************************************************************************************************
MAIN SIDEBAR MENU
*********************************************************************************************************************************************************** -->
<!--sidebar start-->
<aside>
<div id="sidebar" class="nav-collapse ">
<!-- sidebar menu start-->
<ul class="sidebar-menu" id="nav-accordion">

<p class="centered"><a href="accounts/profile/"><img src="{% static "img/ui-sam.jpg" %}" class="img-circle" width="60"></a></p>
<h5 class="centered">{{ user.first_name}} {{ user.last_name }} </h5>

<li class="mt">
<a href="/">
<i class="fa fa-dashboard"></i>
<span>Dashboard</span>
</a>
</li>

<li class="sub-menu">
<a href="javascript:;" >
<i class="fa fa-desktop"></i>
<span>UI Elements</span>
</a>
<ul class="sub">
<li><a href="general.html">General</a></li>
<li><a href="buttons.html">Buttons</a></li>
<li><a href="panels.html">Panels</a></li>
</ul>
</li>

<li class="sub-menu">
<a href="javascript:;" >
<i class="fa fa-cogs"></i>
<span>Components</span>
</a>
<ul class="sub">
<li><a href="calendar.html">Calendar</a></li>
<li><a href="gallery.html">Gallery</a></li>
<li><a href="todo_list.html">Todo List</a></li>
</ul>
</li>
<li class="sub-menu">
<a class="active" href="javascript:;" >
<i class="fa fa-book"></i>
<span>Extra Pages</span>
</a>
<ul class="sub">
<li class="active"><a href="blank.html">Blank Page</a></li>
<li><a href="/accounts/login">Login</a></li>
<li><a href="lock_screen.html">Lock Screen</a></li>
</ul>
</li>
<li class="sub-menu">
<a href="javascript:;" >
<i class="fa fa-tasks"></i>
<span>Forms</span>
</a>
<ul class="sub">
<li><a href="form_component.html">Form Components</a></li>
</ul>
</li>
<li class="sub-menu">
<a href="javascript:;" >
<i class="fa fa-th"></i>
<span>Data Tables</span>
</a>
<ul class="sub">
<li><a href="basic_table.html">Basic Table</a></li>
<li><a href="responsive_table.html">Responsive Table</a></li>
</ul>
</li>
<li class="sub-menu">
<a href="javascript:;" >
<i class=" fa fa-bar-chart-o"></i>
<span>Charts</span>
</a>
<ul class="sub">
<li><a href="morris.html">Morris</a></li>
<li><a href="chartjs.html">Chartjs</a></li>
</ul>
</li>

</ul>
<!-- sidebar menu end-->
</div>
</aside>
<!--sidebar end-->
<!-- **********************************************************************************************************************************************************
MAIN CONTENT
*********************************************************************************************************************************************************** -->
<!--main content start-->
<section id="main-content">
<section class="wrapper site-min-height">
<div class="col-lg-12">
<div class="row mt">
<div class="showback">
<h3><i class="fa fa-angle-right"></i> {% block title %}{% endblock %}</h3>
<div class="row mt">
<div class="col-lg-12">
<p>{% block content %}{% endblock %}</p>
</div>
</div>
</div>
</div>
</div>
</section><! --/wrapper -->
</section><!-- /MAIN CONTENT -->
<!--main content end-->
<!--footer start-->
<footer class="site-footer">
<div class="text-center">
<a href="#" class="go-top">
<i class="fa fa-angle-up"></i>
</a>
</div>
</footer>
<!--footer end-->
</section>

<!-- js placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

<script src="{% static "js/jquery.ui.touch-punch.min.js" %}"></script>
<script class="include" type="text/javascript" src="{% static "js/jquery.dcjqaccordion.2.7.js" %}"></script>
<script src="{% static "js/jquery.scrollTo.min.js" %}"></script>
<script src="{% static "js/jquery.nicescroll.js" %}" type="text/javascript"></script>

<!--common script for all pages-->
<script src="{% static "js/common-scripts.js" %}"></script>
</body>
</html>
Loading

0 comments on commit 7bdf33f

Please sign in to comment.