Cleaning up & Login Mechanism fixed

This commit is contained in:
Martin Bauer
2013-09-26 08:31:19 +02:00
parent 27bad18317
commit 204c8773a2
498 changed files with 52 additions and 22073 deletions

Binary file not shown.

View File

@@ -54,7 +54,6 @@ USE_TZ = True
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/var/www/example.com/media/"
MEDIA_ROOT = PROJECT_PATH + "/../media/"
##MEDIA_ROOT = '/'
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
@@ -112,12 +111,9 @@ ROOT_URLCONF = 'blechreiz.urls'
# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'blechreiz.wsgi.application'
TEMPLATE_DIRS = (
PROJECT_PATH + '/templates',
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)
@@ -137,21 +133,22 @@ INSTALLED_APPS = (
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
'django.contrib.admindocs',
'location_field',
'crispy_forms',
'musicians',
'eventplanner',
'sekizai',
'intern_area',
'website',
'rest_framework',
'messages',
'crispy_forms', # better looking forms ( bootstrap )
'sekizai', # for the addtoblock directive in templates
'rest_framework', # for event management api
# Own Things
'website', # Blechreiz Website in general
'musicians', # User Management
'eventplanner', # Event Management
'messages', # Messages ( Forum )
'location_field', # custom location field used in Event Management
)
LOGIN_URL="/login"
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.IsAuthenticated',),
@@ -212,5 +209,3 @@ LOGGING = {
}
}
GEOS_LIBRARY_PATH = PROJECT_PATH + '/libgeos_c.so.1.7.8'

View File

