New changes

This commit is contained in:
Raynaldo Rivera 2014-10-15 17:48:39 -07:00
parent 375582a9fa
commit e6d24b2a72
13 changed files with 336 additions and 10 deletions

View File

@ -32,8 +32,17 @@ BROKER_URL = 'amqp://guest:guest@localhost:5672/'
CELERYBEAT_SCHEDULER = "djcelery.schedulers.DatabaseScheduler" CELERYBEAT_SCHEDULER = "djcelery.schedulers.DatabaseScheduler"
# Application definition # EMAIL SETTINGS
# By default uses the python smtpd server
DOMAIN = 'https://the99eve.com'
EMAIL_HOST = 'localhost'
EMAIL_PORT = 1025
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
EMAIL_USE_TLS = False
DEFAULT_FROM_EMAIL = 'testing@example.com'
# Application definition
INSTALLED_APPS = ( INSTALLED_APPS = (
'django.contrib.admin', 'django.contrib.admin',
'django.contrib.auth', 'django.contrib.auth',
@ -108,7 +117,8 @@ TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.request', 'django.core.context_processors.request',
'util.context_processors.alliance_id', 'util.context_processors.alliance_id',
'util.context_processors.alliance_name', 'util.context_processors.alliance_name',
'util.context_processors.jabber_url' 'util.context_processors.jabber_url',
'util.context_processors.domain_url'
) )
TEMPLATE_DIRS = ( TEMPLATE_DIRS = (
@ -149,7 +159,7 @@ ALLIANCE_NAME = 'Some alliance'
# Jabber Prosody Info # Jabber Prosody Info
JABBER_URL = "@someaddress.com" JABBER_URL = "@someaddress.com"
OPENFIRE_ADDRESS = "http://someaddress.com:9090/" OPENFIRE_ADDRESS = "http://someaddress.com:9090/"
OPENFIRE_SECRET_KEY = "somesecret" OPENFIRE_SECRET_KEY = "somekey"
# Mumble settings # Mumble settings
MUMBLE_SERVER_ID = 1 MUMBLE_SERVER_ID = 1

View File

@ -16,6 +16,13 @@ urlpatterns = patterns('',
url(r'^logout_user/', 'authentication.views.logout_user', name='auth_logout_user'), url(r'^logout_user/', 'authentication.views.logout_user', name='auth_logout_user'),
url(r'^register_user/', 'registration.views.register_user_view', name='auth_register_user'), url(r'^register_user/', 'registration.views.register_user_view', name='auth_register_user'),
url(r'^user/password/$', 'django.contrib.auth.views.password_change', name='password_change'),
url(r'^user/password/done/$', 'django.contrib.auth.views.password_change_done', name='password_change_done'),
url(r'^user/password/reset/$', 'django.contrib.auth.views.password_reset', name='password_reset'),
url(r'^user/password/password/reset/done/$', 'django.contrib.auth.views.password_reset_done', name='password_reset_done'),
url(r'^user/password/reset/complete/$', 'django.contrib.auth.views.password_reset_complete', name='password_reset_complete'),
url(r'^user/password/reset/confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$', 'django.contrib.auth.views.password_reset_confirm', name='password_reset_confirm'),
# Portal Urls # Portal Urls
url(r'^dashboard/$', 'portal.views.dashboard_view', name='auth_dashboard'), url(r'^dashboard/$', 'portal.views.dashboard_view', name='auth_dashboard'),
url(r'^help/$', 'portal.views.help_view', name='auth_help'), url(r'^help/$', 'portal.views.help_view', name='auth_help'),

View File

@ -60,6 +60,10 @@
</div> </div>
<!-- /input-group --> <!-- /input-group -->
</li> </li>
<li class="text-center divider-horizontal">
<h5>Main Navigation</h5>
</li>
<li> <li>
<a {% ifequal request.path "/dashboard/" %} class="active" {% endifequal %} href="{% url 'auth_dashboard' %}"><i class="fa fa-dashboard fa-fw"></i> Dashboard</a> <a {% ifequal request.path "/dashboard/" %} class="active" {% endifequal %} href="{% url 'auth_dashboard' %}"><i class="fa fa-dashboard fa-fw"></i> Dashboard</a>
</li> </li>
@ -75,6 +79,14 @@
<li> <li>
<a {% ifequal request.path "/help/" %} class="active" {% endifequal %} href="{% url 'auth_help' %}"><i class="fa fa-question fa-fw"></i> Help</a> <a {% ifequal request.path "/help/" %} class="active" {% endifequal %} href="{% url 'auth_help' %}"><i class="fa fa-question fa-fw"></i> Help</a>
</li> </li>
<li class="text-center divider-horizontal">
<h5>Util</h5>
</li>
<li>
<a {% ifequal request.path "/user/password/" %} class="active" {% endifequal %} href="{% url 'password_change' %}"><i class="fa fa-lock fa-fw"></i>Change Password</a>
</li>
</ul> </ul>
</div> </div>
<!-- /.sidebar-collapse --> <!-- /.sidebar-collapse -->

View File

@ -37,10 +37,14 @@
<div class="container" style="margin-top:150px"> <div class="container" style="margin-top:150px">
<div class="col-md-4 col-md-offset-4"> <div class="col-md-4 col-md-offset-4">
<div class="panel panel-default panel-transparent"> <div class="panel panel-default panel-transparent">
<div class="panel-body"> <div class="panel-body">
{% if error %} {% if error %}
<div class="alert alert-danger" role="alert">Username/Password Invalid</div> <div class="alert alert-danger" role="alert">Username/Password Invalid</div>
{% endif %} {% endif %}
<a href="{% url 'auth_register_user' %}">
<button class="btn btn- btn-success btn-block">Register</button>
</a>
<form class="form-signin" role="form" action="{% url 'auth_login_user' %}" method="POST"> <form class="form-signin" role="form" action="{% url 'auth_login_user' %}" method="POST">
{% csrf_token %} {% csrf_token %}
<h2 class="form-signin-heading text-center">Please sign in</h2> <h2 class="form-signin-heading text-center">Please sign in</h2>
@ -50,8 +54,8 @@
</div> </div>
</form> </form>
<div class="col-md-6"> <div class="col-md-6">
<a href="{% url 'auth_register_user' %}"> <a href="{% url 'password_reset' %}">
<button class="btn btn-lg btn-success btn-block">Register</button> <button class="btn btn-lg btn-danger btn-block">Reset</button>
</a> </a>
</div> </div>
</div> </div>

View File

@ -9,7 +9,7 @@
{% if perms.auth.alliance_member %} {% if perms.auth.alliance_member %}
<div class="col-lg-12 container" id="example"> <div class="col-lg-12 container" id="example">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading">Alliance Announcment:</div> <div class="panel-heading">Alliance Announcment</div>
<div class="panel-body">Something something dark side </div> <div class="panel-body">Something something dark side </div>
</div> </div>
@ -19,7 +19,7 @@
{% for character in characters %} {% for character in characters %}
{% ifequal character.character_id authinfo.main_char_id %} {% ifequal character.character_id authinfo.main_char_id %}
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading">Main character:</div> <div class="panel-heading">Main character</div>
<div class="panel-body"> <div class="panel-body">
<div class="col-lg-5 col-sm-2"><img class= <div class="col-lg-5 col-sm-2"><img class=
@ -40,7 +40,7 @@
<div class="col-lg-6"> <div class="col-lg-6">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading">Groups:</div> <div class="panel-heading">Groups</div>
<div class="panel-body"> <div class="panel-body">
<div style="height: 128px;overflow:-moz-scrollbars-vertical;overflow-y:auto;"> <div style="height: 128px;overflow:-moz-scrollbars-vertical;overflow-y:auto;">
<table class="table table-striped"> <table class="table table-striped">

View File

@ -0,0 +1,23 @@
{% extends "public/base.html" %}
{% load bootstrap %}
{% load i18n static %}
{% block title %}{% trans 'Password change' %}{% endblock %}
{% block content %}
<div class="col-lg-12">
<h1 class="page-header text-center">Change Password</h1>
<div class="container-fluid">
<div class="col-md-4 col-md-offset-4">
<div class="row">
<p class="text-center">
Completed
</p>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,26 @@
{% extends "public/base.html" %}
{% load bootstrap %}
{% load i18n static %}
{% block title %}{% trans 'Password change' %}{% endblock %}
{% block content %}
<div class="col-lg-12">
<h1 class="page-header text-center">Change Password</h1>
<div class="container-fluid">
<div class="col-md-4 col-md-offset-4">
<div class="row">
<form class="form-signin" role="form" action="" method="POST">
{% csrf_token %}
{{ form|bootstrap }}
<br/>
<button class="btn btn-lg btn-primary btn-block" type="submit">Change Password</button>
</form>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,54 @@
{% load staticfiles %}
{% load i18n %}
{% load bootstrap %}
<html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>{{ ALLIANCE_NAME }} - Login</title>
<!-- Bootstrap Core CSS -->
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
<!-- Custom Fonts -->
<link href="{% static 'css/font-awesome.min.css' %}" rel="stylesheet" type="text/css">
<style>
body {
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
background-size: 100% 100%;
}
.panel-transparent {
background: rgba(48,48,48,0.7);
color: #ffffff;
}
.panel-body {
}
</style>
</head>
<body>
<div class="container" style="margin-top:150px">
<div class="col-md-4 col-md-offset-4">
<div class="panel panel-default panel-transparent">
<div class="panel-body">
<h1 class="text-center">{% trans 'Password reset complete' %}</h1>
<p class="text-center">{% trans "Your password has been set." %}</p>
<a href="{{ login_url }}">
<button class="btn btn-lg btn-success btn-block">Log In</button>
</a>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,62 @@
{% load staticfiles %}
{% load i18n %}
{% load bootstrap %}
<html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>{{ ALLIANCE_NAME }} - Login</title>
<!-- Bootstrap Core CSS -->
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
<!-- Custom Fonts -->
<link href="{% static 'css/font-awesome.min.css' %}" rel="stylesheet" type="text/css">
<style>
body {
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
background-size: 100% 100%;
}
.panel-transparent {
background: rgba(48,48,48,0.7);
color: #ffffff;
}
.panel-body {
}
</style>
</head>
<body>
<div class="container" style="margin-top:150px">
<div class="col-md-4 col-md-offset-4">
<div class="panel panel-default panel-transparent">
<div class="panel-body">
{% if validlink %}
<form class="form-signin" role="form" action="" method="POST">
{% csrf_token %}
{{ form |bootstrap }}
<div class="">
<button class="btn btn-lg btn-primary btn-block" type="submit">Change Password</button>
</div>
</form>
{% else %}
<h1>{% trans 'Password reset unsuccessful' %}</h1>
<p>{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}</p>
{% endif %}
</div>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,53 @@
{% load staticfiles %}
{% load i18n %}
{% load bootstrap %}
<html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>{{ ALLIANCE_NAME }} - Login</title>
<!-- Bootstrap Core CSS -->
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
<!-- Custom Fonts -->
<link href="{% static 'css/font-awesome.min.css' %}" rel="stylesheet" type="text/css">
<style>
body {
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
background-size: 100% 100%;
}
.panel-transparent {
background: rgba(48,48,48,0.7);
color: #ffffff;
}
.panel-body {
}
</style>
</head>
<body>
<div class="container" style="margin-top:150px">
<div class="col-md-4 col-md-offset-4">
<div class="panel panel-default panel-transparent">
<div class="panel-body">
<h1 class="text-center">{% trans 'Password Reset Success' %}</h1>
<p>{% trans "We've emailed you instructions for setting your password. You should be receiving them shortly." %}</p>
<p>{% trans "If you don't receive an email, please make sure you've entered the address you registered with, and check your spam folder." %}</p>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,15 @@
{% load i18n %}{% autoescape off %}
{% blocktrans %}You're receiving this email because you requested a password reset for your
user account.{% endblocktrans %}
{% trans "Please go to the following page and choose a new password:" %}
{% block reset_link %}
https://the99eve.com{% url 'password_reset_confirm' uidb64=uid token=token %}
{% endblock %}
{% trans "Your username, in case you've forgotten:" %} {{ user.get_username }}
{% trans "Thanks for using our site!" %}
{% blocktrans %}The The 99 Percent team{% endblocktrans %}
{% endautoescape %}

View File

@ -0,0 +1,56 @@
{% load staticfiles %}
{% load i18n %}
{% load bootstrap %}
<html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>{{ ALLIANCE_NAME }} - Login</title>
<!-- Bootstrap Core CSS -->
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
<!-- Custom Fonts -->
<link href="{% static 'css/font-awesome.min.css' %}" rel="stylesheet" type="text/css">
<style>
body {
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
background-size: 100% 100%;
}
.panel-transparent {
background: rgba(48,48,48,0.7);
color: #ffffff;
}
.panel-body {
}
</style>
</head>
<body>
<div class="container" style="margin-top:150px">
<div class="col-md-4 col-md-offset-4">
<div class="panel panel-default panel-transparent">
<div class="panel-body">
<form class="form-signin" role="form" action="" method="POST">
{% csrf_token %}
<h1 class="text-center">{% trans "Password Reset" %}</h1>
<p class="text-center">{% trans "Forgotten your password? Enter your email below." %}</p>
{{form|bootstrap}}
<div class="">
<button class="btn btn-lg btn-primary btn-block" type="submit">Reset Password</button>
</div>
</form>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@ -11,3 +11,7 @@ def alliance_name(request):
def jabber_url(request): def jabber_url(request):
return {'JABBER_URL': settings.JABBER_URL} return {'JABBER_URL': settings.JABBER_URL}
def domain_url(request):
return {'DOMAIN': settings.DOMAIN}