Permalink
Browse files

Initial import of chirpradio into Hg.

This code was previously in CHIRP's private svn repository.
  • Loading branch information...
0 parents commit 1d342b7a92ce8b74e0a594cf84d38522c7e07440 trow committed May 1, 2009
Showing with 31,249 additions and 0 deletions.
  1. +202 −0 COPYING
  2. +104 −0 README
  3. 0 __init__.py
  4. +16 −0 app.yaml
  5. +537 −0 appengine_django/__init__.py
  6. +25 −0 appengine_django/auth/__init__.py
  7. +31 −0 appengine_django/auth/decorators.py
  8. +36 −0 appengine_django/auth/middleware.py
  9. +172 −0 appengine_django/auth/models.py
  10. +62 −0 appengine_django/auth/templatetags.py
  11. +58 −0 appengine_django/auth/tests.py
  12. 0 appengine_django/conf/app_template/__init__.py
  13. +4 −0 appengine_django/conf/app_template/models.py
  14. +1 −0 appengine_django/conf/app_template/views.py
  15. +20 −0 appengine_django/db/__init__.py
  16. +150 −0 appengine_django/db/base.py
  17. +37 −0 appengine_django/db/creation.py
  18. +93 −0 appengine_django/mail.py
  19. 0 appengine_django/management/__init__.py
  20. 0 appengine_django/management/commands/__init__.py
  21. +49 −0 appengine_django/management/commands/console.py
  22. +36 −0 appengine_django/management/commands/flush.py
  23. +32 −0 appengine_django/management/commands/reset.py
  24. +52 −0 appengine_django/management/commands/rollback.py
  25. +77 −0 appengine_django/management/commands/runserver.py
  26. +43 −0 appengine_django/management/commands/startapp.py
  27. +71 −0 appengine_django/management/commands/testserver.py
  28. +51 −0 appengine_django/management/commands/update.py
  29. +52 −0 appengine_django/management/commands/vacuum_indexes.py
  30. +176 −0 appengine_django/models.py
  31. +26 −0 appengine_django/replacement_imp.py
  32. 0 appengine_django/serializer/__init__.py
  33. +130 −0 appengine_django/serializer/python.py
  34. +147 −0 appengine_django/serializer/xml.py
  35. 0 appengine_django/sessions/__init__.py
  36. 0 appengine_django/sessions/backends/__init__.py
  37. +82 −0 appengine_django/sessions/backends/db.py
  38. +22 −0 appengine_django/sessions/models.py
  39. +56 −0 appengine_django/tests/__init__.py
  40. +183 −0 appengine_django/tests/commands_test.py
  41. +37 −0 appengine_django/tests/core_test.py
  42. +62 −0 appengine_django/tests/db_test.py
  43. +43 −0 appengine_django/tests/memcache_test.py
  44. +110 −0 appengine_django/tests/model_test.py
  45. +313 −0 appengine_django/tests/serialization_test.py
  46. +200 −0 auth/__init__.py
  47. +65 −0 auth/decorators.py
  48. +151 −0 auth/forms.py
  49. +51 −0 auth/middleware.py
  50. +113 −0 auth/models.py
  51. +31 −0 auth/roles.py
  52. +335 −0 auth/tests.py
  53. +44 −0 auth/urls.py
  54. +284 −0 auth/views.py
  55. 0 common/__init__.py
  56. +12 −0 common/context_processors.py
  57. +25 −0 common/decorators.py
  58. +5 −0 django-extras/README
  59. 0 django-extras/__init__.py
  60. +40 −0 django-extras/_monkey_patch.py
  61. 0 django-extras/contrib/__init__.py
  62. +15 −0 django-extras/contrib/auth/__init__.py
  63. 0 django-extras/foo.py
  64. BIN django.zip
  65. 0 landing_page/__init__.py
  66. +13 −0 landing_page/views.py
  67. +59 −0 main.py
  68. +38 −0 manage.py
  69. +3 −0 media/common/css/base.css
  70. +153 −0 media/ext_js/jquery-autocomplete/autocomplete_docs.txt
  71. +46 −0 media/ext_js/jquery-autocomplete/jquery.autocomplete.css
  72. +502 −0 media/ext_js/jquery-autocomplete/jquery.autocomplete.js
  73. +318 −0 media/ext_js/jquery-ui-themeroller/demo.html
  74. +4,241 −0 media/ext_js/jquery-ui-themeroller/jquery-1.3.1.js
  75. +8,970 −0 media/ext_js/jquery-ui-themeroller/jquery.ui.all.js
  76. BIN media/ext_js/jquery-ui-themeroller/theme/images/ui-bg_flat_0_aaaaaa_40x100.png
  77. BIN media/ext_js/jquery-ui-themeroller/theme/images/ui-bg_flat_75_ffffff_40x100.png
  78. BIN media/ext_js/jquery-ui-themeroller/theme/images/ui-bg_glass_55_fbf9ee_1x400.png
  79. BIN media/ext_js/jquery-ui-themeroller/theme/images/ui-bg_glass_65_ffffff_1x400.png
  80. BIN media/ext_js/jquery-ui-themeroller/theme/images/ui-bg_glass_75_dadada_1x400.png
  81. BIN media/ext_js/jquery-ui-themeroller/theme/images/ui-bg_glass_75_e6e6e6_1x400.png
  82. BIN media/ext_js/jquery-ui-themeroller/theme/images/ui-bg_glass_95_fef1ec_1x400.png
  83. BIN media/ext_js/jquery-ui-themeroller/theme/images/ui-bg_highlight-soft_75_cccccc_1x100.png
  84. BIN media/ext_js/jquery-ui-themeroller/theme/images/ui-icons_222222_256x240.png
  85. BIN media/ext_js/jquery-ui-themeroller/theme/images/ui-icons_2e83ff_256x240.png
  86. BIN media/ext_js/jquery-ui-themeroller/theme/images/ui-icons_454545_256x240.png
  87. BIN media/ext_js/jquery-ui-themeroller/theme/images/ui-icons_888888_256x240.png
  88. BIN media/ext_js/jquery-ui-themeroller/theme/images/ui-icons_cd0a0a_256x240.png
  89. +9 −0 media/ext_js/jquery-ui-themeroller/theme/ui.accordion.css
  90. +2 −0 media/ext_js/jquery-ui-themeroller/theme/ui.all.css
  91. +9 −0 media/ext_js/jquery-ui-themeroller/theme/ui.base.css
  92. +37 −0 media/ext_js/jquery-ui-themeroller/theme/ui.core.css
  93. +62 −0 media/ext_js/jquery-ui-themeroller/theme/ui.datepicker.css
  94. +13 −0 media/ext_js/jquery-ui-themeroller/theme/ui.dialog.css
  95. +4 −0 media/ext_js/jquery-ui-themeroller/theme/ui.progressbar.css
  96. +13 −0 media/ext_js/jquery-ui-themeroller/theme/ui.resizable.css
  97. +17 −0 media/ext_js/jquery-ui-themeroller/theme/ui.slider.css
  98. +9 −0 media/ext_js/jquery-ui-themeroller/theme/ui.tabs.css
  99. +243 −0 media/ext_js/jquery-ui-themeroller/theme/ui.theme.css
  100. +42 −0 media/ext_js/jquery-ui-themeroller/ui_demos.js
  101. +3,549 −0 media/ext_js/jquery/jquery-1.2.6.js
  102. +4,241 −0 media/ext_js/jquery/jquery-1.3.1.js
  103. +152 −0 media/ext_js/jquery/plugins/jquery.simulate.js
  104. +780 −0 media/ext_js/jquery/qunit/testrunner.js
  105. +120 −0 media/ext_js/jquery/qunit/testsuite.css
  106. +18 −0 media/volunteers/css/claim_tasks.css
  107. +53 −0 media/volunteers/js/chirp.js
  108. +30 −0 media/volunteers/js/claim_tasks.js
  109. +23 −0 media/volunteers/js/claim_tasks_stub_urls.js
  110. +148 −0 media/volunteers/js/meetings.js
  111. +70 −0 media/volunteers/js/meetings_stub_urls.js
  112. +90 −0 media/volunteers/js/meetings_test.js
  113. +110 −0 settings.py
  114. +16 −0 templates/auth/change_password.html
  115. +19 −0 templates/auth/forgot_password.html
  116. +8 −0 templates/auth/forgot_password_email.txt
  117. +29 −0 templates/auth/hello.html
  118. +25 −0 templates/auth/list_users.html
  119. +32 −0 templates/auth/main_page.html
  120. +16 −0 templates/auth/reset_password.html
  121. +20 −0 templates/auth/user_form.html
  122. +40 −0 templates/common/base.html
  123. +11 −0 templates/landing_page/landing_page.html
  124. +42 −0 urls.py
  125. +2 −0 volunteers/__init__.py
  126. 0 volunteers/_ui_test_/__init__.py
  127. +97 −0 volunteers/_ui_test_/claim_tasks.py
  128. +36 −0 volunteers/_ui_test_/meetings.py
  129. +133 −0 volunteers/admin.py
  130. +103 −0 volunteers/fixtures/initial_data.json
  131. +81 −0 volunteers/forms.py
  132. +231 −0 volunteers/models.py
  133. 0 volunteers/templatetags/__init__.py
  134. +124 −0 volunteers/templatetags/volunteers_extras.py
  135. +5 −0 volunteers/tests/__init__.py
  136. +34 −0 volunteers/tests/base.py
  137. +422 −0 volunteers/tests/fixtures/event_tasks.json
  138. +9 −0 volunteers/tests/fixtures/meetings.json
  139. +23 −0 volunteers/tests/fixtures/tasks.json
  140. +92 −0 volunteers/tests/fixtures/users.json
  141. +28 −0 volunteers/tests/fixtures/volunteers.json
  142. +110 −0 volunteers/tests/test_coord_admin.py
  143. +82 −0 volunteers/tests/test_meeting_attendance.py
  144. +177 −0 volunteers/tests/test_volunteer_actions.py
  145. +50 −0 volunteers/tests/test_volunteer_extras.py
  146. +33 −0 volunteers/urls.py
  147. +163 −0 volunteers/views.py
