Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of https://github.com/jart/occupywallst

Conflicts:
	occupywallst/api.py
	occupywallst/views.py
  • Loading branch information...
commit 70c0ab4a6c43f60adbfebd6bf6b41584aa5f1eac 1 parent c30d064
@thirtyseven thirtyseven authored
Showing with 1,097 additions and 389 deletions.
  1. +0 −1  .gitignore
  2. +1 −0  README.rst
  3. +32 −10 occupywallst/admin.py
  4. +25 −2 occupywallst/api.py
  5. +2 −2 occupywallst/feeds.py
  6. +68 −0 occupywallst/fixtures/verbiage.json
  7. +1 −1  occupywallst/forms.py
  8. BIN  occupywallst/locale/es/LC_MESSAGES/django.mo
  9. +178 −0 occupywallst/locale/es/LC_MESSAGES/django.po
  10. BIN  occupywallst/locale/fr/LC_MESSAGES/django.mo
  11. +182 −0 occupywallst/locale/fr/LC_MESSAGES/django.po
  12. +33 −2 occupywallst/media/css/occupywallst.css
  13. BIN  occupywallst/media/img/19protest1-cityroom-blog480.jpg
  14. BIN  occupywallst/media/img/493738_445445524_n.jpg
  15. BIN  occupywallst/media/img/6179538758_3790db5029_z.jpg
  16. BIN  occupywallst/media/img/6186992231_9cc11d6010.jpg
  17. BIN  occupywallst/media/img/6187426019_10805bf5cd.jpg
  18. BIN  occupywallst/media/img/6187522516_771fe2a8df.jpg
  19. BIN  occupywallst/media/img/6187834314_1877e33145.jpg
  20. BIN  occupywallst/media/img/6201486243_4d57f01b4f.jpg
  21. BIN  occupywallst/media/img/6201968556_b3b3864509.jpg
  22. BIN  occupywallst/media/img/6201987644_30c3642fd1.jpg
  23. BIN  occupywallst/media/img/6202006416_9eac0243e2.jpg
  24. BIN  occupywallst/media/img/LibertyPlaza.jpg
  25. BIN  occupywallst/media/img/LibertyPlaza500.jpg
  26. BIN  occupywallst/media/img/Occupy-Wall-Street-Turns-Violent-12.jpg
  27. BIN  occupywallst/media/img/ajax-loader-32.gif
  28. BIN  occupywallst/media/img/brotherwest.jpg
  29. BIN  occupywallst/media/img/councilman.jpg
  30. BIN  occupywallst/media/img/dQqP3l.jpg
  31. BIN  occupywallst/media/img/day11-pic1.jpg
  32. BIN  occupywallst/media/img/day11-pic2.jpg
  33. BIN  occupywallst/media/img/day11-pic3.jpg
  34. BIN  occupywallst/media/img/fist.png
  35. BIN  occupywallst/media/img/hgqsw.jpg
  36. BIN  occupywallst/media/img/occupy_boston_ga.pdf
  37. BIN  occupywallst/media/img/occupy_chicago.jpg
  38. BIN  occupywallst/media/img/police-person.jpg
  39. BIN  occupywallst/media/img/susan.jpg
  40. +1 −1  occupywallst/media/js/occupywallst/article.js
  41. +46 −0 occupywallst/media/js/occupywallst/csrf.js
  42. +46 −0 occupywallst/media/js/occupywallst/forum.js
  43. +44 −0 occupywallst/media/js/occupywallst/index.js
  44. +17 −1 occupywallst/media/js/occupywallst/ows.js
  45. +10 −38 occupywallst/middleware.py
  46. +88 −5 occupywallst/models.py
  47. +19 −6 occupywallst/settings.py
  48. +9 −2 occupywallst/settings_dev.py
  49. +8 −71 occupywallst/templates/occupywallst/about.html
  50. +16 −10 occupywallst/templates/occupywallst/article.html
  51. +18 −16 occupywallst/templates/occupywallst/article_content.html
  52. +1 −1  occupywallst/templates/occupywallst/attendee_info.html
  53. +6 −2 occupywallst/templates/occupywallst/attendees.html
  54. +21 −47 occupywallst/templates/occupywallst/base.html
  55. +5 −1 occupywallst/templates/occupywallst/calendar.html
  56. +6 −2 occupywallst/templates/occupywallst/chat-old.html
  57. +5 −1 occupywallst/templates/occupywallst/chat.html
  58. +2 −1  occupywallst/templates/occupywallst/comment.html
  59. +7 −3 occupywallst/templates/occupywallst/conference.html
  60. +25 −34 occupywallst/templates/occupywallst/forum.html
  61. +17 −0 occupywallst/templates/occupywallst/forumpost_synopsis.html
  62. +5 −1 occupywallst/templates/occupywallst/housing.html
  63. +29 −75 occupywallst/templates/occupywallst/index.html
  64. +1 −0  occupywallst/templates/occupywallst/message.html
  65. +6 −2 occupywallst/templates/occupywallst/rides.html
  66. +0 −2  occupywallst/templates/occupywallst/signup.html
  67. +9 −21 occupywallst/templates/occupywallst/user.html
  68. +43 −7 occupywallst/templatetags/ows.py
  69. +3 −2 occupywallst/urls.py
  70. +14 −9 occupywallst/utils.py
  71. +46 −8 occupywallst/views.py
  72. +2 −2 setup.py
