Permalink
Browse files

first full commit, from recovered project

  • Loading branch information...
1 parent a5f1bba commit bdb71859ea6f9da67f89b633967d01d931cd4943 Alex Ehlke committed Nov 2, 2009
Showing with 7,371 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +9 −0 RECOVERY_TODO
  3. +8 −0 __init__.py
  4. BIN __init__.pyc
  5. 0 apps/__init__.py
  6. BIN apps/__init__.pyc
  7. 0 apps/about/__init__.py
  8. BIN apps/about/__init__.pyc
  9. +3 −0 apps/about/models.py
  10. BIN apps/about/models.pyc
  11. +12 −0 apps/about/urls.py
  12. BIN apps/about/urls.pyc
  13. +1 −0 apps/about/views.py
  14. BIN apps/about/views.pyc
  15. +11 −0 apps/dojango/README
  16. 0 apps/dojango/__init__.py
  17. BIN apps/dojango/__init__.pyc
  18. +20 −0 apps/dojango/appengine/README
  19. 0 apps/dojango/appengine/__init__.py
  20. +51 −0 apps/dojango/appengine/dojo_serve.py
  21. +435 −0 apps/dojango/appengine/memcache_zipserve.py
  22. +31 −0 apps/dojango/bin/dojobuild.py
  23. 0 apps/dojango/conf/__init__.py
  24. BIN apps/dojango/conf/__init__.pyc
  25. +98 −0 apps/dojango/conf/settings.py
  26. BIN apps/dojango/conf/settings.pyc
  27. +25 −0 apps/dojango/context_processors.py
  28. BIN apps/dojango/context_processors.pyc
  29. +146 −0 apps/dojango/decorators.py
  30. BIN apps/dojango/decorators.pyc
  31. +4 −0 apps/dojango/forms/__init__.py
  32. +143 −0 apps/dojango/forms/fields.py
  33. +70 −0 apps/dojango/forms/formsets.py
  34. +203 −0 apps/dojango/forms/models.py
  35. +464 −0 apps/dojango/forms/widgets.py
  36. 0 apps/dojango/management/__init__.py
  37. BIN apps/dojango/management/__init__.pyc
  38. 0 apps/dojango/management/commands/__init__.py
  39. +317 −0 apps/dojango/management/commands/dojobuild.py
  40. +105 −0 apps/dojango/management/commands/dojoload.py
  41. +18 −0 apps/dojango/media/dojango.profile.js
  42. +5 −0 apps/dojango/media/dojango/_base.js
  43. +39 −0 apps/dojango/media/dojango/dojango.js
  44. +75 −0 apps/dojango/media/dojango/form/Form.js
  45. +30 −0 apps/dojango/media/dojango/widget/ThumbnailPicker.js
  46. +112 −0 apps/dojango/media/dojango/widget/plugins/InsertImage.js
  47. +5 −0 apps/dojango/media/dojango/widget/resources/ThumbnailPicker.css
  48. +26 −0 apps/dojango/media/dojango_optimized.profile.js
  49. BIN apps/dojango/media/images/arrowSmall.gif
  50. BIN apps/dojango/media/images/dojango_logo.jpg
  51. BIN apps/dojango/media/images/note.gif
  52. BIN apps/dojango/media/images/tube.gif
  53. BIN apps/dojango/media/images/tubeTall.gif
  54. +1 −0 apps/dojango/media/resources/blank.html
  55. +72 −0 apps/dojango/middleware.py
  56. +3 −0 apps/dojango/models.py
  57. BIN apps/dojango/models.pyc
  58. 0 apps/dojango/templates/__init__.py
  59. 0 apps/dojango/templates/dojango/__init__.py
  60. +88 −0 apps/dojango/templates/dojango/base.html
  61. +15 −0 apps/dojango/templates/dojango/base_i18n.html
  62. +39 −0 apps/dojango/templates/dojango/include.html
  63. +14 −0 apps/dojango/templates/dojango/include_i18n.html
  64. +7 −0 apps/dojango/templates/dojango/json_iframe.html
  65. 0 apps/dojango/templates/dojango/templatetag/__init__.py
  66. +55 −0 apps/dojango/templates/dojango/templatetag/datagrid_disp.html
  67. +757 −0 apps/dojango/templates/dojango/test.html
  68. 0 apps/dojango/templatetags/__init__.py
  69. BIN apps/dojango/templatetags/__init__.pyc
  70. +39 −0 apps/dojango/templatetags/dojango_base.py
  71. BIN apps/dojango/templatetags/dojango_base.pyc
  72. +9 −0 apps/dojango/templatetags/dojango_filters.py
  73. BIN apps/dojango/templatetags/dojango_filters.pyc
  74. +152 −0 apps/dojango/templatetags/dojango_grid.py
  75. +20 −0 apps/dojango/urls.py
  76. BIN apps/dojango/urls.pyc
  77. +239 −0 apps/dojango/util/__init__.py
  78. BIN apps/dojango/util/__init__.pyc
  79. +127 −0 apps/dojango/util/config.py
  80. BIN apps/dojango/util/config.pyc
  81. +50 −0 apps/dojango/util/dojo_collector.py
  82. BIN apps/dojango/util/dojo_collector.pyc
  83. +39 −0 apps/dojango/util/form.py
  84. BIN apps/dojango/util/form.pyc
  85. +24 −0 apps/dojango/util/perms.py
  86. BIN apps/dojango/util/perms.pyc
  87. +228 −0 apps/dojango/views.py
  88. BIN apps/dojango/views.pyc
  89. +41 −0 apps/flashcards/__init__.py
  90. BIN apps/flashcards/__init__.pyc
  91. +11 −0 apps/flashcards/admin.py
  92. BIN apps/flashcards/admin.pyc
  93. +81 −0 apps/flashcards/forms.py
  94. BIN apps/flashcards/forms.pyc
  95. +327 −0 apps/flashcards/media/flashcards/js/flashcards.js
  96. +357 −0 apps/flashcards/media/flashcards/js/reviews.js
  97. BIN apps/flashcards/models/.cards.py.swp
  98. +77 −0 apps/flashcards/models/__init__.py
  99. BIN apps/flashcards/models/__init__.pyc
  100. +339 −0 apps/flashcards/models/cards.py
  101. BIN apps/flashcards/models/cards.pyc
  102. +34 −0 apps/flashcards/models/cardtemplates.py
  103. BIN apps/flashcards/models/cardtemplates.pyc
  104. +71 −0 apps/flashcards/models/decks.py
  105. BIN apps/flashcards/models/decks.pyc
  106. +43 −0 apps/flashcards/models/facts.py
  107. BIN apps/flashcards/models/facts.pyc
  108. +73 −0 apps/flashcards/models/fields.py
  109. BIN apps/flashcards/models/fields.pyc
  110. +335 −0 apps/flashcards/templates/flashcards/base.html
  111. +32 −0 apps/flashcards/templates/flashcards/deck_confirm_delete.html
  112. +36 −0 apps/flashcards/templates/flashcards/deck_form.html
  113. +15 −0 apps/flashcards/templates/flashcards/deck_list.html
  114. +12 −0 apps/flashcards/templates/flashcards/extra_head.html
  115. +117 −0 apps/flashcards/templates/flashcards/reviews.html
  116. +65 −0 apps/flashcards/urls.py
  117. BIN apps/flashcards/urls.pyc
  118. +517 −0 apps/flashcards/views.py
  119. BIN apps/flashcards/views.pyc
  120. 0 deploy/__init__.py
  121. BIN deploy/__init__.pyc
  122. +36 −0 deploy/modpython.py
  123. BIN deploy/modpython.pyc
  124. +18 −0 deploy/pinax.fcgi
  125. +22 −0 deploy/pinax.wsgi
  126. BIN dev.db.old
  127. +29 −0 manage.py
  128. BIN manage.pyc
  129. +17 −0 media/css/site_tabs.css
  130. +18 −0 requirements.txt
  131. BIN settings.pyc
  132. +41 −0 templates/about/what_next.html
  133. +26 −0 templates/account/base.html
  134. +41 −0 templates/homepage.html
  135. +3 −0 templates/notification/base.html
  136. +41 −0 templates/site_base.html
  137. +8 −0 todo.txt
  138. +43 −0 urls.py
  139. BIN urls.pyc
