This commit is contained in:
Karen 2011-10-25 16:11:28 +05:30
commit 3d00ca149d
7 changed files with 17 additions and 9 deletions

View File

@ -6,6 +6,7 @@ import twitter
from django.template import RequestContext from django.template import RequestContext
from django import forms from django import forms
from django.forms.widgets import Textarea from django.forms.widgets import Textarea
from django.utils.html import urlize
class ContactForm(forms.Form): class ContactForm(forms.Form):
email = forms.EmailField() email = forms.EmailField()
@ -22,12 +23,12 @@ class ContactForm(forms.Form):
def index(request): def index(request):
try: try:
tApi = twitter.Api() tApi = twitter.Api()
statuses = tApi.GetUserTimeline(TWITTER_ID) statuses = tApi.GetUserTimeline(TWITTER_ID)[0:3]
except: except:
statuses = [] statuses = []
boxes = SliderBox.objects.all() boxes = SliderBox.objects.all()
return render_to_response("noel/index.html", RequestContext(request, { return render_to_response("noel/index.html", RequestContext(request, {
'tweets': statuses[0:5], 'tweets': [urlize(s.text) for s in statuses],
'boxes': boxes 'boxes': boxes
})) }))

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

View File

@ -1,7 +1,7 @@
{% load thumbnail %} {% load thumbnail %}
<div class="itfInfo"> <div class="itfInfo">
{% for s in stories %} {% for s in stories %}
<span class="orange">Situation: </span><span class="ifInfoInfo">{{ s.text|linebreaksbr }}</span> <span class="orange">Situation: </span><span class="ifInfoInfo">{{ s.text|safe|linebreaksbr }}</span>
{% if s.image %} {% if s.image %}
{% thumbnail s.image "164x114" crop="center" as im %} {% thumbnail s.image "164x114" crop="center" as im %}
<img class="itfInfoImg" src="{{ im.url }}" /> <img class="itfInfoImg" src="{{ im.url }}" />
@ -26,10 +26,10 @@
{% endif %} {% endif %}
<br /><br /> <br /><br />
{% if theatre %} {% if theatre %}
<span class="orange">Spotlight on Theatre: </span><span class="itfInfoInfo">{{ theatre|linebreaksbr }}</span> <br /><br /> <span class="orange">Spotlight on Theatre: </span><span class="itfInfoInfo">{{ theatre|safe|linebreaksbr }}</span> <br /><br />
{% endif %} {% endif %}
{% if quick_howto %} {% if quick_howto %}
<span class="orange">Best Practices or Quick, Tell Me How to Avoid Conflict! </span><span class="itfInfoInfo">{{ quick_howto|linebreaksbr }}</span><br /><br /> <span class="orange">Best Practices or Quick, Tell Me How to Avoid Conflict! </span><span class="itfInfoInfo">{{ quick_howto|safe|linebreaksbr }}</span><br /><br />
{% endif %} {% endif %}
{% if links %} {% if links %}

View File

@ -28,7 +28,7 @@
<div class="tab_container"> <div class="tab_container">
<div id="synopsis" class="tab_content"> <div id="synopsis" class="tab_content">
{{ meeting.intro }} {{ meeting.intro|safe }}
<!--Content--> <!--Content-->
</div> </div>
@ -94,7 +94,7 @@
<a href="/static/{{d.file}}">{{d.title}}</a> <a href="/static/{{d.file}}">{{d.title}}</a>
</div> </div>
<div class="intro"> <div class="intro">
{{ d.intro }} {{ d.intro|safe }}
</div> </div>
</div> </div>
{% endfor %} {% endfor %}

View File

@ -0,0 +1,3 @@
{{ short_description }} <br /><br />
<a href="{{ readable_file }}" class="bpRelated">Download Readable Version</a><br /><br />
<a href="{{ legal_file }}" class="bpRelated">Download Full Version</a>

View File

@ -1,3 +1,7 @@
<div class="orange">{{ title }}</div> <div class="orange">{{ title }}</div>
<span class="orange">Synopsis: </span> {{ synopsis }} {% if synopsis %}
<span class="orange">Synopsis: </span> {{ synopsis }} <br />
{% endif %}
<a class="bpRelated" href="{{ script_file }}">Download</a>

View File

@ -40,7 +40,7 @@
<div id="contentTab"> <div id="contentTab">
<ul> <ul>
{% for t in tweets %} {% for t in tweets %}
<li>{{ t.text }}</li> <li>{{ t|safe }}</li>
{% endfor %} {% endfor %}
<!-- <!--
<li>@dootah there's a new play this weekend. <span>bit.ly/xYr3dD</span></li> <li>@dootah there's a new play this weekend. <span>bit.ly/xYr3dD</span></li>