Permalink
Browse files

damn merge conflicts.

  • Loading branch information...
2 parents af457d6 + 01f87d2 commit 85b5ff52dab79097271440699b6b47473ef017dc @chrisjones-brack3t chrisjones-brack3t committed May 28, 2012
View
8 dp/dp/settings/base.py
@@ -41,12 +41,6 @@
LOGIN_REDIRECT_URL = "/profile/"
LOGIN_URL = "/login/"
-POSTMAN_DISALLOW_ANONYMOUS = False
-POSTMAN_DISALLOW_MULTIRECIPIENTS = True
-POSTMAN_DISALLOW_COPIES_ON_REPLY = True
-POSTMAN_AUTO_MODERATE_AS = True
-POSTMAN_NOTIFIER_APP = None
-
EMAIL_USE_TLS = False
EMAIL_HOST = "localhost"
EMAIL_HOST_USER = ''
@@ -116,7 +110,6 @@
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
- "pagination.middleware.PaginationMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
)
@@ -128,7 +121,6 @@
"django.core.context_processors.static",
"django.contrib.messages.context_processors.messages",
"django.core.context_processors.request",
- "postman.context_processors.inbox",
)
AUTHENTICATION_BACKENDS = (
View
2 dp/dp/staticfiles/css/dp.css
@@ -1 +1 @@
-.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}body{background:#faf6e9;color:#222}body.standard-page{padding-top:40px}.navbar .brand{display:none}.navbar .navbar-label{color:#eee;font-weight:bold;line-height:18px;padding-top:9px}#mapContainer{margin-bottom:20px;margin-top:40px}#mapContainer #map{height:600px}@media(max-width:979px){.navbar .brand{display:block;float:left}#mapContainer{margin:-18px -20px 20px -20px}}
+.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}body{background:#faf6e9;color:#222}body.standard-page{padding-top:40px}.navbar .navbar-label{color:#eee;font-weight:bold;line-height:18px;padding-top:9px}#mapContainer{margin-bottom:20px;margin-top:40px}#mapContainer #map{height:600px}@media(max-width:979px){#mapContainer{margin:-18px -20px 20px -20px}}
View
8 dp/dp/staticfiles/less/dp.less
@@ -18,10 +18,6 @@ body {
}
.navbar {
- .brand {
- display: none;
- }
-
.navbar-label {
color: @grayLighter;
font-weight: bold;
@@ -40,10 +36,6 @@ body {
}
@media (max-width: 979px) {
- .navbar .brand {
- display: block;
- float: left;
- }
#mapContainer {
margin: -18px -20px 20px -20px;
}
View
3 dp/dp/urls.py
@@ -1,16 +1,15 @@
from django.conf.urls import patterns, include, url
from django.contrib import admin
-from generic.views import HomePageView
from profiles.views import ProfileView
admin.autodiscover()
urlpatterns = patterns('',
(r'', include("social_auth.urls")),
+ (r'', include("generic.urls")),
(r"^messages/", include("carrier_pigeon.urls", namespace="pigeon")),
- url(r"^$", HomePageView.as_view(), name="home"),
url(r"^profile/$", ProfileView.as_view(), name="profile"),
url(r"^admin/", include(admin.site.urls)),
)
View
8 dp/generic/urls.py
@@ -0,0 +1,8 @@
+from django.conf.urls import patterns, url
+
+from generic.views import HomePageView, LogoutView
+
+urlpatterns = patterns('',
+ url(r"^$", HomePageView.as_view(), name="home"),
+ url(r"^accounts/logout/$", LogoutView.as_view(), name="logout"),
+)
View
17 dp/generic/views.py
@@ -1,8 +1,23 @@
-from django.views.generic import TemplateView
+from django.core.urlresolvers import reverse
+from django.contrib.auth import logout
+from django.views.generic import RedirectView, TemplateView
+
+from braces.views import LoginRequiredMixin
class HomePageView(TemplateView):
template_name = "generic/index.html"
def get(self, request, *args, **kwargs):
return self.render_to_response({})
+
+
+class LogoutView(LoginRequiredMixin, RedirectView):
+ permanent = False
+
+ def get_redirect_url(self, **kwargs):
+ return reverse("home")
+
+ def get(self, request, *args, **kwargs):
+ logout(request)
+ return super(LogoutView, self).get(request, *args, **kwargs)
View
6 dp/templates/_layouts/base.html
@@ -36,10 +36,10 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
- <a class="brand" href="/">DjangoPeople.me</a>
+ <a class="brand" href="{% url home %}">DjangoPeople.me</a>
<nav class="nav-collapse">
<ul class="nav">
- <li class="active"><a href="/">Home</a></li>
+ <li class="active"><a href="{% url home %}">Home</a></li>
{% if request.user.is_authenticated %}
<li><a href="{% url pigeon:home %}">Messages</a></li>
{% endif %}
@@ -61,7 +61,7 @@
<ul class="dropdown-menu">
<li><a href="#"><i class="icon-cogs"></i> Edit Profile &amp; Options</a></li>
- <li><a href="#"><i class="icon-signout"></i> Sign out</a></li>
+ <li><a href="{% url logout %}"><i class="icon-signout"></i> Sign out</a></li>
</ul>
</li>
</ul>

0 comments on commit 85b5ff5

Please sign in to comment.