View
@@ -0,0 +1 @@
+*.prc
View
@@ -0,0 +1,9 @@
+recovery todo:
+
+abstract models
+shared models
+
+shared deck templates
+
+algorithms
+
View
@@ -0,0 +1,8 @@
+# -*- coding: utf-8 -*-
+
+__about__ = """
+This project comes with the bare minimum set of applications and templates
+to get you started. It includes no extra tabs, only the profile and notices
+tabs are included by default. From here you can add any extra functionality
+and applications that you would like.
+"""
View
Binary file not shown.
View
No changes.
View
Binary file not shown.
View
No changes.
View
Binary file not shown.
View
@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.
View
Binary file not shown.
View
@@ -0,0 +1,12 @@
+from django.conf.urls.defaults import *
+from django.views.generic.simple import direct_to_template
+
+urlpatterns = patterns('',
+ url(r'^$', direct_to_template, {"template": "about/about.html"}, name="about"),
+
+ url(r'^terms/$', direct_to_template, {"template": "about/terms.html"}, name="terms"),
+ url(r'^privacy/$', direct_to_template, {"template": "about/privacy.html"}, name="privacy"),
+ url(r'^dmca/$', direct_to_template, {"template": "about/dmca.html"}, name="dmca"),
+
+ url(r'^what_next/$', direct_to_template, {"template": "about/what_next.html"}, name="what_next"),
+)
View
Binary file not shown.
View
@@ -0,0 +1 @@
+# Create your views here.
View
Binary file not shown.
View
@@ -0,0 +1,11 @@
+Dojango is a reusable django application that helps you to use the client-side
+framework dojo within your django project. It provides capabilites to easily
+switch between several dojo versions and sources (e.g. aol, google, local) and
+delivers helping utilities, that makes the development of rich internet
+applications in combination with dojo more comfortable. Also it makes the building
+of your own packed dojo release easier. Another goal of this project is, that you
+can learn how you have to structure your html to use dojo within your projects.
+
+For further documentation go to:
+
+http://code.google.com/p/dojango/
View
No changes.
View
Binary file not shown.
@@ -0,0 +1,20 @@
+This directory contains some helpers for running dojango on appengine.
+
+memcache_zipserve.py:
+
+ Part of http://code.google.com/p/google-app-engine-samples/:
+ Using zipserve to serve the media-files. After the first use they'll be
+ cached in memcache. Modified to support last-modified-headers (so we have
+ a real CDN!)
+
+dojo_serve.py:
+
+ Helper for serving the whole dojo release folder, that holds the dojo
+ modules as zipfiles.
+ It can be used within app.yaml (AppEngine configuration file) like this:
+
+ - url: /dojango/media/release/.*
+ script: dojango/appengine/dojo_serve.py
+
+ Afterwards all zip-files within /dojango/media/release/DOJANGO_DOJO_VERSION/
+ will be served and cached.
No changes.
@@ -0,0 +1,51 @@
+import os
+import wsgiref.handlers
+
+from dojango.appengine import memcache_zipserve
+
+from google.appengine.ext import webapp
+
+# setup the environment
+from common.appenginepatch.aecmd import setup_env
+setup_env(manage_py_env=True)
+from dojango.conf import settings
+
+# creating a handler structure for the zip-files within the release folder
+release_dir = '%s/release/%s' % (settings.BASE_MEDIA_ROOT, settings.DOJO_VERSION)
+handlers = []
+for zip_file in os.listdir(release_dir):
+ if zip_file.endswith(".zip"):
+ module = os.path.splitext(zip_file)[0]
+ handler = [os.path.join(release_dir, zip_file)]
+ handlers.append(handler)
+
+class FlushCache(webapp.RequestHandler):
+ """
+ Handler for flushing the whole memcache instance.
+ """
+ from google.appengine.ext.webapp.util import login_required
+ @login_required
+ def get(self):
+ from google.appengine.api import memcache
+ from google.appengine.api import users
+ if users.is_current_user_admin():
+ stats = memcache.get_stats()
+ memcache.flush_all()
+ self.response.out.write("Memcache successfully flushed!<br/>")
+ if stats:
+ self.response.out.write("<p>Memcache stats:</p><p>")
+ for key in stats.keys():
+ self.response.out.write("%s: %s<br/>" % (key, stats[key]))
+ self.response.out.write("</p>")
+
+def main():
+ application = webapp.WSGIApplication([
+ ('%s/%s/(.*)' % (settings.BUILD_MEDIA_URL, settings.DOJO_VERSION),
+ memcache_zipserve.create_handler(handlers, max_age=31536000)
+ ),
+ ('%s/_flushcache[/]{0,1}' % settings.BUILD_MEDIA_URL, FlushCache)
+ ], debug=False)
+ wsgiref.handlers.CGIHandler().run(application)
+
+if __name__ == '__main__':
+ main()
Oops, something went wrong.

0 comments on commit bdb7185

Please sign in to comment.