@@ -1,289 +0,0 @@
<!---------------------------------------------- CSS --------------------------------------------------->
{% addtoblock "css" strip %} <link rel="stylesheet" href="{{STATIC_URL}}/css/bootstrap.min.css" > {% endaddtoblock %}
{% addtoblock "css" strip %} <link rel="stylesheet" href="{{STATIC_URL}}/css/bootstrap-responsive.min.css" > {% endaddtoblock %}
{% addtoblock "css" strip %} <link rel="stylesheet" href="{{STATIC_URL}}/css/bootstrap-overrides.css"> {% endaddtoblock %}
{% addtoblock "css" strip %} <link rel="stylesheet" href="{{STATIC_URL}}/css/theme.css" type="text/css"> {% endaddtoblock %}
{% addtoblock "css" strip %} <link rel="stylesheet" href="{{STATIC_URL}}/css/index.css" type="text/css" media="screen" /> {% endaddtoblock %}
{% addtoblock "css" strip %} <link href='http://fonts.googleapis.com/css?family=Lato:300,400,700,900,300italic,400italic,700italic,900italic' rel='stylesheet' type='text/css'>{% endaddtoblock %
{% addtoblock "css" %}
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
{% endaddtoblock %}
<!-------------------------------------------- JavaScript --------------------------------------------------->
{% addtoblock "js" strip %} <script src="http://code.jquery.com/jquery-latest.js"></script> {% endaddtoblock %}
{% addtoblock "js" strip %} <script src="{{STATIC_URL}}/js/bootstrap.min.js"></script> {% endaddtoblock %}
{% addtoblock "js" strip %} <script src="{{STATIC_URL}}/js/jquery.countdown.min.js"></script> {% endaddtoblock %}
{% addtoblock "js" strip %} <script src="{{STATIC_URL}}/js/theme.js"></script> {% endaddtoblock %}
{% addtoblock "js" strip %} <script src="{{STATIC_URL}}/js/index-slider.js" type="text/javascript" ></script>{% endaddtoblock %}
<!DOCTYPE html>
<html>
<head>
<title>Blechreiz</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% render_block "css" %}
</head>
<body class="pull_top">
<!-- Menu -->
<div class="navbar transparent navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="index.html">
<img alt="Blechreiz" src="img/logo.png">
</a>
<div class="nav-collapse collapse">
<ul class="nav pull-right">
{% block menu %} {% endblock %}
</ul>
</div>
</div>
</div>
</div>
<!-- End Menu -->
{% block feature_slider %}
<section id="feature_slider" class="">
<article class="slide" id="showcasing" style="background: url('img/backgrounds/silver.jpg') repeat-x top center;">
<img class="asset left-30 sp600 t120 z1" src="img/slides/blechreiz01/gruppe.png" />
<div class="info">
<h2>Blechreiz</h2>
<h3>12 Musiker für einen guten Zweck </h3>
</div>
</article>
<article class="slide" id="tour" style="background: url('img/slides/blechreiz01/ticotico2.jpg') repeat-x top center;">
<div class="info">
<h2>Konzerte</h2>
<a href="features.html">Termine</a>
</div>
</article>
<article class="slide" id="tour" style="background: url('img/slides/blechreiz01/daempfer.jpg') repeat-x top center;">
<div class="info">
<h2>Konzerte</h2>
<a href="features.html">Termine</a>
</div>
</article>
<article class="slide" id="tour" style="background: url('img/slides/blechreiz01/andi.jpg') repeat-x top center;">
<div class="info">
<h2>Konzerte</h2>
<a href="features.html">Termine</a>
</div>
</article>
<article class="slide" id="tour" style="background: url('img/slides/blechreiz01/andi2.jpg') repeat-x top center;">
<div class="info">
<h2>Konzerte</h2>
<a href="features.html">Termine</a>
</div>
</article>
<article class="slide" id="tour" style="background: url('img/slides/blechreiz01/applaus.jpg') repeat-x top center;">
<div class="info">
<h2>Konzerte</h2>
<a href="features.html">Termine</a>
</div>
</article>
<article class="slide" id="tour" style="background: url('img/slides/blechreiz01/eindruck.jpg') repeat-x top center;">
<div class="info">
<h2>Konzerte</h2>
<a href="features.html">Termine</a>
</div>
</article>
<article class="slide" id="tour" style="background: url('img/slides/blechreiz01/publikum.jpg') repeat-x top center;">
<div class="info">
<h2>Konzerte</h2>
<a href="features.html">Termine</a>
</div>
</article>
<article class="slide" id="tour" style="background: url('img/slides/blechreiz01/spielen2.jpg') repeat-x top center;">
</article>
<article class="slide" id="showcasing" style="background: url('img/backgrounds/black_red_01.jpg') repeat-x top center;">
<img class="asset left-30 sp600 t120 z1" src="img/slides/blechreiz01/tuba.png" />
<div class="info">
<h2>Konzerte</h2>
<a href="features.html">Nächste Termine</a>
</div>
</article>
</section>
{% endblock %}
{% block content %} {% endblock %}
<!-- footer -->
<footer id="footer">
<div class="container">
<div class="row credits">
<div class="span12">
<div class="row copyright">
<div class="span12">
© 2013 Blechreiz
</div>
</div>
</div>
</div>
</div>
</footer>
{% render_block "js" %}
</body>
</html>
<!-- -------------------------------------- Old Stuff starts here -------------------------------- -->
{% load staticfiles %}
<!DOCTYPE html>
<html>
<head>
<title>Main Page</title>
<!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<link rel="stylesheet" type="text/css" href="{% static "css/bootstrap.min.css" %}" media="screen">
<title>{% block title %}Title{% endblock %}</title>
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
{% block header %}
Header
{% endblock %}
</div>
</div>
</div>
<div class="container-fluid">
<div class="row-fluid">
<div class="span3">
<div class="well sidebar-nav">
{% block sidebar %}<p>Sidebar</p>{% endblock %}
</div><!--/.well -->
</div><!--/span-->
<div class="span9">
<div class="hero-unit">
{% block content %}
<h1>Hello, world!</h1>
<p>This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
<p><a href="#" class="btn btn-primary btn-large">Learn more &raquo;</a></p>
{% endblock %}
</div>
</div><!--/span-->
</div><!--/row-->
<hr>
<footer>
<p>&copy; Martin Bauer</p>
</footer>
</div><!--/.fluid-container-->
<script src="http://code.jquery.com/jquery.js"></script>
<script src="{% static "js/bootstrap.min.js" %}"></script>
</body>
</html>