202 COPYING
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
104 README
@@ -0,0 +1,104 @@
+
+This is the code for CHIRP's internal web applications. The apps are
+hosted on Google's App Engine, under the 'chirpradio' project.
+
+For the chirpradio developer dashboard, go to:
+http://appengine.google.com/dashboard?&app_id=chirpradio
+
+For the end-user landing page, go to:
+http://chirpradio.appspot.com/
+
+Helpful documentation:
+
+* App Engine Python API
+ http://code.google.com/appengine/docs/python/
+
+* Django 1.0:
+ http://www.djangobook.com/en/2.0/
+ Be sure you are looking at the right version of the book! We are using
+ version 1.0.
+
+
+CODING CONVENTIONS
+==================
+
+Please follow the conventions outlined in PEP 8.
+
+
+OVERVIEW OF THE TREE
+====================
+
+There are part of the common infrastructure.
+ djzango.zip
+ Django 1.0.2-final, zipped up. We never want to change this.
+ appengine_django/
+ From google-app-engine-django, AppEngine helper & glue code.
+ common/
+ Code & data shared by all apps.
+ django-extras/
+ A tree that is merged into the django namespace. We put our own
+ glue code here. This should be kept small and simple.
+ __init__.py
+ main.py
+ manage.py
+ Launchers for Django.
+ settings.py
+ Global configuration for Django.
+ urls.py
+ Main URL file.
+ auth/
+ Our own custom authentication & account management system.
+ media/ext_js/[package name]
+ External third-party Javascript packages (like JQuery) live under this
+ directory.
+
+These are places where all applications store data.
+ media/[application name]/{js, css, img}/
+ templates/[application name]/
+
+These are applications that are running in production.
+ (None so far)
+
+These are applications that are under development.
+ landing_page/
+ Where you end up when you go to "/". Currently a test page.
+ volunteers/
+ Volunteer tracking.
+
+
+ADDING A NEW APPLICATION
+========================
+
+Every application has a name that looks like this: "landing_page".
+Your code lives in a directory with the same name.
+Your templates go under the directory templates/[application name].
+Your media files go under the directory media/[application name].
+
+All of your URLs are automatically mapped to be under
+http://host/volunteers/my/url
+
+To make your URLs visible, you need to:
+(1) Update the top-level urls.py to include your urls.
+(2) Add your application to INSTALLED_APPS in settings.py.
+
+
+THIRD-PARTY CODE
+================
+
+Some of the files in this directory and all of files under the
+appengine_django/ subdirectory are based on rev 81 of the
+google-app-engine-django Subversion repository.
+
+All files in django.zip are taken from Django 1.0.2-final. It was
+constructed by running the following commands:
+
+zip -r django.zip django/__init__.py django/bin django/core \
+ django/db django/dispatch django/forms \
+ django/http django/middleware django/shortcuts \
+ django/template django/templatetags \
+ django/test django/utils django/views
+
+zip -r django.zip django/conf -x 'django/conf/locale/*'
+
+These commands were taken from
+http://code.google.com/appengine/articles/django10_zipimport.html
No changes.
@@ -0,0 +1,16 @@
+application: chirpradio
+version: 1
+runtime: python
+api_version: 1
+
+handlers:
+- url: /static
+ static_dir: static
+
+# Always use HTTPS for pages related to authentication & user management
+- url: /auth/.*
+ secure: always
+ script: main.py
+
+- url: /.*
+ script: main.py
Oops, something went wrong.

0 comments on commit 1d342b7

Please sign in to comment.