Browse Source

twitter upgrade to new api, fix comments form, fix roles in cast and crew

master
Sanjay B 11 years ago
parent
commit
0568402d9f
  1. 6
      itf/frontpage/views.py
  2. 3
      itf/templates/modules/itfprofiles/production.html
  3. 5
      itf/templates/noel/index.html

6
itf/frontpage/views.py

@ -9,6 +9,7 @@ from django.forms.widgets import Textarea
from django.utils.html import urlize
from django.core.mail import send_mail
from django.views.decorators.cache import cache_page
from utils import get_latest_tweets
class ContactForm(forms.Form):
name = forms.CharField(max_length=255)
@ -36,14 +37,13 @@ class ContactForm(forms.Form):
#@cache_page(60 * 30)
def index(request):
try:
tApi = twitter.Api()
statuses = tApi.GetUserTimeline(TWITTER_ID)[0:3]
statuses = get_latest_tweets()
except:
statuses = []
boxes = SliderBox.objects.filter(is_displayed=True)
front_images = FrontImage.objects.filter(is_active=True)[0:3]
return render_to_response("noel/index.html", RequestContext(request, {
'tweets': [urlize(s.text) for s in statuses],
'tweets': [urlize(s['text']) for s in statuses],
'boxes': boxes,
'front_images': front_images
}))

3
itf/templates/modules/itfprofiles/production.html

@ -148,7 +148,7 @@ $(function() {
</div>
<div class="productionEachTextA">
{{ p.role }}: <a href="{{ p.person.get_absolute_url }}">{{ p.person.first_name }} {{ p.person.last_name }}</a>
<b>{{ p.role|title }}:</b> <a href="{{ p.person.get_absolute_url }}">{{ p.person.first_name }} {{ p.person.last_name }}</a>
<div>
{{ p.person.about|truncatewords:80 }}
</div>
@ -204,6 +204,7 @@ $(function() {
</form>
<script>
$('#id_honeypot').closest('p').hide();
$('#id_url').closest('p').hide();
</script>
</div>

5
itf/templates/noel/index.html

@ -66,11 +66,12 @@
</div>
</div>
</div>
<a href="/m/events">
<div id="events" class="tab">
<h3 class="tabHeader">EVENTS</h3>
<a href="/page/events-coming-soon/" class="buttonTab"> Coming Soon </a>
<!-- <a href="/page/events-coming-soon/" class="buttonTab"> Coming Soon </a> -->
</div>
</a>
<div id="slider">
<img src="/static/images/noel/arrow-lft.png" width="27" height="39" alt="arrow-left" id="arrowLeft">

Loading…
Cancel
Save