registration email, conditional for login / logout in template
This commit is contained in:
parent
f8820abf55
commit
e88e9940b8
|
@ -3,7 +3,7 @@ from django.shortcuts import render_to_response
|
|||
from models import *
|
||||
from settings import TWITTER_ID
|
||||
import twitter
|
||||
|
||||
from django.template import RequestContext
|
||||
|
||||
def index(request):
|
||||
tApi = twitter.Api()
|
||||
|
@ -17,11 +17,8 @@ def index(request):
|
|||
'items': [{'name': item.name, 'url': item.url} for item in m.menuitem_set.all()]
|
||||
}
|
||||
menus.append(d)
|
||||
return render_to_response("noel/index.html", {
|
||||
return render_to_response("noel/index.html", RequestContext(request, {
|
||||
'tweets': statuses[0:5],
|
||||
'boxes': boxes,
|
||||
'menus': menus
|
||||
})
|
||||
|
||||
|
||||
|
||||
}))
|
||||
|
|
|
@ -23,6 +23,8 @@ CKEDITOR_UPLOAD_PATH = join(PROJECT_PATH, "static/upload/images/")
|
|||
|
||||
AUTH_PROFILE_MODULE = "profiles.Person"
|
||||
|
||||
LOGIN_REDIRECT_URL = "/t/"
|
||||
|
||||
ADMINS = (
|
||||
# ('Your Name', 'your_email@domain.com'),
|
||||
)
|
||||
|
@ -38,7 +40,7 @@ DATABASE_PASSWORD = '' # Not used with sqlite3.
|
|||
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
|
||||
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
|
||||
|
||||
TWITTER_ID = "sachin_rt"
|
||||
TWITTER_ID = "indtheatreforum"
|
||||
|
||||
CACHES = {
|
||||
'default': {
|
||||
|
|
|
@ -70,8 +70,14 @@
|
|||
</ul>
|
||||
|
||||
<ul id="loginMenu">
|
||||
<li><a href="">Login</a></li>
|
||||
<li><a href="">Register</a></li>
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
<li><a href="/accounts/logout">Logout</a></li>
|
||||
{% else %}
|
||||
<li><a href="/accounts/login">Login</a></li>
|
||||
<li><a href="/accounts/register">Register</a></li>
|
||||
{% endif %}
|
||||
|
||||
<li><a href="">Contact Us</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
4
itf/templates/registration/logout.html
Normal file
4
itf/templates/registration/logout.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
{% extends 'registration/register_base.html' %}
|
||||
{% block reg_content %}
|
||||
Logged out. Thanks for using the website. Have a nice day!
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user