Template & Basic Login System
Adding basic template and login system. Change-Id: I747a417fe6f821964c9fb708d69acc9538567c4c Signed-off-by: Paarhati Ozkasgarli <ozkasgarli@gmail.com>
This commit is contained in:
parent
3db5fc2f12
commit
3e9983e5f4
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,5 @@
|
||||
.idea/
|
||||
.Trash-1000/
|
||||
*.pyc
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
|
@ -1,3 +1,19 @@
|
||||
from django.contrib import admin
|
||||
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
# Register your models here.
|
||||
from user_profile.models import Profile
|
||||
|
||||
|
||||
class ProfileInline(admin.StackedInline):
|
||||
model = Profile
|
||||
can_delete = False
|
||||
verbose_name_plural = 'profiles'
|
||||
|
||||
|
||||
class UserAdmin(BaseUserAdmin):
|
||||
inlines = (ProfileInline, )
|
||||
|
||||
|
||||
admin.site.unregister(User)
|
||||
admin.site.register(User, UserAdmin)
|
||||
|
11
authcp/urls.py
Normal file
11
authcp/urls.py
Normal file
@ -0,0 +1,11 @@
|
||||
from django.conf.urls import url
|
||||
from django.contrib import admin
|
||||
from django.contrib.auth import views as auth_views
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^$', views.index, name='index'),
|
||||
url(r'^login/$', auth_views.login, {'template_name': 'authcp/login.html'}, name='login'),
|
||||
url(r'^logout/$', auth_views.logout, name='logout'),
|
||||
]
|
@ -1,3 +1,6 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
|
||||
def index(request):
|
||||
return render(request, "authcp/index.html", {})
|
||||
|
||||
|
0
dash_stack_dashboard/__init__.py
Normal file
0
dash_stack_dashboard/__init__.py
Normal file
@ -25,7 +25,18 @@ SECRET_KEY = '@b*)c#tfs%382t87hojq!1pou#f_3557kf(w@a++y$j5)+$rmd'
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = ['dash-stack',]
|
||||
ALLOWED_HOSTS = [
|
||||
'dash-stack',
|
||||
'198.211.127.189',
|
||||
]
|
||||
|
||||
# login url
|
||||
LOGIN_URL = '/auth/login/'
|
||||
|
||||
LOGIN_REDIRECT_URL = '/'
|
||||
|
||||
# logout redirect
|
||||
LOGOUT_REDIRECT_URL = '/auth/login/'
|
||||
|
||||
|
||||
# Application definition
|
||||
@ -57,12 +68,12 @@ MIDDLEWARE = [
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'dash_stack.urls'
|
||||
ROOT_URLCONF = 'dash_stack_dashboard.urls'
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [],
|
||||
'DIRS': ['templates',],
|
||||
'APP_DIRS': True,
|
||||
'OPTIONS': {
|
||||
'context_processors': [
|
||||
@ -75,7 +86,7 @@ TEMPLATES = [
|
||||
},
|
||||
]
|
||||
|
||||
WSGI_APPLICATION = 'dash_stack.wsgi.application'
|
||||
WSGI_APPLICATION = 'dash_stack_dashboard.wsgi.application'
|
||||
|
||||
|
||||
# Database
|
||||
@ -136,4 +147,8 @@ USE_TZ = True
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/1.10/howto/static-files/
|
||||
|
||||
STATICFILES_DIRS = [
|
||||
os.path.join(BASE_DIR, "static"),
|
||||
]
|
||||
|
||||
STATIC_URL = '/static/'
|
@ -13,10 +13,13 @@ Including another URLconf
|
||||
1. Import the include() function: from django.conf.urls import url, include
|
||||
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
|
||||
"""
|
||||
from django.conf.urls import url
|
||||
from django.conf.urls import include,url
|
||||
from django.contrib import admin
|
||||
from django.views.generic.base import TemplateView
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^admindj/', admin.site.urls),
|
||||
url(r'^$', views.index, name='index'),
|
||||
url(r'^auth/', include('authcp.urls')),
|
||||
]
|
8
dash_stack_dashboard/views.py
Normal file
8
dash_stack_dashboard/views.py
Normal file
@ -0,0 +1,8 @@
|
||||
import datetime
|
||||
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.shortcuts import render
|
||||
|
||||
@login_required
|
||||
def index(request):
|
||||
return render(request, "base.html", {'time' : datetime.datetime.now()})
|
@ -11,6 +11,6 @@ import os
|
||||
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dash_stack.settings")
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dash_stack_dashboard.settings")
|
||||
|
||||
application = get_wsgi_application()
|
@ -3,7 +3,7 @@ import os
|
||||
import sys
|
||||
|
||||
if __name__ == "__main__":
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dash_stack.settings")
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dash_stack_dashboard.settings")
|
||||
try:
|
||||
from django.core.management import execute_from_command_line
|
||||
except ImportError:
|
||||
|
BIN
static/avatar/2016-11-27/nobody_m.original.jpg
Normal file
BIN
static/avatar/2016-11-27/nobody_m.original.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
BIN
static/avatar/2016-11-27/nobody_m.original_Zt62Q5i.jpg
Normal file
BIN
static/avatar/2016-11-27/nobody_m.original_Zt62Q5i.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
1
templates/authcp/index.html
Normal file
1
templates/authcp/index.html
Normal file
@ -0,0 +1 @@
|
||||
Go to login please...
|
55
templates/authcp/login.html
Normal file
55
templates/authcp/login.html
Normal file
@ -0,0 +1,55 @@
|
||||
{% extends "base_headless.html" %}
|
||||
|
||||
{% block auth %}
|
||||
|
||||
<body class="hold-transition login-page">
|
||||
<div class="login-box">
|
||||
<div class="login-logo">
|
||||
<a href="{{ SITE_URL }}"><b> - </b>stack</a>
|
||||
</div>
|
||||
<!-- /.login-logo -->
|
||||
<div class="login-box-body">
|
||||
<p class="login-box-msg">Sign in to start your session</p>
|
||||
<form action="/auth/login/" method="POST">
|
||||
{% csrf_token %}
|
||||
<div class="form-group has-feedback">
|
||||
<input type="email" name="username" class="form-control" placeholder="Email">
|
||||
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
|
||||
</div>
|
||||
<div class="form-group has-feedback">
|
||||
<input type="password" name="password" class="form-control" placeholder="Password">
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-8">
|
||||
<div class="checkbox icheck">
|
||||
<label>
|
||||
<input type="checkbox"> Remember Me
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
<div class="col-xs-4">
|
||||
<button type="submit" class="btn btn-primary btn-block btn-flat">Sign In</button>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="social-auth-links text-center">
|
||||
<p>- OR -</p>
|
||||
<a href="#" class="btn btn-block btn-social btn-facebook btn-flat"><i class="fa fa-facebook"></i> Sign in using
|
||||
Facebook</a>
|
||||
<a href="#" class="btn btn-block btn-social btn-google btn-flat"><i class="fa fa-google-plus"></i> Sign in using
|
||||
Google+</a>
|
||||
</div>
|
||||
<!-- /.social-auth-links -->
|
||||
|
||||
<a href="#">I forgot my password</a><br>
|
||||
<a href="register.html" class="text-center">Register a new membership</a>
|
||||
|
||||
</div>
|
||||
<!-- /.login-box-body -->
|
||||
</div>
|
||||
<!-- /.login-box -->
|
||||
{% endblock auth %}
|
@ -0,0 +1,464 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>{% block title %}dashStack Dashboard{% endblock %}</title>
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="/static/Font-Awesome/css/font-awesome.min.css">
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="/static/ionicons/css/ionicons.min.css">
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="/static/AdminLTE/css/AdminLTE.min.css">
|
||||
<!-- AdminLTE Skins. Choose a skin from the css/skins
|
||||
folder instead of downloading all of them to reduce the load. -->
|
||||
<link rel="stylesheet" href="/static/AdminLTE/css/skins/_all-skins.min.css">
|
||||
<!-- iCheck -->
|
||||
<link rel="stylesheet" href="/static/AdminLTE/plugins/iCheck/flat/blue.css">
|
||||
<!-- Morris chart -->
|
||||
<link rel="stylesheet" href="/static/AdminLTE/plugins/morris/morris.css">
|
||||
<!-- jvectormap -->
|
||||
<link rel="stylesheet" href="/static/AdminLTE/plugins/jvectormap/jquery-jvectormap-1.2.2.css">
|
||||
<!-- Date Picker -->
|
||||
<link rel="stylesheet" href="/static/AdminLTE/plugins/datepicker/datepicker3.css">
|
||||
<!-- Daterange picker -->
|
||||
<link rel="stylesheet" href="/static/AdminLTE/plugins/daterangepicker/daterangepicker.css">
|
||||
<!-- bootstrap wysihtml5 - text editor -->
|
||||
<link rel="stylesheet" href="/static/AdminLTE/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
|
||||
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body class="hold-transition skin-blue sidebar-mini">
|
||||
<div class="wrapper">
|
||||
{% block header %}
|
||||
<header class="main-header">
|
||||
<!-- Logo -->
|
||||
<a href="index2.html" class="logo">
|
||||
<!-- mini logo for sidebar mini 50x50 pixels -->
|
||||
<span class="logo-mini"><b>-</b> stack</span>
|
||||
<!-- logo for regular state and mobile devices -->
|
||||
<span class="logo-lg">dash <b>-</b> stack</span>
|
||||
</a>
|
||||
<!-- Header Navbar: style can be found in header.less -->
|
||||
<nav class="navbar navbar-static-top">
|
||||
<!-- Sidebar toggle button-->
|
||||
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
</a>
|
||||
<div class="navbar-custom-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="dropdown notifications-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-bell-o"></i>
|
||||
<span class="label label-warning">10</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="header">You have 10 notifications</li>
|
||||
<li>
|
||||
<!-- inner menu: contains the actual data -->
|
||||
<ul class="menu">
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="fa fa-users text-aqua"></i> 5 new members joined today
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="fa fa-warning text-yellow"></i> Very long description here that may not fit into the
|
||||
page and may cause design problems
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="fa fa-users text-red"></i> 5 new members joined
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="fa fa-shopping-cart text-green"></i> 25 sales made
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="fa fa-user text-red"></i> You changed your username
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="footer"><a href="#">View all</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<!-- User Account: style can be found in dropdown.less -->
|
||||
<li class="dropdown user user-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<img src="static/AdminLTE/img/user2-160x160.jpg" class="user-image" alt="User Image">
|
||||
<span class="hidden-xs">Alexander Pierce</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<!-- User image -->
|
||||
<li class="user-header">
|
||||
<img src="static/AdminLTE/img/user2-160x160.jpg" class="img-circle" alt="User Image">
|
||||
|
||||
<p>
|
||||
Alexander Pierce - Web Developer
|
||||
<small>Member since Nov. 2012</small>
|
||||
</p>
|
||||
</li>
|
||||
<!-- Menu Body -->
|
||||
<!-- Menu Footer-->
|
||||
<li class="user-footer">
|
||||
<div class="pull-left">
|
||||
<a href="#" class="btn btn-default btn-flat">Profile</a>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a href="{% url 'logout' %}" class="btn btn-default btn-flat">Sign out</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
{% endblock header %}
|
||||
{% block sidebar %}
|
||||
<!-- Left side column. contains the logo and sidebar -->
|
||||
<aside class="main-sidebar">
|
||||
<!-- sidebar: style can be found in sidebar.less -->
|
||||
<section class="sidebar">
|
||||
<!-- search form -->
|
||||
<form action="#" method="get" class="sidebar-form">
|
||||
<div class="input-group">
|
||||
<input type="text" name="q" class="form-control" placeholder="Search...">
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
<!-- /.search form -->
|
||||
<!-- sidebar menu: : style can be found in sidebar.less -->
|
||||
<ul class="sidebar-menu">
|
||||
<li class="header">MAIN NAVIGATION</li>
|
||||
<li class="treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-dashboard"></i> <span>Dash</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-server"></i>
|
||||
<span>Servers</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-picture-o"></i>
|
||||
<span>Images</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-snowflake-o"></i>
|
||||
<span>Networking</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-shield"></i>
|
||||
<span>Security</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="sidebar-menu">
|
||||
<li class="header">ADMIN NAVIGATION</li>
|
||||
<li class="treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-dashboard"></i> <span>Admin Dash</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-server"></i>
|
||||
<span>Users</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
{% endblock sidebar %}
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
{% block content-header %}
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
Dashboard
|
||||
<small>Control panel</small>
|
||||
</h1>
|
||||
</section>
|
||||
{% endblock content-header %}
|
||||
{% block content %}
|
||||
<!-- Main content -->
|
||||
|
||||
<!-- /.content -->
|
||||
{% endblock content %}
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
{% block footer %}
|
||||
<footer class="main-footer">
|
||||
<div class="pull-right hidden-xs">
|
||||
<b>Version</b> 2.3.8
|
||||
</div>
|
||||
<strong>Copyright © 2014-2016 <a href="http://www.dash-stack.org">dash-stack</a>.</strong> All rights
|
||||
reserved.
|
||||
</footer>
|
||||
{% endblock footer %}
|
||||
{% block control-sidebar %}
|
||||
<!-- Control Sidebar -->
|
||||
<aside class="control-sidebar control-sidebar-dark">
|
||||
<!-- Create the tabs -->
|
||||
<ul class="nav nav-tabs nav-justified control-sidebar-tabs">
|
||||
<li><a href="#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a></li>
|
||||
<li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li>
|
||||
</ul>
|
||||
<!-- Tab panes -->
|
||||
<div class="tab-content">
|
||||
<!-- Home tab content -->
|
||||
<div class="tab-pane" id="control-sidebar-home-tab">
|
||||
<h3 class="control-sidebar-heading">Recent Activity</h3>
|
||||
<ul class="control-sidebar-menu">
|
||||
<li>
|
||||
<a href="javascript:void(0)">
|
||||
<i class="menu-icon fa fa-birthday-cake bg-red"></i>
|
||||
|
||||
<div class="menu-info">
|
||||
<h4 class="control-sidebar-subheading">Langdon's Birthday</h4>
|
||||
|
||||
<p>Will be 23 on April 24th</p>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0)">
|
||||
<i class="menu-icon fa fa-user bg-yellow"></i>
|
||||
|
||||
<div class="menu-info">
|
||||
<h4 class="control-sidebar-subheading">Frodo Updated His Profile</h4>
|
||||
|
||||
<p>New phone +1(800)555-1234</p>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0)">
|
||||
<i class="menu-icon fa fa-envelope-o bg-light-blue"></i>
|
||||
|
||||
<div class="menu-info">
|
||||
<h4 class="control-sidebar-subheading">Nora Joined Mailing List</h4>
|
||||
|
||||
<p>nora@example.com</p>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0)">
|
||||
<i class="menu-icon fa fa-file-code-o bg-green"></i>
|
||||
|
||||
<div class="menu-info">
|
||||
<h4 class="control-sidebar-subheading">Cron Job 254 Executed</h4>
|
||||
|
||||
<p>Execution time 5 seconds</p>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- /.control-sidebar-menu -->
|
||||
|
||||
<h3 class="control-sidebar-heading">Tasks Progress</h3>
|
||||
<ul class="control-sidebar-menu">
|
||||
<li>
|
||||
<a href="javascript:void(0)">
|
||||
<h4 class="control-sidebar-subheading">
|
||||
Custom Template Design
|
||||
<span class="label label-danger pull-right">70%</span>
|
||||
</h4>
|
||||
|
||||
<div class="progress progress-xxs">
|
||||
<div class="progress-bar progress-bar-danger" style="width: 70%"></div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0)">
|
||||
<h4 class="control-sidebar-subheading">
|
||||
Update Resume
|
||||
<span class="label label-success pull-right">95%</span>
|
||||
</h4>
|
||||
|
||||
<div class="progress progress-xxs">
|
||||
<div class="progress-bar progress-bar-success" style="width: 95%"></div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0)">
|
||||
<h4 class="control-sidebar-subheading">
|
||||
Laravel Integration
|
||||
<span class="label label-warning pull-right">50%</span>
|
||||
</h4>
|
||||
|
||||
<div class="progress progress-xxs">
|
||||
<div class="progress-bar progress-bar-warning" style="width: 50%"></div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0)">
|
||||
<h4 class="control-sidebar-subheading">
|
||||
Back End Framework
|
||||
<span class="label label-primary pull-right">68%</span>
|
||||
</h4>
|
||||
|
||||
<div class="progress progress-xxs">
|
||||
<div class="progress-bar progress-bar-primary" style="width: 68%"></div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- /.control-sidebar-menu -->
|
||||
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<!-- Stats tab content -->
|
||||
<div class="tab-pane" id="control-sidebar-stats-tab">Stats Tab Content</div>
|
||||
<!-- /.tab-pane -->
|
||||
<!-- Settings tab content -->
|
||||
<div class="tab-pane" id="control-sidebar-settings-tab">
|
||||
<form method="post">
|
||||
<h3 class="control-sidebar-heading">General Settings</h3>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-sidebar-subheading">
|
||||
Report panel usage
|
||||
<input type="checkbox" class="pull-right" checked>
|
||||
</label>
|
||||
|
||||
<p>
|
||||
Some information about this general settings option
|
||||
</p>
|
||||
</div>
|
||||
<!-- /.form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-sidebar-subheading">
|
||||
Allow mail redirect
|
||||
<input type="checkbox" class="pull-right" checked>
|
||||
</label>
|
||||
|
||||
<p>
|
||||
Other sets of options are available
|
||||
</p>
|
||||
</div>
|
||||
<!-- /.form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-sidebar-subheading">
|
||||
Expose author name in posts
|
||||
<input type="checkbox" class="pull-right" checked>
|
||||
</label>
|
||||
|
||||
<p>
|
||||
Allow the user to show his name in blog posts
|
||||
</p>
|
||||
</div>
|
||||
<!-- /.form-group -->
|
||||
|
||||
<h3 class="control-sidebar-heading">Chat Settings</h3>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-sidebar-subheading">
|
||||
Show me as online
|
||||
<input type="checkbox" class="pull-right" checked>
|
||||
</label>
|
||||
</div>
|
||||
<!-- /.form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-sidebar-subheading">
|
||||
Turn off notifications
|
||||
<input type="checkbox" class="pull-right">
|
||||
</label>
|
||||
</div>
|
||||
<!-- /.form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-sidebar-subheading">
|
||||
Delete chat history
|
||||
<a href="javascript:void(0)" class="text-red pull-right"><i class="fa fa-trash-o"></i></a>
|
||||
</label>
|
||||
</div>
|
||||
<!-- /.form-group -->
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
</aside>
|
||||
<!-- /.control-sidebar -->
|
||||
<!-- Add the sidebar's background. This div must be placed
|
||||
immediately after the control sidebar -->
|
||||
<div class="control-sidebar-bg"></div>
|
||||
{% endblock control-sidebar %}
|
||||
</div>
|
||||
<!-- ./wrapper -->
|
||||
{% block java-scripts %}
|
||||
<!-- jQuery 2.2.3 -->
|
||||
<script src="static/AdminLTE/plugins/jQuery/jquery-2.2.3.min.js"></script>
|
||||
<!-- jQuery UI 1.11.4 -->
|
||||
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
|
||||
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
|
||||
<script>
|
||||
$.widget.bridge('uibutton', $.ui.button);
|
||||
</script>
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<script src="static/bootstrap/js/bootstrap.min.js"></script>
|
||||
<!-- Morris.js charts -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
|
||||
<script src="static/AdminLTE/plugins/morris/morris.min.js"></script>
|
||||
<!-- Sparkline -->
|
||||
<script src="static/AdminLTE/plugins/sparkline/jquery.sparkline.min.js"></script>
|
||||
<!-- jvectormap -->
|
||||
<script src="static/AdminLTE/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
|
||||
<script src="static/AdminLTE/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
|
||||
<!-- jQuery Knob Chart -->
|
||||
<script src="static/AdminLTE/plugins/knob/jquery.knob.js"></script>
|
||||
<!-- daterangepicker -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment.min.js"></script>
|
||||
<script src="static/AdminLTE/plugins/daterangepicker/daterangepicker.js"></script>
|
||||
<!-- datepicker -->
|
||||
<script src="static/AdminLTE/plugins/datepicker/bootstrap-datepicker.js"></script>
|
||||
<!-- Bootstrap WYSIHTML5 -->
|
||||
<script src="static/AdminLTE/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>
|
||||
<!-- Slimscroll -->
|
||||
<script src="static/AdminLTE/plugins/slimScroll/jquery.slimscroll.min.js"></script>
|
||||
<!-- FastClick -->
|
||||
<script src="static/AdminLTE/plugins/fastclick/fastclick.js"></script>
|
||||
<!-- AdminLTE App -->
|
||||
<script src="static/AdminLTE/js/app.min.js"></script>
|
||||
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
|
||||
<script src="static/AdminLTE/js/pages/dashboard.js"></script>
|
||||
<!-- AdminLTE for demo purposes -->
|
||||
<script src="static/AdminLTE/js/demo.js"></script>
|
||||
{% endblock java-scripts %}
|
||||
</body>
|
||||
</html>
|
47
templates/base_headless.html
Normal file
47
templates/base_headless.html
Normal file
@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>AdminLTE 2 | Log in</title>
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="/static/Font-Awesome/css/font-awesome.min.css">
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="/static/ionicons/css/ionicons.min.css">
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="/static/AdminLTE/css/AdminLTE.min.css">
|
||||
<!-- iCheck -->
|
||||
<link rel="stylesheet" href="/static/AdminLTE/plugins/iCheck/square/blue.css">
|
||||
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
{% block auth %}
|
||||
|
||||
{% endblock auth %}
|
||||
|
||||
<!-- jQuery 2.2.3 -->
|
||||
<script src="/static/AdminLTE/plugins/jQuery/jquery-2.2.3.min.js"></script>
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<script src="/static/bootstrap/js/bootstrap.min.js"></script>
|
||||
<!-- iCheck -->
|
||||
<script src="/static/AdminLTE/plugins/iCheck/icheck.min.js"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
$('input').iCheck({
|
||||
checkboxClass: 'icheckbox_square-blue',
|
||||
radioClass: 'iradio_square-blue',
|
||||
increaseArea: '20%' // optional
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
1266
templates/index.html
1266
templates/index.html
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,4 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
|
||||
from django.contrib.auth.models import User
|
29
user_profile/migrations/0001_initial.py
Normal file
29
user_profile/migrations/0001_initial.py
Normal file
@ -0,0 +1,29 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.3 on 2016-11-22 20:26
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Profile',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('avatar', models.TextField(blank=True, max_length=500)),
|
||||
('provider_password', models.CharField(max_length=50)),
|
||||
('selected_provider', models.IntegerField()),
|
||||
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
]
|
@ -1,5 +1,11 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
# Create your models here.
|
||||
|
||||
class Profile(models.Model):
|
||||
user = models.OneToOneField(User, on_delete=models.CASCADE)
|
||||
avatar = models.FileField(upload_to='static/avatar/%Y-%m-%d')
|
||||
provider_password = models.CharField(max_length=50)
|
||||
selected_provider = models.IntegerField()
|
Loading…
x
Reference in New Issue
Block a user