Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions atxpy_home/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ def posts():

PostsMixin = context_mixin_factory(callback=posts)
CompiledStaticMixin = context_mixin_factory({
"USE_COMPILED_STATIC": settings.USE_COMPILED_STATIC,
"USE_COMPILED_STATIC": settings.USE_COMPILED_STATIC,
})
SettingsContextMixin = context_mixin_factory({
'SITE_NAME': settings.SITE_NAME,
})


class IndexView(PostsMixin, CompiledStaticMixin, DetailView):
class IndexView(PostsMixin,
CompiledStaticMixin,
SettingsContextMixin,
DetailView):
model = Hero
queryset = Hero.objects.all()
template_name = "index.html"
Expand Down
Empty file modified manage.py
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Django==1.4
Django==1.4.15
Markdown==2.1.1
Pinax==0.9a2
South==0.7.3
django-appconf==0.5
django-staticfiles==1.1.2
feedparser==5.1.1
httplib2==0.7.1
httplib2==0.9
icalendar==3.0.1b2
oauth2==1.5.170
-e git://github.com/joshmarshall/pinax-theme-bootstrap.git@5eed0fc721826325fcacea40e1830cb1b17d8189#egg=pinax_theme_bootstrap-dev
Expand Down
1 change: 1 addition & 0 deletions runtime.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python-2.7.8
27 changes: 9 additions & 18 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ <h2>Recent Posts</h2>
src="{{ post.author_avatar_url }}"/>
<h3>{{ post.title }}</h3>
<div class="post-info">
Published on {{ post.pub_date.date_string }} at
{{ post.pub_date.time_string }} by
{{ post.author.name }}
Published on {{ post.pub_date|date }} at
{{ post.pub_date|time }} by
{{ post.author.get_full_name }}
</div>
<!-- will use summary when we have full post pages -->
<div class="post-content">
Expand All @@ -90,7 +90,12 @@ <h3>{{ post.title }}</h3>
<h2>Tweets</h2>
</div>
</div>
<ul class="post-list" id="tweets"></ul>
<div>
<a class="twitter-timeline" href="https://twitter.com/awpug" data-widget-id="521347906880544768">Tweets by @awpug</a>
<script>
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
</script>
</div>
</div>

</div>
Expand All @@ -113,17 +118,3 @@ <h2>Tweets</h2>
</div>
</div>
{% endblock %}

{% block extra_script %}
<script type="text/javascript" src="{% static "js/twitter_search.js" %}"></script>
<script>
jQuery(function() {
jQuery(".dropdown-toggle").dropdown();
var twitter = new twitterSearch.TwitterSearch({
query: "awpug",
container: "#tweets"
});
twitter.init();
})
</script>
{% endblock %}
18 changes: 11 additions & 7 deletions templates/site_base.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
{% extends "theme_base.html" %}
{% load staticfiles %}

{% block head_title_base %}
{{ SITE_NAME }} | {{ object.title }}
{% endblock head_title_base %}

{% block style_base %}
{% if USE_COMPILED_STATIC %}
<link href="{% static "pinax/css/theme.css" %}" rel="stylesheet"/>
<link href="{% static "css/master.css" %}" rel="stylesheet"/>
{% else %}
<link href="{% static "pinax/css/theme.css" %}" rel="stylesheet">
<link href="{% static "pinax/css/theme.css" %}" rel="stylesheet">
<link href="{% static "bootstrap/less/bootstrap.less" %}"
rel="stylesheet/less" type="text/css">
<link href="{% static "bootstrap/less/responsive.less" %}"
rel="stylesheet/less" type="text/css">
<link href="{% static "less/base.less" %}"
rel="stylesheet/less" type="text/css">
{% endif %}
{% block extra_style %}{% endblock %}
{% endblock %}
{% block script_base %}
{% block extra_style %}{% endblock %}
{% endblock %}

{% block script_base %}
{% if not USE_COMPILED_STATIC %}
<script src="{% static "pinax/js/less-1.3.0.min.js" %}" type="text/javascript"></script>
{% endif %}
{{ block.super }}
{% endblock %}
{{ block.super }}
{% endblock %}

{% block body_class %}no-mobile-padding{% endblock %}

Expand Down