View
1  .gitignore
@@ -15,7 +15,6 @@ core
*~
*.rej
*.orig
-*.mo
.figleaf*
*.egg-info
*.egg
View
1  README.rst
@@ -46,6 +46,7 @@ Now install the project and the database schema::
sudo python setup.py develop
occupywallst-dev syncdb --noinput
+ occupywallst-dev loaddata verbiage
occupywallst-dev loaddata example_data
occupywallst-dev runserver 127.0.0.1:9001
View
42 occupywallst/admin.py
@@ -7,7 +7,7 @@
"""
-from django.contrib import messages
+from django.contrib import admin, messages
from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_404
from django.conf.urls.defaults import patterns
@@ -24,6 +24,7 @@ def __init__(self, *args, **kwargs):
BaseAdminSite.__init__(self, *args, **kwargs)
self.register(db.User, UserAdmin)
self.register(db.Group, GroupAdmin)
+ self.register(db.Verbiage, VerbiageAdmin)
self.register(db.NewsArticle, ArticleAdmin)
self.register(db.ForumPost, ArticleAdmin)
self.register(db.UserInfo, UserInfoAdmin)
@@ -43,14 +44,28 @@ class GeoAdmin(OSMGeoAdmin):
map_height = 500
-def content_field(obj):
- if not obj.content:
- return '!BLANK!'
- elif len(obj.content) < 30:
- return obj.content
- else:
- return obj.content[:30] + "..."
-content_field.short_description = 'Content'
+def content_field(maxlen):
+ def _content_field(obj):
+ if not obj.content:
+ return '!BLANK!'
+ elif len(obj.content) < maxlen:
+ return obj.content
+ else:
+ return obj.content[:maxlen] + "..."
+ _content_field.short_description = 'Content'
+ return _content_field
+
+
+class VerbiageTranslationInline(admin.StackedInline):
+ model = db.VerbiageTranslation
+ extra = 1
+
+
+class VerbiageAdmin(GeoAdmin):
+ inlines = (VerbiageTranslationInline,)
+ ordering = ('name',)
+ search_fields = ('name', 'content')
+ list_display = ('name', content_field(100))
class UserAdmin(BaseUserAdmin):
@@ -62,6 +77,11 @@ def save_model(self, request, user, form, change):
userinfo.save()
+class ArticleTranslationInline(admin.StackedInline):
+ model = db.ArticleTranslation
+ extra = 1
+
+
class ArticleAdmin(GeoAdmin):
date_hierarchy = 'published'
list_display = ('title', 'author', 'published', 'comment_count',
@@ -69,6 +89,8 @@ class ArticleAdmin(GeoAdmin):
list_filter = ('is_visible', 'is_deleted')
search_fields = ('title', 'content', 'author__username')
ordering = ('-published',)
+ prepopulated_fields = {"slug": ("title",)}
+ inlines = (ArticleTranslationInline,)
def get_urls(self):
urls = super(ArticleAdmin, self).get_urls()
@@ -100,7 +122,7 @@ def view_convert(self, request, id_):
class CommentAdmin(GeoAdmin):
date_hierarchy = 'published'
- list_display = (content_field, 'published', 'user', 'karma', 'ups',
+ list_display = (content_field(30), 'published', 'user', 'karma', 'ups',
'downs', 'is_removed', 'is_deleted')
list_filter = ('is_removed', 'is_deleted')
search_fields = ('content', 'user__username')
View
27 occupywallst/api.py
@@ -33,7 +33,7 @@
"""
import re
-from datetime import datetime, date
+from datetime import datetime, date, timedelta
from django.conf import settings
from django.contrib import auth
@@ -61,7 +61,22 @@ def _to_bool(val):
str(val).lower() == "true")
-def attendees(bounds=None, **kwargs):
+def forumlinks(after, count, **kwargs):
+ """Used for continuous stream of forum post links
+ """
+ after, count = int(after), int(count)
+ if after < 0 or count <= 0:
+ raise APIException("bad arguments")
+ articles = (db.Article.objects
+ .select_related("author")
+ .filter(is_visible=True, is_deleted=False)
+ .order_by('-published'))
+ for article in articles[after:after + count]:
+ yield render_to_string('occupywallst/forumpost_synopsis.html',
+ {'article': article})
+
+
+def attendees(bounds, **kwargs):
"""Find all people going who live within visible map area.
"""
if bounds:
@@ -463,6 +478,14 @@ def message_send(user, to_username, content, **kwargs):
if last:
if (datetime.now() - last[0].published).seconds < 30:
raise APIException("hey slow down a little!")
+ if not user.is_staff:
+ hours24 = datetime.now() - timedelta(hours=24)
+ rec = db.Message.objects.filter(from_user=user, published__gt=hours24)
+ sentusers = set(m.to_user.username for m in rec)
+ max_ = settings.OWS_MAX_PRIVMSG_USER_DAY
+ if len(sentusers) > max_:
+ raise APIException("you can't private message more than %d users "
+ "in one day" % (max_))
msg = db.Message.objects.create(from_user=user,
to_user=to_user,
content=content)
View
4 occupywallst/feeds.py
@@ -59,7 +59,7 @@ class RSSForumFeed(RSSNewsFeed):
title = "OccupyWallSt Forum"
link = settings.OWS_CANONICAL_URL
description = "Public discussion pertaining to the occupation"
- delay = timedelta(seconds=60 * 5)
+ delay = timedelta(seconds=60 * 60 * 2)
def items(self):
return (db.Article.objects
@@ -75,7 +75,7 @@ class RSSCommentFeed(Feed):
link = settings.OWS_CANONICAL_URL
description = "All comments submitted to the website"
description_template = 'occupywallst/feed-comment.html'
- delay = timedelta(seconds=60 * 5)
+ delay = timedelta(seconds=60 * 60 * 2)
def items(self):
return (db.Comment.objects
View
68 occupywallst/fixtures/verbiage.json
@@ -0,0 +1,68 @@
+loaded: occupywallst/settings_local.py
+loaded: occupywallst/settings_dev_local.py
+[
+ {
+ "pk": 3,
+ "model": "occupywallst.verbiage",
+ "fields": {
+ "content": "this site was brought to you by various radicals \r\nhosting for this site generously donated by [alternet](http://www.alternet.org/) <3 \r\nemail: [general@occupywallst.org](mailto:general@occupywallst.org) | help line: +1 (877) 881-3020",
+ "rendered": "<p>this site was brought to you by various radicals<br />\nhosting for this site generously donated by <a href=\"http://www.alternet.org/\">alternet</a> &lt;3<br />\nemail: <a href=\"mailto:general@occupywallst.org\">general@occupywallst.org</a> | help line: +1 (877) 881-3020</p>",
+ "name": "footer"
+ }
+ },
+ {
+ "pk": 2,
+ "model": "occupywallst.verbiage",
+ "fields": {
+ "content": "<div id=\"navbar\">\r\n <ul>\r\n <li class=\"item nav-news first\"><a class=\"fast\" title=\"News Articles\" href=\"/\">News</a></li>\r\n <li class=\"item nav-livestream\"><a title=\"Watch the Protest Live\" href=\"http://www.livestream.com/globalrevolution\">LiveStream</a></li>\r\n <li class=\"item nav-forum\"><a title=\"Public discussion board\" href=\"/forum/\">Forum</a></li>\r\n <li class=\"item nav-chat\"><a class=\"fast\" title=\"Web-based chatroom\" href=\"/chat/\">Chat</a></li>\r\n <li class=\"item nav-attendees\"><a class=\"fast\" title=\"Map of people involved\" href=\"/attendees/\">User Map</a></li>\r\n <li class=\"item nav-nycga\"><a title=\"NYC General Assembly\" href=\"http://nycga.cc/\">NYCGA</a></li>\r\n <li class=\"item nav-about\"><a class=\"fast\" title=\"About Us / Contact\" href=\"/about/\">About</a></li>\r\n <li class=\"item nav-donate\"><a class=\"fast\" title=\"Solidarity Forever!\" href=\"http://nycga.cc/?page_id=377\">Donate</a></li>\r\n <li class=\"last\">\r\n <a title=\"Facebook Event\" href=\"http://www.facebook.com/OccupyWallSt\"><img width=\"24\" height=\"24\" src=\"/media/img/facebook.png\" /></a>\r\n <a title=\"Our Twitter Page\" href=\"https://twitter.com/#!/OccupyWallSt\"><img width=\"24\" height=\"24\" src=\"/media/img/twitter.png\" /></a>\r\n <a title=\"Reddit\" href=\"http://www.reddit.com/r/occupywallstreet/\"><img width=\"24\" height=\"23\" style=\"padding-bottom:3px\" src=\"/media/img/reddit.png\" /></a>\r\n </li>\r\n </ul>\r\n</div> \r\n",
+ "rendered": "<div id=\"navbar\">\n <ul>\n <li class=\"item nav-news first\"><a class=\"fast\" title=\"News Articles\" href=\"/\">News</a></li>\n <li class=\"item nav-livestream\"><a title=\"Watch the Protest Live\" href=\"http://www.livestream.com/globalrevolution\">LiveStream</a></li>\n <li class=\"item nav-forum\"><a title=\"Public discussion board\" href=\"/forum/\">Forum</a></li>\n <li class=\"item nav-chat\"><a class=\"fast\" title=\"Web-based chatroom\" href=\"/chat/\">Chat</a></li>\n <li class=\"item nav-attendees\"><a class=\"fast\" title=\"Map of people involved\" href=\"/attendees/\">User Map</a></li>\n <li class=\"item nav-nycga\"><a title=\"NYC General Assembly\" href=\"http://nycga.cc/\">NYCGA</a></li>\n <li class=\"item nav-about\"><a class=\"fast\" title=\"About Us / Contact\" href=\"/about/\">About</a></li>\n <li class=\"item nav-donate\"><a class=\"fast\" title=\"Solidarity Forever!\" href=\"http://nycga.cc/?page_id=377\">Donate</a></li>\n <li class=\"last\">\n <a title=\"Facebook Event\" href=\"http://www.facebook.com/OccupyWallSt\"><img width=\"24\" height=\"24\" src=\"/media/img/facebook.png\" /></a>\n <a title=\"Our Twitter Page\" href=\"https://twitter.com/#!/OccupyWallSt\"><img width=\"24\" height=\"24\" src=\"/media/img/twitter.png\" /></a>\n <a title=\"Reddit\" href=\"http://www.reddit.com/r/occupywallstreet/\"><img width=\"24\" height=\"23\" style=\"padding-bottom:3px\" src=\"/media/img/reddit.png\" /></a>\n </li>\n </ul>\n</div>",
+ "name": "navbar"
+ }
+ },
+ {
+ "pk": 1,
+ "model": "occupywallst.verbiage",
+ "fields": {
+ "content": "<div>\r\n <img alt=\"Raised Fist\" title=\"Raised Fist\" id=\"fist\" src=\"/media/img/fist.png\" width=\"59\" height=\"94\" />\r\n <div id=\"brand\"><a href=\"/\"><span class=\"red\">Occupy</span>WallStreet</a></div>\r\n <div id=\"slogan\">\r\n The resistance continues at Liberty Square and <a href=\"http://occupytogether.org/\">Nationwide</a>!\r\n </div>\r\n</div>",
+ "rendered": "<div>\n <img alt=\"Raised Fist\" title=\"Raised Fist\" id=\"fist\" src=\"/media/img/fist.png\" width=\"59\" height=\"94\" />\n <div id=\"brand\"><a href=\"/\"><span class=\"red\">Occupy</span>WallStreet</a></div>\n <div id=\"slogan\">\n The resistance continues at Liberty Square and <a href=\"http://occupytogether.org/\">Nationwide</a>!\n </div>\n</div>",
+ "name": "header"
+ }
+ },
+ {
+ "pk": 4,
+ "model": "occupywallst.verbiage",
+ "fields": {
+ "content": "# About\r\n\r\nOccupyWallSt.org is the **unofficial** *de facto* online resource for the ongoing protests happening on Wall Street. We are an affinity group committed to doing technical support work for resistance movements. We are not affiliated with Adbusters, anonymous or any other organization.\r\n\r\nThe leaders of this movement are the everyday people participating in the occupation. We use a tool called the \"General Assembly\" to facilitate open, participatory and horizontal organizing between members of the public. We welcome people from all colors, genders and beliefs to participate in our daily assemblies. Visit the [NYC General Assembly](http://nycga.cc/) website to learn how you can become involved, read updates/minutes, or find out how you can adopt NYCGA processes to organize your own community.\r\n\r\n## July Press Release\r\n\r\nOn 13 Jul 2011, the group Adbusters released this call: [Occupy Wall Street!](http://www.adbusters.org/blogs/adbusters-blog/occupywallstreet.html)\r\n\r\nIn Solidarity, and as a response to this call, a planning group was formed [[occupywallst.org](http://staging.occupywallst.org/)], and an info sharing site established. The participation of every person, and every organization, that has an interest in returning the US back into the hands of it's individual citizens is required.\r\n\r\nOur nation, our species and our world are in crisis. The US has an important role to play in the solution, but we can no longer afford to let corporate greed and corrupt politics set the policies if our nation.\r\n\r\nWe, the people of the United States of America, considering the crisis at hand, now reassert our sovereign control of our land.\r\n\r\nSolidarity Forever!",
+ "rendered": "<h1>About</h1>\n<p>OccupyWallSt.org is the <strong>unofficial</strong> <em>de facto</em> online resource for the ongoing protests happening on Wall Street. We are an affinity group committed to doing technical support work for resistance movements. We are not affiliated with Adbusters, anonymous or any other organization.</p>\n<p>The leaders of this movement are the everyday people participating in the occupation. We use a tool called the \"General Assembly\" to facilitate open, participatory and horizontal organizing between members of the public. We welcome people from all colors, genders and beliefs to participate in our daily assemblies. Visit the <a href=\"http://nycga.cc/\">NYC General Assembly</a> website to learn how you can become involved, read updates/minutes, or find out how you can adopt NYCGA processes to organize your own community.</p>\n<h2>July Press Release</h2>\n<p>On 13 Jul 2011, the group Adbusters released this call: <a href=\"http://www.adbusters.org/blogs/adbusters-blog/occupywallstreet.html\">Occupy Wall Street!</a></p>\n<p>In Solidarity, and as a response to this call, a planning group was formed [<a href=\"http://staging.occupywallst.org/\">occupywallst.org</a>], and an info sharing site established. The participation of every person, and every organization, that has an interest in returning the US back into the hands of it's individual citizens is required.</p>\n<p>Our nation, our species and our world are in crisis. The US has an important role to play in the solution, but we can no longer afford to let corporate greed and corrupt politics set the policies if our nation.</p>\n<p>We, the people of the United States of America, considering the crisis at hand, now reassert our sovereign control of our land.</p>\n<p>Solidarity Forever!</p>",
+ "name": "about"
+ }
+ },
+ {
+ "pk": 5,
+ "model": "occupywallst.verbiage",
+ "fields": {
+ "content": "## Contact\r\n\r\n**Help & Directions** \r\n+1 (877) 881-3020\r\n\r\n**General Inquiries** \r\n<general@occupywallst.org>\r\n\r\n**Press Inquiries** \r\n<press@occupywallst.org>\r\n\r\n**Inquiries Re: OccupyWallSt.org** \r\n<info@occupywallst.org> \r\n+1 (516) 708-4777\r\n\r\n## Links\r\n\r\n- [NYC General Assembly](http://www.nycga.cc/)\r\n- [Occupy Together](http://www.occupytogether.org/)\r\n- [We Are The 99%](http://wearethe99percent.tumblr.com/)\r\n- [Photos on Flickr](http://www.flickr.com/search/?w=all&q=occupywallstreet+&m=tags)\r\n- [Adbusters #OccupyWallStreet](http://www.adbusters.org/campaigns/occupywallstreet)\r\n- [Take The Square](http://takethesquare.net/)\r\n- [US Day of Rage](http://www.usdayofrage.org/)\r\n\r\n[![October2011](/media/img/october2011_plug.jpg \"October2011: Stop The Machine\")](http://october2011.org/)\r\n\r\n## Source Code\r\n\r\n- [OccupyWallSt](https://github.com/jart/occupywallst/) (GitHub)",
+ "rendered": "<h2>Contact</h2>\n<p><strong>Help &amp; Directions</strong><br />\n+1 (877) 881-3020</p>\n<p><strong>General Inquiries</strong><br />\n<a href=\"&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#103;&#101;&#110;&#101;&#114;&#97;&#108;&#64;&#111;&#99;&#99;&#117;&#112;&#121;&#119;&#97;&#108;&#108;&#115;&#116;&#46;&#111;&#114;&#103;\">&#103;&#101;&#110;&#101;&#114;&#97;&#108;&#64;&#111;&#99;&#99;&#117;&#112;&#121;&#119;&#97;&#108;&#108;&#115;&#116;&#46;&#111;&#114;&#103;</a></p>\n<p><strong>Press Inquiries</strong><br />\n<a href=\"&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#112;&#114;&#101;&#115;&#115;&#64;&#111;&#99;&#99;&#117;&#112;&#121;&#119;&#97;&#108;&#108;&#115;&#116;&#46;&#111;&#114;&#103;\">&#112;&#114;&#101;&#115;&#115;&#64;&#111;&#99;&#99;&#117;&#112;&#121;&#119;&#97;&#108;&#108;&#115;&#116;&#46;&#111;&#114;&#103;</a></p>\n<p><strong>Inquiries Re: OccupyWallSt.org</strong><br />\n<a href=\"&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#105;&#110;&#102;&#111;&#64;&#111;&#99;&#99;&#117;&#112;&#121;&#119;&#97;&#108;&#108;&#115;&#116;&#46;&#111;&#114;&#103;\">&#105;&#110;&#102;&#111;&#64;&#111;&#99;&#99;&#117;&#112;&#121;&#119;&#97;&#108;&#108;&#115;&#116;&#46;&#111;&#114;&#103;</a><br />\n+1 (516) 708-4777</p>\n<h2>Links</h2>\n<ul>\n<li><a href=\"http://www.nycga.cc/\">NYC General Assembly</a></li>\n<li><a href=\"http://www.occupytogether.org/\">Occupy Together</a></li>\n<li><a href=\"http://wearethe99percent.tumblr.com/\">We Are The 99%</a></li>\n<li><a href=\"http://www.flickr.com/search/?w=all&amp;q=occupywallstreet+&amp;m=tags\">Photos on Flickr</a></li>\n<li><a href=\"http://www.adbusters.org/campaigns/occupywallstreet\">Adbusters #OccupyWallStreet</a></li>\n<li><a href=\"http://takethesquare.net/\">Take The Square</a></li>\n<li><a href=\"http://www.usdayofrage.org/\">US Day of Rage</a></li>\n</ul>\n<p><a href=\"http://october2011.org/\"><img alt=\"October2011\" src=\"/media/img/october2011_plug.jpg\" title=\"October2011: Stop The Machine\" /></a></p>\n<h2>Source Code</h2>\n<ul>\n<li><a href=\"https://github.com/jart/occupywallst/\">OccupyWallSt</a> (GitHub)</li>\n</ul>",
+ "name": "about-sidebar"
+ }
+ },
+ {
+ "pk": 6,
+ "model": "occupywallst.verbiage",
+ "fields": {
+ "content": "**Where:** Liberty Square <small>([How to get there](http://nycga.cc/?page_id=399))</small> \r\n**Help & Directions:** +1 (877) 881-3020 \r\n**General Inquiries:** <general@occupywallst.org> \r\n**Press Inquiries:** <press@occupywallst.org> \r\n**Watch:** This 10-Min Documentary \r\n**Read:** Latest NYCGA Minutes\r\n\r\n**Mail** \r\nThe UPS Store \r\nRe: Occupy Wall Street \r\n118A Fulton St. #205 \r\nNew York, NY 10038 \r\n<small>Money orders only please, cannot cash checks yet. Non-perishable goods only. We can accept packages of any size. We're currently low on food.</small>\r\n\r\n**Occupy Wall Street** is leaderless resistance movement with people of many colors, genders and political persuasions. The one thing we all have in common is that [We Are The 99%](http://wearethe99percent.tumblr.com/) that will no longer tolerate the greed and corruption of the 1%. We are using the revolutionary [Arab Spring](http://en.wikipedia.org/wiki/Arab_Spring) tactic to achieve our ends and encourage the use of nonviolence to maximize the safety of all participants.\r\n\r\n<iframe src=\"https://www.google.com/calendar/embed?title=Occupy%20Wall%20Street%20Agenda&amp;showNav=0&amp;showTabs=0&amp;showCalendars=0&amp;mode=AGENDA&amp;height=400&amp;wkst=1&amp;bgcolor=%23FFFFFF&amp;src=9a24srhq8ugb2l5ovamo723i0g%40group.calendar.google.com&amp;color=%23856508&amp;ctz=America%2FNew_York\" style=\" border-width:0 \" width=\"300\" height=\"400\" frameborder=\"0\" scrolling=\"no\"></iframe>\r\n\r\n[Click here](http://nycga.cc/calendar/) for NYCGA committee meeting times.",
+ "rendered": "<p><strong>Where:</strong> Liberty Square <small>(<a href=\"http://nycga.cc/?page_id=399\">How to get there</a>)</small><br />\n<strong>Help &amp; Directions:</strong> +1 (877) 881-3020<br />\n<strong>General Inquiries:</strong> <a href=\"&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#103;&#101;&#110;&#101;&#114;&#97;&#108;&#64;&#111;&#99;&#99;&#117;&#112;&#121;&#119;&#97;&#108;&#108;&#115;&#116;&#46;&#111;&#114;&#103;\">&#103;&#101;&#110;&#101;&#114;&#97;&#108;&#64;&#111;&#99;&#99;&#117;&#112;&#121;&#119;&#97;&#108;&#108;&#115;&#116;&#46;&#111;&#114;&#103;</a><br />\n<strong>Press Inquiries:</strong> <a href=\"&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#112;&#114;&#101;&#115;&#115;&#64;&#111;&#99;&#99;&#117;&#112;&#121;&#119;&#97;&#108;&#108;&#115;&#116;&#46;&#111;&#114;&#103;\">&#112;&#114;&#101;&#115;&#115;&#64;&#111;&#99;&#99;&#117;&#112;&#121;&#119;&#97;&#108;&#108;&#115;&#116;&#46;&#111;&#114;&#103;</a><br />\n<strong>Watch:</strong> This 10-Min Documentary<br />\n<strong>Read:</strong> Latest NYCGA Minutes</p>\n<p><strong>Mail</strong><br />\nThe UPS Store<br />\nRe: Occupy Wall Street<br />\n118A Fulton St. #205<br />\nNew York, NY 10038<br />\n<small>Money orders only please, cannot cash checks yet. Non-perishable goods only. We can accept packages of any size. We're currently low on food.</small></p>\n<p><strong>Occupy Wall Street</strong> is leaderless resistance movement with people of many colors, genders and political persuasions. The one thing we all have in common is that <a href=\"http://wearethe99percent.tumblr.com/\">We Are The 99%</a> that will no longer tolerate the greed and corruption of the 1%. We are using the revolutionary <a href=\"http://en.wikipedia.org/wiki/Arab_Spring\">Arab Spring</a> tactic to achieve our ends and encourage the use of nonviolence to maximize the safety of all participants.</p>\n<iframe src=\"https://www.google.com/calendar/embed?title=Occupy%20Wall%20Street%20Agenda&amp;showNav=0&amp;showTabs=0&amp;showCalendars=0&amp;mode=AGENDA&amp;height=400&amp;wkst=1&amp;bgcolor=%23FFFFFF&amp;src=9a24srhq8ugb2l5ovamo723i0g%40group.calendar.google.com&amp;color=%23856508&amp;ctz=America%2FNew_York\" style=\" border-width:0 \" width=\"300\" height=\"400\" frameborder=\"0\" scrolling=\"no\"></iframe>\n\n<p><a href=\"http://nycga.cc/calendar/\">Click here</a> for NYCGA committee meeting times.</p>",
+ "name": "index-sidebar"
+ }
+ },
+ {
+ "pk": 1,
+ "model": "occupywallst.verbiagetranslation",
+ "fields": {
+ "content": "<div>\r\n <img alt=\"Raised Fist\" title=\"Raised Fist\" id=\"fist\" src=\"/media/img/fist.png\" width=\"59\" height=\"94\" />\r\n <div id=\"brand\"><a href=\"/\"><span class=\"red\">Occupy</span>WallStreet</a></div>\r\n <div id=\"slogan\">\r\n La r\u00e9sistance pers\u00e9v\u00e8re au Liberty Square et <a href=\"http://occupytogether.org/\">nationale</a>!\r\n </div>\r\n</div>",
+ "rendered": "<div>\n <img alt=\"Raised Fist\" title=\"Raised Fist\" id=\"fist\" src=\"/media/img/fist.png\" width=\"59\" height=\"94\" />\n <div id=\"brand\"><a href=\"/\"><span class=\"red\">Occupy</span>WallStreet</a></div>\n <div id=\"slogan\">\n La r\u00e9sistance pers\u00e9v\u00e8re au Liberty Square et <a href=\"http://occupytogether.org/\">nationale</a>!\n </div>\n</div>",
+ "verbiage": 1,
+ "language": "fr"
+ }
+ }
+]
View
2  occupywallst/forms.py
@@ -28,7 +28,7 @@ class ProfileForm(forms.Form):
help_text="""
Do you want to receive an email notification when you receive a
private message or a comment response?""")
- notify_news = forms.BooleanField(required=False, initial=False,
+ notify_news = forms.BooleanField(required=False, initial=True,
label="News Notifications",
help_text="""
Can we email you notifications about news relating to the protest?""")
View
BIN  occupywallst/locale/es/LC_MESSAGES/django.mo
Binary file not shown
View
178 occupywallst/locale/es/LC_MESSAGES/django.po
@@ -0,0 +1,178 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-09-29 13:43+0000\n"
+"PO-Revision-Date: 2011-09-29 13:48+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+
+#: settings.py:100
+msgid "English"
+msgstr "Inglés"
+
+#: settings.py:101
+msgid "Spanish"
+msgstr "Español"
+
+#: settings.py:102
+msgid "French"
+msgstr "Francés"
+
+#: utils.py:127
+#, python-format
+msgid "%(x)d second"
+msgid_plural "%(x)d seconds"
+msgstr[0] "%(x)d segundo"
+msgstr[1] "%(x)d segundos"
+
+#: utils.py:130
+#, python-format
+msgid "%(x)d minute"
+msgid_plural "%(x)d minutes"
+msgstr[0] "%(x)d minuto"
+msgstr[1] "%(x)d minutos"
+
+#: utils.py:133
+#, python-format
+msgid "%(x)d hour"
+msgid_plural "%(x)d hours"
+msgstr[0] "%(x)d hora"
+msgstr[1] "%(x)d horas"
+
+#: utils.py:136
+#, python-format
+msgid "%(x)d day"
+msgid_plural "%(x)d days"
+msgstr[0] "%(x)d día"
+msgstr[1] "%(x)d días"
+
+#: utils.py:139
+#, python-format
+msgid "%(x)d month"
+msgid_plural "%(x)d months"
+msgstr[0] "%(x)d mes"
+msgstr[1] "%(x)d meses"
+
+#: templates/admin/auth/user/change_form.html:4
+msgid "OccupyWallSt User Info"
+msgstr ""
+
+#: templates/admin/occupywallst/article/change_form.html:5
+msgid "Convert to News Article"
+msgstr ""
+
+#: templates/admin/occupywallst/article/change_form.html:7
+msgid "Convert to Forum Post"
+msgstr ""
+
+#: templates/admin/occupywallst/comment/change_form.html:5
+msgid "Parent Comment"
+msgstr ""
+
+#: templates/occupywallst/article_content.html:7
+msgid "edit"
+msgstr ""
+
+#: templates/occupywallst/article_content.html:8
+msgid "delete"
+msgstr ""
+
+#: templates/occupywallst/article_content.html:23
+#: templates/occupywallst/article_content.html:25
+msgid "Posted"
+msgstr "Publicado"
+
+#: templates/occupywallst/article_content.html:23
+msgid "ago"
+msgstr "antes"
+
+#: templates/occupywallst/article_content.html:27
+msgid "by"
+msgstr "por"
+
+#: templates/occupywallst/base.html:7
+msgid "NYC Protest for American Revolution"
+msgstr ""
+
+#: templates/occupywallst/base.html:9
+msgid ""
+"News and resources for protesters attending the mass demonstration on Wall "
+"Street against financial greed and corruption"
+msgstr ""
+
+#: templates/occupywallst/base.html:29 templates/occupywallst/base.html:35
+msgid "Welcome"
+msgstr "Bienvenido"
+
+#: templates/occupywallst/base.html:31
+msgid "admin"
+msgstr ""
+
+#: templates/occupywallst/base.html:33
+msgid "logout"
+msgstr ""
+
+#: templates/occupywallst/base.html:36
+msgid "login"
+msgstr ""
+
+#: templates/occupywallst/base.html:37
+msgid "signup"
+msgstr "Inscripción"
+
+#: templates/occupywallst/base.html:43
+msgid ""
+"The resistance continues at Liberty Square and <a href=\"http://"
+"occupytogether.org/\">Nationwide</a>!"
+msgstr ""
+
+#: templates/occupywallst/base.html:51
+msgid "News"
+msgstr "Noticias"
+
+#: templates/occupywallst/base.html:53
+msgid "Forum"
+msgstr "Foro"
+
+#: templates/occupywallst/base.html:54
+msgid "Chat"
+msgstr "Charla"
+
+#: templates/occupywallst/base.html:55
+msgid "User Map"
+msgstr "Mapa"
+
+#: templates/occupywallst/base.html:57
+msgid "About"
+msgstr "Sobre"
+
+#: templates/occupywallst/base.html:58
+msgid "Donate"
+msgstr "Donar"
+
+#: templates/occupywallst/base.html:76
+msgid "this site was brought to you by various radicals"
+msgstr ""
+
+#: templates/occupywallst/base.html:77
+msgid "email"
+msgstr ""
+
+#: templates/occupywallst/base.html:77
+msgid "help line"
+msgstr ""
+
+#: templates/occupywallst/base.html:83
+msgid "Notifications"
+msgstr ""
View
BIN  occupywallst/locale/fr/LC_MESSAGES/django.mo
Binary file not shown
View
182 occupywallst/locale/fr/LC_MESSAGES/django.po
@@ -0,0 +1,182 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-09-29 08:06+0000\n"
+"PO-Revision-Date: 2011-09-29 08:15+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1)\n"
+
+#: settings.py:100
+msgid "English"
+msgstr "Anglaise"
+
+#: settings.py:101
+msgid "Spanish"
+msgstr "Espagnole"
+
+#: settings.py:102
+msgid "French"
+msgstr "Française"
+
+#: utils.py:127
+#, python-format
+msgid "%(x)d second"
+msgid_plural "%(x)d seconds"
+msgstr[0] "%(x)d seconde"
+msgstr[1] "%(x)d secondes"
+
+#: utils.py:130
+#, python-format
+msgid "%(x)d minute"
+msgid_plural "%(x)d minutes"
+msgstr[0] "%(x)d minute"
+msgstr[1] "%(x)d minutes"
+
+#: utils.py:133
+#, python-format
+msgid "%(x)d hour"
+msgid_plural "%(x)d hours"
+msgstr[0] "%(x)d heure"
+msgstr[1] "%(x)d heures"
+
+#: utils.py:136
+#, python-format
+msgid "%(x)d day"
+msgid_plural "%(x)d days"
+msgstr[0] "%(x)d jour"
+msgstr[1] "%(x)d jours"
+
+#: utils.py:139
+#, python-format
+msgid "%(x)d month"
+msgid_plural "%(x)d months"
+msgstr[0] "%(x)d mois"
+msgstr[1] "%(x)d mois"
+
+#: templates/admin/auth/user/change_form.html:4
+msgid "OccupyWallSt User Info"
+msgstr "Infos utilisateurs de OccupyWallSt"
+
+#: templates/admin/occupywallst/article/change_form.html:5
+msgid "Convert to News Article"
+msgstr ""
+
+#: templates/admin/occupywallst/article/change_form.html:7
+msgid "Convert to Forum Post"
+msgstr ""
+
+#: templates/admin/occupywallst/comment/change_form.html:5
+msgid "Parent Comment"
+msgstr ""
+
+#: templates/occupywallst/article_content.html:7
+msgid "edit"
+msgstr "modifier"
+
+#: templates/occupywallst/article_content.html:8
+msgid "delete"
+msgstr "supprimer"
+
+#: templates/occupywallst/article_content.html:23
+#: templates/occupywallst/article_content.html:25
+msgid "Posted"
+msgstr "Publié"
+
+#: templates/occupywallst/article_content.html:23
+msgid "ago"
+msgstr "auparavant"
+
+#: templates/occupywallst/article_content.html:27
+msgid "by"
+msgstr "par"
+
+#: templates/occupywallst/base.html:7
+msgid "NYC Protest for American Revolution"
+msgstr "Protest New York pour la Révolution américaine"
+
+#: templates/occupywallst/base.html:9
+msgid ""
+"News and resources for protesters attending the mass demonstration on Wall "
+"Street against financial greed and corruption"
+msgstr ""
+"Nouvelles et ressources pour les manifestants présents à la manifestation\n"
+"de masse à Wall Street contre l'avidité financière et la corruption"
+
+#: templates/occupywallst/base.html:29 templates/occupywallst/base.html:35
+msgid "Welcome"
+msgstr "Bienvenue"
+
+#: templates/occupywallst/base.html:31
+msgid "admin"
+msgstr "administrateur"
+
+#: templates/occupywallst/base.html:33
+msgid "logout"
+msgstr "déconnexion"
+
+#: templates/occupywallst/base.html:36
+msgid "login"
+msgstr "connexion"
+
+#: templates/occupywallst/base.html:37
+msgid "signup"
+msgstr "s'inscrire"
+
+#: templates/occupywallst/base.html:43
+msgid ""
+"The resistance continues at Liberty Square and <a href=\"http://"
+"occupytogether.org/\">Nationwide</a>!"
+msgstr ""
+"La résistance persévère au Liberty Square et\n"
+"<a href=\"http://occupytogether.org/\">nationale</a>!"
+
+#: templates/occupywallst/base.html:51
+msgid "News"
+msgstr "Nouvelles"
+
+#: templates/occupywallst/base.html:53
+msgid "Forum"
+msgstr "Forum"
+
+#: templates/occupywallst/base.html:54
+msgid "Chat"
+msgstr "Chat"
+
+#: templates/occupywallst/base.html:55
+msgid "User Map"
+msgstr "Carte"
+
+#: templates/occupywallst/base.html:57
+msgid "About"
+msgstr "À propos"
+
+#: templates/occupywallst/base.html:58
+msgid "Donate"
+msgstr "Don"
+
+#: templates/occupywallst/base.html:76
+msgid "this site was brought to you by various radicals"
+msgstr "ce site a été présenté par différents radicaux"
+
+#: templates/occupywallst/base.html:77
+msgid "email"
+msgstr "email"
+
+#: templates/occupywallst/base.html:77
+msgid "help line"
+msgstr "Aide téléphone"
+
+#: templates/occupywallst/base.html:83
+msgid "Notifications"
+msgstr "Notifications"
View
35 occupywallst/media/css/occupywallst.css
@@ -8,7 +8,7 @@ h1 { font-size: 1.8em; margin: 0; }
h2 { font-size: 1.3em; /* margin: 0 0; */ }
h1 a { color: black; }
textarea { font-family: Arial, sans-serif; }
-code, pre { font: 14px "Bitstream Vera Sans Mono", Monaco, "Courier New", Courier, monospace; }
+code, pre { font: 11px "Bitstream Vera Sans Mono", Monaco, "Courier New", Courier, monospace; }
pre { margin: 0 1em; }
.amp { font-family: Baskerville, 'Goudy Old Style', Palatino, 'Book Antiqua', serif;
@@ -22,6 +22,9 @@ pre { margin: 0 1em; }
#brand .red { color: #a00; }
#slogan { margin: 0; font-size: 1.5em; }
+#right h2:first-child { margin-top: 0; }
+#right p:first-child { margin-top: 0; }
+
#userbox {
position: absolute;
top: 0px;
@@ -74,12 +77,16 @@ pre { margin: 0 1em; }
#notifications .item a { display: block; }
#notifications .item span { display: block; font-size: 0.8em; color: #ccc; }
+#fist { float: left; margin-top: 1em; margin-right: 5px; }
+
#navbar ul {
font-size: 0.90em;
padding: 0;
width: 100%;
float: left;
background: #333;
+ background: -webkit-gradient(linear, left top, left bottom, from(#363636), to(#262626));
+ background: -moz-linear-gradient(top, #363636, #262626);
box-shadow: 0px 2px 3px rgba(0,0,0,0.30);
-moz-box-shadow: 0px 2px 3px rgba(0,0,0,0.30);
-webkit-box-shadow: 0px 2px 3px rgba(0,0,0,0.30);
@@ -111,6 +118,8 @@ pre { margin: 0 1em; }
#navbar li.item a:hover {
background: #900;
+ background: -webkit-gradient(linear, left top, left bottom, from(#a11), to(#900));
+ background: -moz-linear-gradient(top, #a11, #900);
}
#navbar li.last { padding-left: 0.5em; }
@@ -124,6 +133,27 @@ pre { margin: 0 1em; }
padding-left: 0.2em;
}
+#navbar li.nav-donate a {
+ background: #c60;
+ border-top: 1px solid #777;
+ border-left: 1px solid #777;
+ border-bottom: 1px solid #555;
+ border-right: 1px solid #555;
+ margin-top: -1px;
+ margin-bottom: -1px;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ background: -webkit-gradient(linear, left top, left bottom, from(#e82), to(#c60));
+ background: -moz-linear-gradient(top, #e82, #c60);
+}
+#navbar li.nav-donate a:hover {
+ background: #f93;
+ background: -webkit-gradient(linear, left top, left bottom, from(#f93), to(#e82));
+ background: -moz-linear-gradient(top, #e82, #c60);
+}
+#navbar li.last { border-left: none; }
+#navbar li.nav-donate { border-right: none; }
#right { width: 250px; font-size: 0.9em; vertical-align: top; }
#right350 { width: 350px; font-size: 0.9em; vertical-align: top; }
@@ -141,7 +171,6 @@ article p, article blockquote { }
article blockquote { color: #333; }
article p.info { color: #777; font-family: Arial, sans-serif; font-size: 0.9em;
margin-top: 0; }
-#articles article { border-bottom: 2px solid #eee; margin-bottom: 1em; }
#articles article:last-child { border-bottom: none; margin-bottom: 0; }
footer { clear: both; }
@@ -161,6 +190,7 @@ ul.errorlist li { color: red; font-weight: bold; padding: 0; margin: 0; }
.editform { margin: 1em 0; }
.comment .content { margin: 1em 1em; font-size: small; }
+.comment .words { overflow: auto; width: 600px; }
.comment .arrows { float: left; margin-left: -1em; font-weight: bold; }
.comment .info { color: #666; font-size: 0.9em; }
.comment .links { font-size: 0.9em; }
@@ -172,6 +202,7 @@ ul.errorlist li { color: red; font-weight: bold; padding: 0; margin: 0; }
.comment .deleted span { background: #eee; padding: 0.5em; }
.comment p, .comment blockquote { margin: 0.5em 0; }
.comment blockquote { margin-left: 0.2em; padding-left: 0.5em; border-left: 2px solid #aaa; }
+.comment pre { margin: 1em; }
.removed { background: #fcc; }
.highlight { background: #fffbcc; }
.replies { margin-left: 1em; }
View
BIN  occupywallst/media/img/19protest1-cityroom-blog480.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/493738_445445524_n.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/6179538758_3790db5029_z.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/6186992231_9cc11d6010.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/6187426019_10805bf5cd.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/6187522516_771fe2a8df.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/6187834314_1877e33145.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/6201486243_4d57f01b4f.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/6201968556_b3b3864509.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/6201987644_30c3642fd1.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/6202006416_9eac0243e2.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/LibertyPlaza.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/LibertyPlaza500.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/Occupy-Wall-Street-Turns-Violent-12.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/ajax-loader-32.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/brotherwest.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/councilman.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/dQqP3l.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/day11-pic1.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/day11-pic2.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/day11-pic3.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/fist.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/hgqsw.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/occupy_boston_ga.pdf
Binary file not shown
View
BIN  occupywallst/media/img/occupy_chicago.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/police-person.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  occupywallst/media/img/susan.jpg
Diff not rendered
View
2  occupywallst/media/js/occupywallst/article.js
@@ -222,7 +222,7 @@ jQuery.fn.numberAdd = function(delta) {
$(".down", content).click(function(ev) {
ev.preventDefault();
- if ($(".up", content).hasClass("downvoted"))
+ if ($(".down", content).hasClass("downvoted"))
return;
api("/api/comment_downvote/", {
"comment": comment_id
View
46 occupywallst/media/js/occupywallst/csrf.js
@@ -0,0 +1,46 @@
+
+(function() {
+ "use strict";
+
+ jQuery(document).ajaxSend(function(event, xhr, settings) {
+
+ function getCookie(name) {
+ var cookieValue = null;
+ if (document.cookie && document.cookie != '') {
+ var cookies = document.cookie.split(';');
+ for (var i = 0; i < cookies.length; i++) {
+ var cookie = jQuery.trim(cookies[i]);
+ // Does this cookie string begin with the name we want?
+ if (cookie.substring(0, name.length + 1) == (name + '=')) {
+ cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
+ break;
+ }
+ }
+ }
+ return cookieValue;
+ }
+
+ function sameOrigin(url) {
+ // url could be relative or scheme relative or absolute
+ var host = document.location.host; // host + port
+ var protocol = document.location.protocol;
+ var sr_origin = '//' + host;
+ var origin = protocol + sr_origin;
+ // Allow absolute or scheme relative URLs to same origin
+ return (url == origin || url.slice(0, origin.length + 1) == origin + '/') ||
+ (url == sr_origin || url.slice(0, sr_origin.length + 1) == sr_origin + '/') ||
+ // or any other URL that isn't scheme relative or absolute i.e relative.
+ !(/^(\/\/|http:|https:).*/.test(url));
+ }
+
+ function safeMethod(method) {
+ return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
+ }
+
+ if (!safeMethod(settings.type) && sameOrigin(settings.url)) {
+ xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken'));
+ }
+
+ });
+
+})();
View
46 occupywallst/media/js/occupywallst/forum.js
@@ -8,8 +8,54 @@ var forum_init;
var mark;
var latlng;
+ var per_page;
+ var is_loading = false;
+ var is_done = false;
+
function init(args) {
+ per_page = args.per_page;
init_postform($(".postform"));
+ pagination();
+ $("#newlink").click(function(ev) {
+ ev.preventDefault();
+ $(".postform").toggle(400);
+ });
+ }
+
+ function load_more() {
+ if (is_loading || is_done)
+ return;
+ is_loading = true;
+ var list = $("#thread-list");
+ var count = $(">.item", list).length;
+ api("/api/safe/forumlinks/", {
+ "after": count,
+ "count": per_page
+ }, function(data) {
+ if (data.status == "OK") {
+ $.each(data.results, function(k, html) {
+ list.append($(html));
+ });
+ $(".clickdiv").clickdiv();
+ is_loading = false;
+ } else if (data.status == "ZERO_RESULTS") {
+ is_done = true;
+ } else {
+ $("#loady").parent().text(data.message);
+ is_done = true;
+ }
+ }).error(function(err) {
+ $("#loady").parent().text(err.status + ' ' + err.statusText);
+ is_done = true;
+ });
+ }
+
+ function pagination() {
+ $(window).scroll(function(ev) {
+ if ($("#loady").scrolledToShow(250)) {
+ load_more();
+ }
+ }).scroll();
}
function init_postform(form) {
View
44 occupywallst/media/js/occupywallst/index.js
@@ -0,0 +1,44 @@
+
+var index_init;
+
+(function() {
+ "use strict";
+
+ var is_working = false;
+
+ function init(args) {
+ $(window).scroll(function(ev) {
+ if (is_working)
+ return;
+ $("#archives article.unloaded").each(function() {
+ if ($(this).scrolledToShow(250)) {
+ $(this).removeClass("unloaded");
+ $(".loady", this).fadeIn();
+ load_article($(this));
+ return false;
+ }
+ });
+ }).scroll();
+ }
+
+ function load_article(article) {
+ is_working = true;
+ api("/api/safe/article_get/", {
+ "article_slug": article.attr("id")
+ }, function(data) {
+ is_working = false;
+ if (data.status == "OK") {
+ article.replaceWith($(data.results[0].html));
+ } else {
+ $(".loady", article).parent().text(data.message);
+ }
+ }).error(function(err) {
+ is_working = false;
+ $(".loady", article).parent().text(err.status + ' ' + err.statusText);
+ });
+ }
+
+ // export stuff
+ index_init = init;
+
+})();
View
18 occupywallst/media/js/occupywallst/ows.js
@@ -22,7 +22,7 @@ var ows_inactivity_delay;
}
$(".clickdiv").clickdiv();
$(".hider").hider();
- setTimeout(subscriber, 100);
+ // setTimeout(subscriber, 100);
setInterval(function() {
$("#notifications .item span").each(function() {
$(this).text(timesince($(this).data('published')) + ' ago');
@@ -126,6 +126,22 @@ var ows_inactivity_delay;
};
/**
+ * Is page scrolled to make element visible?
+ */
+ jQuery.fn.scrolledToShow = function(expand) {
+ if (!this)
+ return;
+ if (!expand)
+ expand = 0;
+ var wtop = $(window).scrollTop() - expand;
+ var wbot = wtop + $(window).height() + expand;
+ var etop = this.offset().top;
+ var ebot = top + this.height();
+ return ((etop >= wtop && etop <= wbot) ||
+ (ebot >= wtop && ebot <= wbot));
+ };
+
+ /**
* Defer function until it hasn't been called for delay milliseconds
*
* This is useful for decorating event functions that get called a
View
48 occupywallst/middleware.py
@@ -40,45 +40,17 @@ def process_request(self, request):
request.META['REMOTE_HOST'] = None
-class SQLInfoMiddleware(object):
- """Add query statistics to end of HTML responses
+class CsrfCookieWhenLoggedIn(object):
+ """Tell Django to set CSRF cookie on all pages when logged in
+
+ Normally Django only sets the CSRF cookie when you use the CSRF
+ protection template tag. Because we use Ajax for just about
+ everything, we need to ensure this cookie is always set once the
+ user logs in.
"""
def process_response(self, request, response):
- if not response['Content-Type'].startswith('text/html'):
- print response['Content-Type']
- return response
- toto = 0.0
- queries = []
- for query in connection.queries:
- toto += float(query['time'])
- sql = (query['sql']
- .replace(' FROM ', '\n\nFROM ')
- .replace(' WHERE ', '\n\nWHERE ')
- .replace(' ORDER ', '\n\nORDER ')
- .replace(' INNER JOIN ', '\n\nINNER JOIN ')
- .replace(' LEFT OUTER JOIN ', '\n\nLEFT OUTER JOIN ')
- .replace('; args=( ', ';\n\nargs=(')
- .strip())
- queries.append({'time': query['time'], 'sql': sql})
- tpl = Template(r'''
- <div id="sql-info" class="hider">
- <div class="info toggle">
- <span>Query Count</span> <strong>{{ count }}</strong>
- <span>Total Time</span> <strong>{{ time }}</strong>
- </div>
- <div class="hidden">
- {% for query in queries %}
- <div class="item">
- <p><strong>{{ query.time }}</strong></p>
- {{ query.sql|linebreaks }}
- </div>
- {% endfor %}
- </div>
- </div>
- ''')
- ctx = Context({'queries': queries,
- 'count': len(queries),
- 'time': toto})
- response.content = response.content + tpl.render(ctx).encode('utf8')
+ if response.status_code == 200 and request.method == 'GET':
+ if request.user.is_authenticated():
+ request.META["CSRF_COOKIE_USED"] = True
return response
View
93 occupywallst/models.py
@@ -18,6 +18,7 @@
from datetime import date, timedelta
from django.conf import settings
+from django.core.cache import cache
from django.contrib.gis.db import models
from django.contrib.gis.geos import Point, LineString
from django.contrib.auth.models import User, Group
@@ -49,6 +50,60 @@ def _memoize(instance):
return _memoize
+class Verbiage(models.Model):
+ """Stores arbitrary website content fragments in Markdown
+ """
+ name = models.CharField(max_length=255, unique=True)
+ content = models.TextField(blank=True)
+ rendered = models.TextField(blank=True, editable=False)
+
+ @staticmethod
+ def get(name, lang=None):
+ verbs = cache.get('verbiage') or Verbiage._invalidate()
+ if name not in verbs:
+ return "[Verbiage '%s' not configured!]" % (name)
+ elif lang in verbs[name]:
+ return verbs[name][lang]
+ else:
+ return verbs[name]['default']
+
+ @staticmethod
+ def _invalidate():
+ verbs = {}
+ for obj in Verbiage.objects.all():
+ verb = {'default': obj.rendered}
+ for tran in VerbiageTranslation.objects.filter(verbiage=obj):
+ verb[tran.language] = tran.rendered
+ verbs[obj.name] = verb
+ cache.set('verbiage', verbs)
+ return verbs
+
+ def save(self):
+ from occupywallst.templatetags.ows import markup_unsafe
+ self.rendered = markup_unsafe(self.content)
+ super(Verbiage, self).save()
+ Verbiage._invalidate()
+
+ class Meta:
+ verbose_name_plural = "Verbiage"
+
+
+class VerbiageTranslation(models.Model):
+ verbiage = models.ForeignKey(Verbiage)
+ language = models.CharField(max_length=255, choices=settings.LANGUAGES)
+ content = models.TextField(blank=True)
+ rendered = models.TextField(blank=True, editable=False)
+
+ def save(self):
+ from occupywallst.templatetags.ows import markup_unsafe
+ self.rendered = markup_unsafe(self.content)
+ super(VerbiageTranslation, self).save()
+ Verbiage._invalidate()
+
+ class Meta:
+ unique_together = ("verbiage", "language")
+
+
class UserInfo(models.Model):
"""Extra DB information to associate with a Django auth user
"""
@@ -200,7 +255,7 @@ class Article(models.Model):
author = models.ForeignKey(User, null=True, blank=True, help_text="""
The user who wrote this article.""")
title = models.CharField(max_length=255, help_text="""
- A one-line title to describe ride.""")
+ A one-line title to describe article.""")
slug = models.SlugField(unique=True, help_text="""
A label for this article to appear in the url. DO NOT change
this once the article has been published.""")
@@ -310,12 +365,40 @@ def comments_as_user(self, user):
comhash[comid].upvoted = True
elif vote.vote == -1:
comhash[comid].downvoted = True
- if not user.is_staff:
- for com in comments:
- if com.is_removed and com.user == user:
- com.is_removed = False
+ if user:
+ if not user.is_staff:
+ for com in comments:
+ if com.is_removed and com.user == user:
+ com.is_removed = False
return comments
+ def translate(self, lang):
+ """Mangles title and content with translated text if available
+
+ Destroys save method so you can't shoot yourself in the foot.
+ """
+ if getattr(self, '__translated', False):
+ return
+ self.save = None
+ try:
+ trans = ArticleTranslation.objects.get(article=self, language=lang)
+ except ArticleTranslation.DoesNotExist:
+ pass
+ else:
+ self.content = trans.content
+ self.title = trans.title
+ self.__translated = True
+
+
+class ArticleTranslation(models.Model):
+ article = models.ForeignKey(Article)
+ language = models.CharField(max_length=255, choices=settings.LANGUAGES)
+ title = models.CharField(max_length=255)
+ content = models.TextField(blank=True)
+
+ class Meta:
+ unique_together = ("article", "language")
+
class NewsArticleManager(models.GeoManager):
def get_query_set(self):
View
25 occupywallst/settings.py
@@ -23,7 +23,8 @@
OWS_POST_LIMIT_THREAD = 60 * 5 # five minutes
OWS_POST_LIMIT_COMMENT = 30 # 30 seconds
-OWS_CANONICAL_URL = 'https://occupywallst.org' # no path or trailing slash
+OWS_MAX_PRIVMSG_USER_DAY = 7
+OWS_CANONICAL_URL = 'http://occupywallst.org' # no path or trailing slash
OWS_NOTIFY_PUB_ADDR = ('127.0.0.1', 9010)
OWS_SCRIPTS = ['js/occupywallst/' + fname
@@ -51,6 +52,7 @@
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
+ 'KEY_PREFIX': os.getenv('VIRTUAL_ENV'),
'LOCATION': [
'127.0.0.1:11211',
],
@@ -80,20 +82,27 @@
CSRF_COOKIE_DOMAIN = '.occupywallst.org'
CSRF_COOKIE_SECURE = False
TIME_ZONE = 'UTC'
-LANGUAGE_CODE = 'en-us'
DEFAULT_CHARSET = 'utf-8'
ROOT_URLCONF = 'occupywallst.urls'
LOGIN_URL = '/login/'
LOGOUT_URL = '/logout/'
LOGIN_REDIRECT_URL = '/'
-MEDIA_URL = '/media/'
-ADMIN_MEDIA_PREFIX = '/media/admin/'
+MEDIA_URL = 'http://2439-occupywallst-com.voxcdn.com/media/'
+ADMIN_MEDIA_PREFIX = 'http://2439-occupywallst-com.voxcdn.com/media/admin/'
# SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
SESSION_ENGINE = 'occupywallst.memcachedjson'
# change me in production
SECRET_KEY = 'oek(taazh36*h939oau#$%()dhueha39h(3zhc3##ev_jpfyd2'
+gettext_noop = lambda s: s
+LANGUAGE_CODE = 'en-us'
+LANGUAGES = (
+ ('en', gettext_noop('English')),
+ ('es', gettext_noop('Spanish')),
+ ('fr', gettext_noop('French')),
+)
+
TEMPLATE_LOADERS = (
('django.template.loaders.cached.Loader', (
'django.template.loaders.filesystem.Loader',
@@ -118,10 +127,12 @@
'occupywallst.middleware.XForwardedForMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.transaction.TransactionMiddleware',
+ 'django.middleware.locale.LocaleMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
- 'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
+ 'django.middleware.csrf.CsrfViewMiddleware',
+ 'occupywallst.middleware.CsrfCookieWhenLoggedIn',
'occupywallst.middleware.NeverCache',
]
@@ -137,7 +148,9 @@
try:
from occupywallst.settings_local import *
except ImportError:
- pass
+ print "not found: occupywallst/settings_local.py"
+else:
+ print "loaded: occupywallst/settings_local.py"
def minify():
View
11 occupywallst/settings_dev.py
@@ -4,6 +4,9 @@
DEBUG = True
TEMPLATE_DEBUG = DEBUG
+MEDIA_URL = '/media/'
+ADMIN_MEDIA_PREFIX = '/media/admin/'
+
SESSION_COOKIE_DOMAIN = '.dev.occupywallst.org'
CSRF_COOKIE_DOMAIN = '.dev.occupywallst.org'
@@ -13,7 +16,9 @@
]
MIDDLEWARE_CLASSES += ['occupywallst.middleware.PrintException']
-MIDDLEWARE_CLASSES += ['occupywallst.middleware.SQLInfoMiddleware']
+MIDDLEWARE_CLASSES += ['debug_toolbar.middleware.DebugToolbarMiddleware']
+
+INSTALLED_APPS += ['debug_toolbar']
LOGGING = {
'version': 1,
@@ -73,4 +78,6 @@
try:
from occupywallst.settings_dev_local import *
except ImportError:
- pass
+ print "not found: occupywallst/settings_dev_local.py"
+else:
+ print "loaded: occupywallst/settings_dev_local.py"
View
79 occupywallst/templates/occupywallst/about.html
@@ -1,87 +1,24 @@
{% extends base %}
+{% load ows %}
{% block title %}About Us | OccupyWallSt.org{% endblock title %}
{% block stylesheets %}
<style type="text/css">
- #navbar .nav-about { background: #900; }
+ #navbar .nav-about {
+ background: #900;
+ background: -webkit-gradient(linear, left top, left bottom, from(#a11), to(#900));
+ background: -moz-linear-gradient(top, #a11, #900);
+ }
</style>
{% endblock stylesheets %}
{% block content %}
<table style="width:100%"><tbody><tr><td id="left">
<div id="about">
- <h1>About</h1>
- <p>
- OccupyWallSt.org is a free / open source social networking
- tool for activists. This website is <em>unofficial</em> and
- not affiliated with Adbusters or Anonymous. We, the
- maintainers of this website, are an independent group of
- organizers committed to doing technical support work for
- resistance movements.
- </p>
- <h3>July Press Release</h3>
- <p>
- On 13 Jul 2011, the group Adbusters released this
- call: <a href="http://www.adbusters.org/blogs/adbusters-blog/occupywallstreet.html">Occupy
- Wall Street!</a>
- </p>
- <p>
- In Solidarity, and as a response to this call, a planning
- group was formed
- [<a href="/">occupywallst.org</a>], and
- an info sharing site established. The participation of every
- person, and every organization, that has an interest in
- returning the US back into the hands of it's individual
- citizens is required.
- </p>
- <p>
- Our nation, our species and our world are in crisis. The US has
- an important role to play in the solution, but we can no longer
- afford to let corporate greed and corrupt politics set the
- policies if our nation.
- </p>
- <p>
- We, the people of the United States of America, considering the
- crisis at hand, now reassert our sovereign control of our land.
- </p>
- <p>
- Solidarity Forever!
- </p>
+ {% verbiage 'about' LANGUAGE_CODE %}
</div>
</td><td id="right">
- <h2 style="margin-top:0">Contact</h2>
- <p>
- <strong>Help & Directions</strong><br />
- +1 (877) 881-3020
- </p>
- <p>
- <strong>General Inquiries</strong><br />
- <a href="mailto:9.17occupywallstreet@gmail.com">9.17occupywallstreet@gmail.com</a>
- </p>
- <p>
- <strong>Inquiries Re: OccupyWallSt.org</strong><br />
- <a href="mailto:info@occupywallst.org">info@occupywallst.org</a><br />
- +1 (516) 708-4777
- </p>
- <h2>Links</h2>
- <div style="margin-left:1em">
- <a href="http://october2011.org/"><img width="150" height="108" src="/media/img/october2011_plug.jpg" /></a>
- </div>
- <ul class="linklist">
- <li><a href="https://twitter.com/#!/search?q=%23OccupyWallStreet">Twitter #TakeWallStreet</a></li>
- <li><a href="http://takethesquare.net/">Take The Square</a></li>
- <li><a href="http://www.usdayofrage.org/">US Day of Rage</a></li>
- <li><a href="http://www.facebook.com/event.php?eid=181396025266998">#occupycanarywharf</a></li>
- <li><a href="http://occupywallstreet.com/">OccupyWallStreet.com</a></li>
- <li><a href="https://twitter.com/#!/search?q=%23OccupyWallStreet">Twitter #OccupyWallStreet</a></li>
- </ul>
- <h2>Source Code</h2>
- <ul>
- <li>
- <a href="https://github.com/jart/occupywallst/">OccupyWallSt</a>
- (GitHub)
- </li>
- </ul>
+ {% verbiage 'about-sidebar' LANGUAGE_CODE %}
</td></tr></tbody></table>
{% endblock content %}
View
26 occupywallst/templates/occupywallst/article.html
@@ -1,7 +1,13 @@
{% extends base %}
{% load ows %}
+{% load i18n %}
+{% load cache %}
-{% block title %}{{ article.title }} | OccupyWallSt.org {% if forum %}Forum{% endif %}{% endblock title %}
+{% block title %}
+ {% get_current_language as LANGUAGE_CODE %}
+ {% translate_object article LANGUAGE_CODE %}
+ {{ article.title }} | OccupyWallSt.org {% if forum %}Forum{% endif %}
+{% endblock title %}
{# this is ESPECIALLY important for SEO because news articles are
displayed both on the index page and the forum page. we don't
@@ -13,10 +19,15 @@
{% block stylesheets %}
<style type="text/css">
{% if forum %}
- #navbar .nav-forum { background: #900; }
+ #navbar .nav-forum {
{% else %}
- #navbar .nav-news { background: #900; }
+ #navbar .nav-news {
{% endif %}
+ background: #900;
+ background: -webkit-gradient(linear, left top, left bottom, from(#a11), to(#900));
+ background: -moz-linear-gradient(top, #a11, #900);
+ }
+ .view-comments { display: none; }
</style>
{% endblock stylesheets %}
@@ -34,14 +45,9 @@ <h3 id="comments">
<div id="postform">
<textarea rows="5" cols="70"></textarea><br />
<button class="save">post comment</button>
- <img class="loader" src="/media/img/ajax-loader.gif"
+ <img class="loader" src="{{ MEDIA_URL }}img/ajax-loader.gif"
width="16" height="16" />
<span class="error"></span>
- {% if not user.is_authenticated %}
- <p class="warning"><strong>Warning:</strong> When posting anonymously
- you will not be able to edit/delete your post. Please consider
- <a href="{% url signup %}">signing up for account</a>.</p>
- {% endif %}
</div>
<section id="comment-list">
{% show_comments user comments %}
@@ -79,7 +85,7 @@ <h3 style="margin-top:0">Other Articles</h3>
<textarea rows="5" cols="70"></textarea><br />
<button class="save">save</button>
<button class="cancel">cancel</button>
- <img class="loader" src="/media/img/ajax-loader.gif" width="16" height="16" />
+ <img class="loader" src="{{ MEDIA_URL }}img/ajax-loader.gif" width="16" height="16" />
<span class="error"></span>
</div>
View
34 occupywallst/templates/occupywallst/article_content.html
@@ -1,14 +1,23 @@
{% load ows %}
+{% load i18n %}
+{% load l10n %}
<article id="{{ article.slug }}">
- <h1>{{ article.title }}</h1>
+ {% get_current_language as LANGUAGE_CODE %}
+ {% translate_object article LANGUAGE_CODE %}
+ <h1><a href="{{ article.get_absolute_url }}">
+ {{ article.title }}
+ {% if article.is_forum and not article.author.is_staff %}(User Submitted){% endif %}
+ </a></h1>
<p class="info">
+ {% trans "Posted" %} {{ article.published|as_timezone:"US/Eastern"|date:"DATETIME_FORMAT" }} EST
{% if forum %}
- Posted {{ article.published|timesince_short }} ago
- {% else %}
- Posted {{ article.published|date:"Y-m-d h:i:s T" }}
+ ({{ article.published|timesince_short }} {% trans "ago" %})
{% endif %}
- by {% if not article.author %}anonymous{% else %}
+ {% trans "by" %}
+ {% if not article.author %}
+ anonymous
+ {% else %}
<a rel="author" title="View {{ article.author.username }}'s profile"
class="user" href="{{ article.author.get_absolute_url }}">
{{ article.author.username }}</a>
@@ -18,17 +27,6 @@
{% endif %}
{% endif %}
{% endif %}
- {% if user.is_authenticated and user == article.author %}
- | <a class="edit" href="#">edit</a>
- | <a class="delete" href="#">delete</a>
- {% endif %}
- {% if user.is_staff %}
- {% if article.is_forum %}
- | <a href="/admin/occupywallst/forumpost/{{ article.id }}/">admin</a>
- {% else %}
- | <a href="/admin/occupywallst/newsarticle/{{ article.id }}/">admin</a>
- {% endif %}
- {% endif %}
</p>
<div class="words">
{% if article.allow_html %}
@@ -37,4 +35,8 @@
{{ article.content|markup }}
{% endif %}
</div>
+ <p class="view-comments">
+ <a title="View Comments" href="{{ article.get_absolute_url }}#comments">
+ {{ article.comment_count|localize }} Comments</a>
+ </p>
</article>
View
2  occupywallst/templates/occupywallst/attendee_info.html
@@ -26,7 +26,7 @@
<p class="postform">
<textarea rows="3" cols="40"></textarea><br />
<button class="save">send private message</button>
- <img class="loader" src="/media/img/ajax-loader.gif" width="16" height="16" />
+ <img class="loader" src="{{ MEDIA_URL }}img/ajax-loader.gif" width="16" height="16" />
<span class="error"></span>
</p>
View
8 occupywallst/templates/occupywallst/attendees.html
@@ -4,7 +4,11 @@
{% block stylesheets %}
<style type="text/css">
- #navbar .nav-attendees { background: #900; }
+ #navbar .nav-attendees {
+ background: #900;
+ background: -webkit-gradient(linear, left top, left bottom, from(#a11), to(#900));
+ background: -moz-linear-gradient(top, #a11, #900);
+ }
</style>
{% endblock stylesheets %}
@@ -26,7 +30,7 @@
<section id="attendees">
<h1 style="margin-bottom: 0.5em; ">
User Map
- <img id="loader" class="loader" src="/media/img/ajax-loader.gif" width="16" height="16" />
+ <img id="loader" class="loader" src="{{ MEDIA_URL }}img/ajax-loader.gif" width="16" height="16" />
</h1>
<div style="width: 100%; height: 500px; " id="map"></div>
</section>
View
68 occupywallst/templates/occupywallst/base.html
@@ -2,18 +2,20 @@
<html>
<head>
{% load ows %}
+ {% load i18n %}
+ {% get_current_language as LANGUAGE_CODE %}
<meta charset="utf-8" />
- <title>{% block title %}OccupyWallSt.org | The American Revolution Begins Sept 17th{% endblock title %}</title>
- <link rel="shortcut icon" href="/media/img/bull16.png" />
- <meta name="description" content="News and resources for protesters attending the mass demonstration on Wall Street against financial greed and corruption" />
+ <title>{% block title %}Occupy Wall Street | {% trans "NYC Protest for American Revolution" %}{% endblock title %}</title>
+ <link rel="shortcut icon" href="{{ MEDIA_URL }}img/bull16.png" />
+ <meta name="description" content="{% trans 'News and resources for protesters attending the mass demonstration on Wall Street against financial greed and corruption' %}" />
{% block canonical %}
<link rel="canonical" href="{{ OWS_CANONICAL_URL }}{{ request.path }}" />
{% endblock canonical %}
<link rel="alternate" type="application/rss+xml" title="OccupyWallSt News" href="{% url rss-news %}" />
<link rel="alternate" type="application/rss+xml" title="OccupyWallSt Forum Threads" href="{% url rss-forum %}" />
<link rel="alternate" type="application/rss+xml" title="OccupyWallSt News/Forum Comments" href="{% url rss-comments %}" />
- <link rel="stylesheet" href="/media/css/occupywallst.css?v=21" type="text/css" media="all" />
- <link rel="stylesheet" href="/media/css/occupywallst_print.css?v=9" type="text/css" media="print" />
+ <link rel="stylesheet" href="{{ MEDIA_URL }}css/occupywallst.css?v=26" type="text/css" media="all" />
+ <link rel="stylesheet" href="{{ MEDIA_URL }}css/occupywallst_print.css?v=9" type="text/css" media="print" />
{% block extra_head %}
{% endblock extra_head %}
{% block stylesheets %}
@@ -25,79 +27,52 @@
<header>
<div id="userbox">
{% if user.is_authenticated %}
- Welcome <a href="{{ user.get_absolute_url }}">{{ user.username }}</a> |
+ {% trans "Welcome" %} <a href="{{ user.get_absolute_url }}">{{ user.username }}</a> |
{% if user.is_staff %}
- <a href="{% url admin:index %}">admin</a> |
+ <a href="{% url admin:index %}">{% trans "admin" %}</a> |
{% endif %}
- <a href="{% url logout %}">logout</a>
+ <a href="{% url logout %}">{% trans "logout" %}</a>
{% else %}
- Welcome!
- <a href="{% url login %}">login</a> |
- <a href="{% url signup %}">signup</a>
+ {% trans "Welcome" %}
+ <a href="{% url login %}">{% trans "login" %}</a> |
+ <a href="{% url signup %}">{% trans "signup" %}</a>
{% endif %}
</div>
- <div id="brand"><a href="{% url index %}"><span class="red">Occupy</span>WallStreet</a></div>
- <div id="slogan">
- The resistance continues at <a href="http://nycga.cc/?page_id=399">Liberty Plaza</a>, with free pizza ;)
- </div>
+ {% verbiage 'header' LANGUAGE_CODE %}
</header>
{% endblock header %}
{% block nav %}
<nav>
- <div id="navbar">
- <ul>
- <li class="item nav-news first"><a class="fast" title="News Articles" href="{% url index %}">News</a></li>
- <li class="item nav-livestream"><a title="Watch the Protest Live" href="http://www.livestream.com/globalrevolution">LiveStream</a></li>
- <li class="item nav-resources"><a title="Resources" href="http://nycga.cc/?p=294">Resources</a></li>
- <li class="item nav-forum"><a title="Public discussion board" href="{% url forum %}">Forum</a></li>
- <li class="item nav-chat"><a class="fast" title="Web-based chatroom" href="{% url chat %}">Chat</a></li>
- <li class="item nav-attendees"><a class="fast" title="Map of people involved" href="{% url attendees %}">User Map</a></li>
- <!-- <li class="item nav-calendar"><a class="fast" title="Google Calendar" href="{% url calendar %}">Calendar</a></li> -->
- <li class="item nav-photos"><a title="Protest Photos on Flickr" href="http://www.flickr.com/search/?w=all&q=occupywallstreet+&m=tags">Photos</a></li>
- <li class="item nav-conf"><a class="fast" title="Telephone Conference Bridges" href="{% url conference %}">Conference</a></li>
- <li class="item nav-about"><a class="fast" title="About Us / Contact" href="{% url about %}">Contact</a></li>
- <li class="last">
- <a title="Facebook Event" href="http://www.facebook.com/event.php?eid=144937025580428"><img width="24" height="24" src="/media/img/facebook.png" /></a>
- <a title="Our Twitter Page" href="https://twitter.com/#!/OccupyWallSt"><img width="24" height="24" src="/media/img/twitter.png" /></a>
- <a title="Reddit" href="http://www.reddit.com/r/occupywallstreet/"><img width="24" height="23" style="padding-bottom:3px" src="/media/img/reddit.png" /></a>
- </li>
- </ul>
- </div>
+ {% verbiage 'navbar' LANGUAGE_CODE %}
</nav>
<div style="clear:both"></div>
{% endblock nav %}
<div id="content">
{% block content %}
- <p>
- No Content Available.
- </p>
{% endblock content %}
</div>
{% block footer %}
<footer>
- <p>
- this site was brought to you by various radicals<br />
- email: <a href="mailto:info@occupywallst.org">info@occupywallst.org</a> | telephone: +1 (877) 881-3020<br />
- </p>
+ {% verbiage 'footer' LANGUAGE_CODE %}
</footer>
{% endblock footer %}
<div id="notifications" style="display:none">
<div class="info">
- <span>Notifications</span>
+ <span>{% trans "Notifications" %}</span>
</div>
<div class="items">
</div>
</div>
{% endblock body %}
- <script src="/media/js/jquery-1.6.2{% if not DEBUG %}.min{% endif %}.js" type="text/javascript"></script>
+ <script src="{{ MEDIA_URL }}js/jquery-1.6.2{% if not DEBUG %}.min{% endif %}.js" type="text/javascript"></script>
{% if not DEBUG and OWS_SCRIPTS_MINIFIED %}
- <script src="{{ MEDIA_URL }}{{ OWS_SCRIPTS_MINIFIED }}?v=18" type="text/javascript"></script>
+ <script src="{{ MEDIA_URL }}{{ OWS_SCRIPTS_MINIFIED }}?v=20" type="text/javascript"></script>
{% else %}
{% for script in OWS_SCRIPTS %}
- <script src="{{ MEDIA_URL }}{{ script }}?v=18" type="text/javascript"></script>
+ <script src="{{ MEDIA_URL }}{{ script }}?v=20" type="text/javascript"></script>
{% endfor %}
{% endif %}
- <script src="//chat.{{ request.get_host }}/socket.io/socket.io.js" type="text/javascript"></script>
+ <!-- <script src="//chat.{{ request.get_host }}/socket.io/socket.io.js" type="text/javascript"></script> -->
{% block scripts %}
{% endblock scripts %}
<script type="text/javascript">
@@ -113,7 +88,6 @@
if (path.match(/^\/api\/safe\//)) {
return $.get(path, data, callback, "json");
} else {
- data.csrfmiddlewaretoken = "{{ csrf_token }}";
return $.post(path, data, callback, "json");
}
}
View
6 occupywallst/templates/occupywallst/calendar.html
@@ -4,7 +4,11 @@
{% block stylesheets %}
<style type="text/css">
- #navbar .nav-calendar { background: #900; }
+ #navbar .nav-calendar {
+ background: #900;
+ background: -webkit-gradient(linear, left top, left bottom, from(#a11), to(#900));
+ background: -moz-linear-gradient(top, #a11, #900);
+ }
</style>
{% endblock stylesheets %}
View
8 occupywallst/templates/occupywallst/chat-old.html
@@ -8,9 +8,13 @@
{% endblock extra_head %}
{% block stylesheets %}
- <link rel="stylesheet" href="/media/css/chat.css?v=11" type="text/css" media="all" />
+ <link rel="stylesheet" href="{{ MEDIA_URL }}css/chat.css?v=11" type="text/css" media="all" />
<style type="text/css">
- #navbar .nav-chat { background: #900; }
+ #navbar .nav-chat {
+ background: #900;
+ background: -webkit-gradient(linear, left top, left bottom, from(#a11), to(#900));
+ background: -moz-linear-gradient(top, #a11, #900);
+ }
</style>
{% endblock stylesheets %}
View
6 occupywallst/templates/occupywallst/chat.html
@@ -5,7 +5,11 @@
{% block stylesheets %}
<style type="text/css">
- #navbar .nav-chat { background: #900; }
+ #navbar .nav-chat {
+ background: #900;
+ background: -webkit-gradient(linear, left top, left bottom, from(#a11), to(#900));
+ background: -moz-linear-gradient(top, #a11, #900);
+ }
</style>
{% endblock stylesheets %}
View
3  occupywallst/templates/occupywallst/comment.html
@@ -1,4 +1,5 @@
{% load ows %}
+{% load l10n %}
{% if not comment.is_deleted or comment.replies %}
<div class="comment" id="comment-{{ comment.id }}">
@@ -31,7 +32,7 @@
<a class="edit" href="#">edit</a>
<a class="delete" href="#">delete</a>