View File

@@ -1,20 +0,0 @@
{% if field.is_hidden %}
{{ field }}
{% else %}
<div class="control-group {% if field.errors %}error{% endif %}">
<label for="{{ field.auto_id }}" class="control-label">
{% if field.field.required %}<b>{% endif %}{{ field.label|safe }}{% if field.field.required %}*</b>{% endif %}
</label>
<div class="controls">
{{ field }}
{% if field.errors %}
<span class="help-inline">{% for error in field.errors %}{{ error }}<br/> {% endfor %}</span>
{% endif %}
{% if field.help_text%}
<p class="help-block">
{{ field.help_text|safe }}
</p>
{% endif %}
</div>
</div>
{% endif %}

View File

@@ -1,90 +0,0 @@
{% extends base.html %}
{% block content %}
{% addtoblock "css" strip %}<link rel="stylesheet" type="text/css" href="css/lib/animate.css" media="screen, projection">{% endaddtoblock %}
{% addtoblock "css" strip %}<link rel="stylesheet" href="css/coming-soon.css" type="text/css" media="screen" />{% endaddtoblock %}
{% addtoblock "js" %}
<script type="text/javascript">
$(function () {
var currentDate = new Date(),
finished = false,
availiableExamples = {
set35daysFromNow: 35 * 24 * 60 * 60 * 1000,
set5minFromNow : 5 * 60 * 1000,
set1minFromNow : 1 * 60 * 1000
};
function callback(event) {
$this = $(this);
$this.find('span#'+event.type).html(event.value);
switch(event.type) {
case "seconds":
case "minutes":
case "hours":
case "days":
case "weeks":
case "daysLeft":
case "finished":
}
}
$('div#clock').countdown(availiableExamples.set35daysFromNow + currentDate.valueOf(), callback);
});
</script>
{% endaddtoblock %}
<div id="coming_soon">
<div class="head">
<div class="container">
<div class="span6 text">
<h4>Unser nächstes Konzert</h4>
<p>
Ist in Rohr um 19:00 in der Was WeissIch Kirche <span>Bis dann</span>
<br />
Dorfplatz 5, Rohr
</p>
</div>
<div class="span6 count" id="clock">
<div class="box last">
<div class="circle">
<span id="seconds"></span>
</div>
<p>Sekunden</p>
</div>
<div class="box">
<div class="circle">
<span id="minutes"></span>
</div>
<p>Minuten</p>
</div>
<div class="box">
<div class="circle">
<span id="hours"></span>
</div>
<p>Stunden</p>
</div>
<div class="box">
<div class="circle">
<span id="days"></span>
</div>
<p>Tage</p>
</div>
<!-- <div class="box">
<div class="circle">
<span id="weeks"></span>
</div>
<p>Weeks</p>
</div> -->
</div>
</div>
</div>
</div>
{% endblock %}

View File

@@ -5,8 +5,6 @@ from django.contrib import admin
from musicians.views import MusicianList, addressbook
from musicians.views import user_edit
import intern_area.views
import website.views
import messages.views
@@ -21,11 +19,9 @@ urlpatterns = patterns('',
url(r'^events/', include( eventplanner.urls.urlpatterns) ),
url(r'^admin/', include(admin.site.urls) ),
url(r'^admin/doc/', include('django.contrib.admindocs.urls') ),
url(r'^musicians/$', MusicianList.as_view() ),
url(r'^musicians/(?P<username>[\w]+)$', user_edit ),
url(r'^addressbook/$', addressbook ),
url(r'^admin_area/$', intern_area.views.login_site ),
url(r'^login/$', website.views.login_view),
url(r'^logout/$', website.views.logout_view),
url(r'^messages/$', messages.views.message_view ),