├── .gitignore ├── INSTALL ├── README ├── __init__.py ├── admin_media ├── css │ ├── base.css │ ├── changelists.css │ ├── dashboard.css │ ├── forms.css │ ├── ie.css │ ├── login.css │ ├── rtl.css │ └── widgets.css ├── img │ ├── admin │ │ ├── arrow-down.gif │ │ ├── arrow-up.gif │ │ ├── changelist-bg.gif │ │ ├── changelist-bg_rtl.gif │ │ ├── chooser-bg.gif │ │ ├── chooser_stacked-bg.gif │ │ ├── default-bg-reverse.gif │ │ ├── default-bg.gif │ │ ├── deleted-overlay.gif │ │ ├── icon-no.gif │ │ ├── icon-unknown.gif │ │ ├── icon-yes.gif │ │ ├── icon_addlink.gif │ │ ├── icon_alert.gif │ │ ├── icon_calendar.gif │ │ ├── icon_changelink.gif │ │ ├── icon_clock.gif │ │ ├── icon_deletelink.gif │ │ ├── icon_error.gif │ │ ├── icon_searchbox.png │ │ ├── icon_success.gif │ │ ├── inline-delete-8bit.png │ │ ├── inline-delete.png │ │ ├── inline-restore-8bit.png │ │ ├── inline-restore.png │ │ ├── inline-splitter-bg.gif │ │ ├── nav-bg-grabber.gif │ │ ├── nav-bg-reverse.gif │ │ ├── nav-bg.gif │ │ ├── selector-add.gif │ │ ├── selector-addall.gif │ │ ├── selector-remove.gif │ │ ├── selector-removeall.gif │ │ ├── selector-search.gif │ │ ├── selector_stacked-add.gif │ │ ├── selector_stacked-remove.gif │ │ ├── tool-left.gif │ │ ├── tool-left_over.gif │ │ ├── tool-right.gif │ │ ├── tool-right_over.gif │ │ ├── tooltag-add.gif │ │ ├── tooltag-add_over.gif │ │ ├── tooltag-arrowright.gif │ │ └── tooltag-arrowright_over.gif │ └── gis │ │ ├── move_vertex_off.png │ │ └── move_vertex_on.png └── js │ ├── SelectBox.js │ ├── SelectFilter2.js │ ├── admin │ ├── CollapsedFieldsets.js │ ├── DateTimeShortcuts.js │ ├── RelatedObjectLookups.js │ └── ordering.js │ ├── calendar.js │ ├── core.js │ ├── dateparse.js │ ├── getElementsBySelector.js │ ├── timeparse.js │ └── urlify.js ├── application_fields.py ├── blog ├── CHANGELOG.yml ├── README.txt ├── __init__.py ├── admin.py ├── feeds.py ├── managers.py ├── models.py ├── sitemap.py ├── templates │ ├── base.html │ ├── blog │ │ ├── base_blog.html │ │ ├── category_detail.html │ │ ├── category_list.html │ │ ├── post_archive_day.html │ │ ├── post_archive_month.html │ │ ├── post_archive_year.html │ │ ├── post_detail.html │ │ ├── post_list.html │ │ └── post_search.html │ ├── feeds │ │ ├── posts_description.html │ │ └── posts_title.html │ └── inlines │ │ └── default.html ├── templatetags │ ├── __init__.py │ └── blog.py ├── tests.py ├── urls.py └── views.py ├── calendar_dates ├── __init__.py ├── models.py ├── tests.py └── views.py ├── comments ├── __init__.py ├── admin.py ├── feeds.py ├── forms.py ├── managers.py ├── models.py ├── signals.py ├── templates │ └── comments │ │ ├── 400-debug.html │ │ ├── approve.html │ │ ├── approved.html │ │ ├── base.html │ │ ├── delete.html │ │ ├── deleted.html │ │ ├── flag.html │ │ ├── flagged.html │ │ ├── form.html │ │ ├── moderation_queue.html │ │ ├── posted.html │ │ └── preview.html ├── templatetags │ ├── __init__.py │ └── comments.py ├── urls.py └── views │ ├── __init__.py │ ├── comments.py │ ├── moderation.py │ └── utils.py ├── constants.py ├── email-auth.py ├── empty_local_settings.py ├── endpoint.py ├── homeviews.py ├── manage.py ├── media ├── css │ ├── images │ │ ├── ajax-loader.gif │ │ ├── arrow-down.gif │ │ ├── arrow-up.gif │ │ ├── brand-back.jpg │ │ ├── btn-paynow.gif │ │ ├── ccs-logo.png │ │ ├── ccs-ribbon.gif │ │ ├── changelist-bg.gif │ │ ├── changelist-bg_rtl.gif │ │ ├── chooser-bg.gif │ │ ├── chooser_stacked-bg.gif │ │ ├── create-account-btn.gif │ │ ├── default-bg-reverse.gif │ │ ├── default-bg.gif │ │ ├── deleted-overlay.gif │ │ ├── icon-no.gif │ │ ├── icon-unknown.gif │ │ ├── icon-yes.gif │ │ ├── icon_addlink.gif │ │ ├── icon_alert.gif │ │ ├── icon_calendar.gif │ │ ├── icon_changelink.gif │ │ ├── icon_clock.gif │ │ ├── icon_deletelink.gif │ │ ├── icon_error.gif │ │ ├── icon_searchbox.png │ │ ├── icon_success.gif │ │ ├── inline-delete-8bit.png │ │ ├── inline-delete.png │ │ ├── inline-restore-8bit.png │ │ ├── inline-restore.png │ │ ├── inline-splitter-bg.gif │ │ ├── menu-key.gif │ │ ├── menu-month-bg.gif │ │ ├── nav-bg-grabber.gif │ │ ├── nav-bg-reverse.gif │ │ ├── nav-bg.gif │ │ ├── photo_60x60.jpg │ │ ├── photo_60x60.psd │ │ ├── rounded.png │ │ ├── selector-add.gif │ │ ├── selector-addall.gif │ │ ├── selector-remove.gif │ │ ├── selector-removeall.gif │ │ ├── selector-search.gif │ │ ├── selector_stacked-add.gif │ │ ├── selector_stacked-remove.gif │ │ ├── status-complete.gif │ │ ├── status-incomplete.gif │ │ ├── switch_minus.gif │ │ ├── switch_plus.gif │ │ ├── tool-left.gif │ │ ├── tool-left_over.gif │ │ ├── tool-right.gif │ │ ├── tool-right_over.gif │ │ ├── tooltag-add.gif │ │ ├── tooltag-add_over.gif │ │ ├── tooltag-arrowright.gif │ │ ├── tooltag-arrowright_over.gif │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ ├── ui-bg_glass_75_ffffff_1x400.png │ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ ├── ui-bg_inset-soft_95_fef1ec_1x100.png │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_2e83ff_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ ├── ui-icons_888888_256x240.png │ │ └── ui-icons_cd0a0a_256x240.png │ ├── jquery-ui-1.7.1.custom.css │ ├── reset.css │ └── style.css ├── highslide │ ├── graphics │ │ ├── close.png │ │ ├── closeX.png │ │ ├── controlbar-black-border.gif │ │ ├── controlbar-text-buttons.png │ │ ├── controlbar-white-small.gif │ │ ├── controlbar-white.gif │ │ ├── controlbar2.gif │ │ ├── controlbar3.gif │ │ ├── controlbar4-hover.gif │ │ ├── controlbar4.gif │ │ ├── fullexpand.gif │ │ ├── geckodimmer.png │ │ ├── icon.gif │ │ ├── loader.gif │ │ ├── loader.white.gif │ │ ├── outlines │ │ │ ├── Outlines.psd │ │ │ ├── beveled.png │ │ │ ├── drop-shadow.png │ │ │ ├── glossy-dark.png │ │ │ ├── outer-glow.png │ │ │ ├── rounded-black.png │ │ │ └── rounded-white.png │ │ ├── resize.gif │ │ ├── scrollarrows.png │ │ ├── zoomin.cur │ │ └── zoomout.cur │ ├── highslide-full.js │ ├── highslide-full.packed.js │ ├── highslide-ie6.css │ ├── highslide-with-gallery.js │ ├── highslide-with-gallery.packed.js │ ├── highslide-with-html.js │ ├── highslide-with-html.packed.js │ ├── highslide.css │ ├── highslide.js │ └── highslide.packed.js ├── img │ └── ajax-loader.gif ├── js │ ├── admin-expand.js │ ├── iframeModal.js │ ├── jqDnR.js │ ├── jqModal.js │ ├── jquery-1.2.6.js │ ├── jquery-1.3.1.min.js │ ├── jquery-1.3.2.min.js │ ├── jquery-menu.js │ ├── jquery-ui-1.7.1.custom.min.js │ ├── jquery.cookie.js │ ├── jquery.form.js │ ├── jquery.js │ ├── mootools.js │ └── validate.js ├── our_people_avatars │ └── images.jpeg ├── player.swf ├── school.wsgi ├── swfobject.js ├── video_stills │ ├── beach.jpg │ └── beach_.jpg └── videos │ └── out-4.ogv.flv ├── media_logs ├── CHANGELOG.yml ├── README.txt ├── __init__.py ├── admin.py ├── models.py ├── templates │ ├── base.html │ └── media_logs │ │ ├── audio_detail.html │ │ ├── audio_list.html │ │ ├── audioset_detail.html │ │ ├── audioset_list.html │ │ ├── base_audio.html │ │ ├── base_photos.html │ │ ├── base_videos.html │ │ ├── photo_detail.html │ │ ├── photo_list.html │ │ ├── photoset_detail.html │ │ ├── photoset_list.html │ │ ├── video_detail.html │ │ ├── video_list.html │ │ ├── videoset_detail.html │ │ └── videoset_list.html ├── tests.py └── urls │ ├── __init__.py │ ├── audios.py │ ├── photos.py │ └── videos.py ├── menu ├── __init__.py ├── admin.py ├── forms.py ├── models.py ├── templatetags │ ├── __init__.py │ └── logic.py ├── tests.py ├── urls.py └── views.py ├── our_people ├── __init__.py ├── models.py ├── tests.py ├── urls.py └── views.py ├── payments ├── __init__.py ├── models.py └── tests.py ├── people ├── __init__.py ├── models.py └── tests.py ├── records ├── __init__.py ├── admin.py ├── forms.py ├── models.py ├── tests.py ├── urls.py └── views.py ├── settings.py ├── templates ├── admin │ ├── base_site.html │ ├── people │ │ └── guardian │ │ │ └── change_list.html │ └── records │ │ ├── application │ │ └── change_form.html │ │ └── application_print_detail.html ├── base.html ├── calendar.html ├── home.html ├── menu │ ├── .see.html.swo │ ├── order.html │ ├── paynow.html │ └── see.html ├── our_people │ ├── detail.html │ └── person_list.html ├── records │ ├── addStudent.html │ ├── apply.html │ ├── base.html │ ├── changeStudent.html │ ├── changeVol.html │ ├── complete.html │ ├── continue.html │ ├── current.html │ ├── emergency.html │ ├── enroll.html │ ├── family.html │ ├── guardians.html │ ├── home_start.html │ ├── mssq.html │ ├── mystudents.html │ ├── parent.html │ ├── pickup.html │ ├── profile.html │ ├── questions.html │ ├── register.html │ ├── students.html │ └── volunteer.html └── registration │ ├── activate.html │ ├── activation_email.txt │ ├── activation_email_subject.txt │ ├── login.html │ ├── logout.html │ ├── registration_complete.html │ └── registration_form.html ├── urls.py ├── utils.py ├── views ├── __init__.py └── generic │ ├── __init__.py │ ├── create_update.py │ ├── date_based.py │ ├── list_detail.py │ └── simple.py └── years ├── __init__.py ├── models.py ├── tests.py └── views.py /.gitignore: -------------------------------------------------------------------------------- 1 | dev.db 2 | *.pyc 3 | *.svn 4 | local_settings.py 5 | local_settings.py 6 | *.svn* 7 | *.swp 8 | *~ 9 | 10 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | 1) clone the repository 2 | 3 | * git clone git://github.com/ssavelan/django-school.git 4 | 5 | 2) Fix up your settings. 6 | 7 | cd django-school (or custom name) 8 | mv empty_local_settings.py local_settings.py 9 | 10 | open a Python Interpreter and run: 11 | 12 | from random import choice 13 | ''.join([choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)') for i in range(50)]) 14 | 15 | paste the result for your SECRET_KEY in local_settings.py 16 | 17 | Set LIVE=False in your settings.py to run devel server with sqlite. 18 | 19 | 4) syncdb, runserver 20 | 21 | ** add 1 of each type of meal (3 in all) and a dateset for the menu to work. 22 | This app was special-cased for a client and could use some abstraction. 23 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | The open source demo version has fallen woefully behind it's commercial counterparts. 2 | If you would like to help develop django-school please feel free to branch or repurpose. 3 | You can contact skylar.saveland@gmail.com with any questions or comments. 4 | 5 | I guess the MIT or GPL license could go here? 6 | 7 | 8 | Summary 9 | ======= 10 | 11 | Django School (Quince) is a web-based school information system. The system is very customizable 12 | so that the school can get exactly what it wants and not more. No extra functionality will be left 13 | to clutter or confuse. The system is intuitive and easy to learn. 14 | 15 | All information can be retrieved with a few clicks and is searchable and sortable. Get any obscure 16 | information stored in the system instantly! Beautiful, unobtrusive Ajax where it is merited. Ready to 17 | integrate existing design/logos/styles/flash resources or to create new ones. 18 | 19 | If the school desires a feature that is not currently in Quince it should be relatively straight-forward 20 | to add. We look forward to defining further needs and specifications with you so we can improve Quince. 21 | 22 | 23 | Features (in progress features in parenthesis) 24 | ============================================== 25 | 26 | * Online Payments Hub 27 | * Keep track of all online payments for your school 28 | * Paypal integration, records keeping, instant notification 29 | * (Google Checkout) 30 | 31 | * Application, Registration and Enrollment 32 | * Forms 33 | * Payments 34 | * Tracking 35 | * Scheduling 36 | * Notification 37 | * Easy to set discount timeframes 38 | * Easy to integrate with online calendars 39 | 40 | * Records 41 | * PARENTS enter their data and update throughout the year and during enrollment 42 | * Emergency contacts 43 | * Pickup People 44 | * Allergies and other student information 45 | * Disciplinary actions, gold stars, notes, anything you want 46 | * Define the data that you want to store and we can easily adapt the 47 | software to your specific needs. 48 | * Volunteer organization 49 | * Donations 50 | * Family members and community 51 | 52 | (* Calendars 53 | * Make your own, anything you can think of! 54 | * Split into intuitive categories 55 | * Easy and extensible 56 | * Application/Registration/Enrollment 57 | * Events 58 | * Lunch Menu 59 | ) 60 | 61 | (* News and information 62 | * Video archives with search and categories 63 | * School Blog 64 | * Photo albums 65 | * About sections 66 | * Easy to add features/flash 67 | * Show the world how great your school is in: 68 | * Pictures, videos, print 69 | ) 70 | 71 | (* Scheduling 72 | * Set important dates and dictate what the parents see based on date and time 73 | * Group students based on homeroom or other criteria 74 | * Attach students to a main teacher or contact 75 | * (Create classrooms and schedule the student's days/weeks/semesters/quarters/years) 76 | * (Know exactly where a student is supposed to be at any given time) 77 | * (Mark tardies and absences) 78 | ) 79 | -------------------------------------------------------------------------------- /__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/__init__.py -------------------------------------------------------------------------------- /admin_media/css/dashboard.css: -------------------------------------------------------------------------------- 1 | /* DASHBOARD */ 2 | 3 | .dashboard .module table th { 4 | width: 100%; 5 | } 6 | 7 | .dashboard .module table td { 8 | white-space: nowrap; 9 | } 10 | 11 | .dashboard .module table td a { 12 | display: block; 13 | padding-right: .6em; 14 | } 15 | 16 | /* RECENT ACTIONS MODULE */ 17 | 18 | .module ul.actionlist { 19 | margin-left: 0; 20 | } 21 | 22 | ul.actionlist li { 23 | list-style-type: none; 24 | } 25 | -------------------------------------------------------------------------------- /admin_media/css/ie.css: -------------------------------------------------------------------------------- 1 | /* IE 6 & 7 */ 2 | 3 | /* Proper fixed width for dashboard in IE6 */ 4 | 5 | .dashboard #content { 6 | *width: 768px; 7 | } 8 | 9 | .dashboard #content-main { 10 | *width: 535px; 11 | } 12 | 13 | /* IE 6 ONLY */ 14 | 15 | /* Keep header from flowing off the page */ 16 | 17 | #container { 18 | _position: static; 19 | } 20 | 21 | /* Put the right sidebars back on the page */ 22 | 23 | .colMS #content-related { 24 | _margin-right: 0; 25 | _margin-left: 10px; 26 | _position: static; 27 | } 28 | 29 | /* Put the left sidebars back on the page */ 30 | 31 | .colSM #content-related { 32 | _margin-right: 10px; 33 | _margin-left: -115px; 34 | _position: static; 35 | } 36 | 37 | .form-row { 38 | _height: 1%; 39 | } 40 | 41 | /* Fix right margin for changelist filters in IE6 */ 42 | 43 | #changelist-filter ul { 44 | _margin-right: -10px; 45 | } 46 | 47 | /* IE ignores min-height, but treats height as if it were min-height */ 48 | 49 | .change-list .filtered { 50 | _height: 400px; 51 | } -------------------------------------------------------------------------------- /admin_media/css/login.css: -------------------------------------------------------------------------------- 1 | /* LOGIN FORM */ 2 | 3 | body.login { 4 | background: #eee; 5 | } 6 | 7 | .login #container { 8 | background: white; 9 | border: 1px solid #ccc; 10 | width: 28em; 11 | min-width: 300px; 12 | margin-left: auto; 13 | margin-right: auto; 14 | margin-top: 100px; 15 | } 16 | 17 | .login #content-main { 18 | width: 100%; 19 | } 20 | 21 | .login form { 22 | margin-top: 1em; 23 | } 24 | 25 | .login .form-row { 26 | padding: 4px 0; 27 | float: left; 28 | width: 100%; 29 | } 30 | 31 | .login .form-row label { 32 | float: left; 33 | width: 9em; 34 | padding-right: 0.5em; 35 | line-height: 2em; 36 | text-align: right; 37 | font-size: 1em; 38 | color: #333; 39 | } 40 | 41 | .login .form-row #id_username, .login .form-row #id_password { 42 | width: 14em; 43 | } 44 | 45 | .login span.help { 46 | font-size: 10px; 47 | display: block; 48 | } 49 | 50 | .login .submit-row { 51 | clear: both; 52 | padding: 1em 0 0 9.4em; 53 | } 54 | 55 | -------------------------------------------------------------------------------- /admin_media/img/admin/arrow-down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/arrow-down.gif -------------------------------------------------------------------------------- /admin_media/img/admin/arrow-up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/arrow-up.gif -------------------------------------------------------------------------------- /admin_media/img/admin/changelist-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/changelist-bg.gif -------------------------------------------------------------------------------- /admin_media/img/admin/changelist-bg_rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/changelist-bg_rtl.gif -------------------------------------------------------------------------------- /admin_media/img/admin/chooser-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/chooser-bg.gif -------------------------------------------------------------------------------- /admin_media/img/admin/chooser_stacked-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/chooser_stacked-bg.gif -------------------------------------------------------------------------------- /admin_media/img/admin/default-bg-reverse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/default-bg-reverse.gif -------------------------------------------------------------------------------- /admin_media/img/admin/default-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/default-bg.gif -------------------------------------------------------------------------------- /admin_media/img/admin/deleted-overlay.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/deleted-overlay.gif -------------------------------------------------------------------------------- /admin_media/img/admin/icon-no.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/icon-no.gif -------------------------------------------------------------------------------- /admin_media/img/admin/icon-unknown.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/icon-unknown.gif -------------------------------------------------------------------------------- /admin_media/img/admin/icon-yes.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/icon-yes.gif -------------------------------------------------------------------------------- /admin_media/img/admin/icon_addlink.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/icon_addlink.gif -------------------------------------------------------------------------------- /admin_media/img/admin/icon_alert.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/icon_alert.gif -------------------------------------------------------------------------------- /admin_media/img/admin/icon_calendar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/icon_calendar.gif -------------------------------------------------------------------------------- /admin_media/img/admin/icon_changelink.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/icon_changelink.gif -------------------------------------------------------------------------------- /admin_media/img/admin/icon_clock.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/icon_clock.gif -------------------------------------------------------------------------------- /admin_media/img/admin/icon_deletelink.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/icon_deletelink.gif -------------------------------------------------------------------------------- /admin_media/img/admin/icon_error.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/icon_error.gif -------------------------------------------------------------------------------- /admin_media/img/admin/icon_searchbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/icon_searchbox.png -------------------------------------------------------------------------------- /admin_media/img/admin/icon_success.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/icon_success.gif -------------------------------------------------------------------------------- /admin_media/img/admin/inline-delete-8bit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/inline-delete-8bit.png -------------------------------------------------------------------------------- /admin_media/img/admin/inline-delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/inline-delete.png -------------------------------------------------------------------------------- /admin_media/img/admin/inline-restore-8bit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/inline-restore-8bit.png -------------------------------------------------------------------------------- /admin_media/img/admin/inline-restore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/inline-restore.png -------------------------------------------------------------------------------- /admin_media/img/admin/inline-splitter-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/inline-splitter-bg.gif -------------------------------------------------------------------------------- /admin_media/img/admin/nav-bg-grabber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/nav-bg-grabber.gif -------------------------------------------------------------------------------- /admin_media/img/admin/nav-bg-reverse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/nav-bg-reverse.gif -------------------------------------------------------------------------------- /admin_media/img/admin/nav-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/nav-bg.gif -------------------------------------------------------------------------------- /admin_media/img/admin/selector-add.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/selector-add.gif -------------------------------------------------------------------------------- /admin_media/img/admin/selector-addall.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/selector-addall.gif -------------------------------------------------------------------------------- /admin_media/img/admin/selector-remove.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/selector-remove.gif -------------------------------------------------------------------------------- /admin_media/img/admin/selector-removeall.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/selector-removeall.gif -------------------------------------------------------------------------------- /admin_media/img/admin/selector-search.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/selector-search.gif -------------------------------------------------------------------------------- /admin_media/img/admin/selector_stacked-add.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/selector_stacked-add.gif -------------------------------------------------------------------------------- /admin_media/img/admin/selector_stacked-remove.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/selector_stacked-remove.gif -------------------------------------------------------------------------------- /admin_media/img/admin/tool-left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/tool-left.gif -------------------------------------------------------------------------------- /admin_media/img/admin/tool-left_over.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/tool-left_over.gif -------------------------------------------------------------------------------- /admin_media/img/admin/tool-right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/tool-right.gif -------------------------------------------------------------------------------- /admin_media/img/admin/tool-right_over.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/tool-right_over.gif -------------------------------------------------------------------------------- /admin_media/img/admin/tooltag-add.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/tooltag-add.gif -------------------------------------------------------------------------------- /admin_media/img/admin/tooltag-add_over.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/tooltag-add_over.gif -------------------------------------------------------------------------------- /admin_media/img/admin/tooltag-arrowright.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/tooltag-arrowright.gif -------------------------------------------------------------------------------- /admin_media/img/admin/tooltag-arrowright_over.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/admin/tooltag-arrowright_over.gif -------------------------------------------------------------------------------- /admin_media/img/gis/move_vertex_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/gis/move_vertex_off.png -------------------------------------------------------------------------------- /admin_media/img/gis/move_vertex_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/admin_media/img/gis/move_vertex_on.png -------------------------------------------------------------------------------- /admin_media/js/admin/RelatedObjectLookups.js: -------------------------------------------------------------------------------- 1 | // Handles related-objects functionality: lookup link for raw_id_fields 2 | // and Add Another links. 3 | 4 | function html_unescape(text) { 5 | // Unescape a string that was escaped using django.utils.html.escape. 6 | text = text.replace(/</g, '<'); 7 | text = text.replace(/>/g, '>'); 8 | text = text.replace(/"/g, '"'); 9 | text = text.replace(/'/g, "'"); 10 | text = text.replace(/&/g, '&'); 11 | return text; 12 | } 13 | 14 | // IE doesn't accept periods or dashes in the window name, but the element IDs 15 | // we use to generate popup window names may contain them, therefore we map them 16 | // to allowed characters in a reversible way so that we can locate the correct 17 | // element when the popup window is dismissed. 18 | function id_to_windowname(text) { 19 | text = text.replace(/\./g, '__dot__'); 20 | text = text.replace(/\-/g, '__dash__'); 21 | return text; 22 | } 23 | 24 | function windowname_to_id(text) { 25 | text = text.replace(/__dot__/g, '.'); 26 | text = text.replace(/__dash__/g, '-'); 27 | return text; 28 | } 29 | 30 | function showRelatedObjectLookupPopup(triggeringLink) { 31 | var name = triggeringLink.id.replace(/^lookup_/, ''); 32 | name = id_to_windowname(name); 33 | var href; 34 | if (triggeringLink.href.search(/\?/) >= 0) { 35 | href = triggeringLink.href + '&pop=1'; 36 | } else { 37 | href = triggeringLink.href + '?pop=1'; 38 | } 39 | var win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes'); 40 | win.focus(); 41 | return false; 42 | } 43 | 44 | function dismissRelatedLookupPopup(win, chosenId) { 45 | var name = windowname_to_id(win.name); 46 | var elem = document.getElementById(name); 47 | if (elem.className.indexOf('vManyToManyRawIdAdminField') != -1 && elem.value) { 48 | elem.value += ',' + chosenId; 49 | } else { 50 | document.getElementById(name).value = chosenId; 51 | } 52 | win.close(); 53 | } 54 | 55 | function showAddAnotherPopup(triggeringLink) { 56 | var name = triggeringLink.id.replace(/^add_/, ''); 57 | name = id_to_windowname(name); 58 | href = triggeringLink.href 59 | if (href.indexOf('?') == -1) { 60 | href += '?_popup=1'; 61 | } else { 62 | href += '&_popup=1'; 63 | } 64 | var win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes'); 65 | win.focus(); 66 | return false; 67 | } 68 | 69 | function dismissAddAnotherPopup(win, newId, newRepr) { 70 | // newId and newRepr are expected to have previously been escaped by 71 | // django.utils.html.escape. 72 | newId = html_unescape(newId); 73 | newRepr = html_unescape(newRepr); 74 | var name = windowname_to_id(win.name); 75 | var elem = document.getElementById(name); 76 | if (elem) { 77 | if (elem.nodeName == 'SELECT') { 78 | var o = new Option(newRepr, newId); 79 | elem.options[elem.options.length] = o; 80 | o.selected = true; 81 | } else if (elem.nodeName == 'INPUT') { 82 | elem.value = newId; 83 | } 84 | } else { 85 | var toId = name + "_to"; 86 | elem = document.getElementById(toId); 87 | var o = new Option(newRepr, newId); 88 | SelectBox.add_to_cache(toId, o); 89 | SelectBox.redisplay(toId); 90 | } 91 | win.close(); 92 | } 93 | -------------------------------------------------------------------------------- /admin_media/js/timeparse.js: -------------------------------------------------------------------------------- 1 | var timeParsePatterns = [ 2 | // 9 3 | { re: /^\d{1,2}$/i, 4 | handler: function(bits) { 5 | if (bits[0].length == 1) { 6 | return '0' + bits[0] + ':00'; 7 | } else { 8 | return bits[0] + ':00'; 9 | } 10 | } 11 | }, 12 | // 13:00 13 | { re: /^\d{2}[:.]\d{2}$/i, 14 | handler: function(bits) { 15 | return bits[0].replace('.', ':'); 16 | } 17 | }, 18 | // 9:00 19 | { re: /^\d[:.]\d{2}$/i, 20 | handler: function(bits) { 21 | return '0' + bits[0].replace('.', ':'); 22 | } 23 | }, 24 | // 3 am / 3 a.m. / 3am 25 | { re: /^(\d+)\s*([ap])(?:.?m.?)?$/i, 26 | handler: function(bits) { 27 | var hour = parseInt(bits[1]); 28 | if (hour == 12) { 29 | hour = 0; 30 | } 31 | if (bits[2].toLowerCase() == 'p') { 32 | if (hour == 12) { 33 | hour = 0; 34 | } 35 | return (hour + 12) + ':00'; 36 | } else { 37 | if (hour < 10) { 38 | return '0' + hour + ':00'; 39 | } else { 40 | return hour + ':00'; 41 | } 42 | } 43 | } 44 | }, 45 | // 3.30 am / 3:15 a.m. / 3.00am 46 | { re: /^(\d+)[.:](\d{2})\s*([ap]).?m.?$/i, 47 | handler: function(bits) { 48 | var hour = parseInt(bits[1]); 49 | var mins = parseInt(bits[2]); 50 | if (mins < 10) { 51 | mins = '0' + mins; 52 | } 53 | if (hour == 12) { 54 | hour = 0; 55 | } 56 | if (bits[3].toLowerCase() == 'p') { 57 | if (hour == 12) { 58 | hour = 0; 59 | } 60 | return (hour + 12) + ':' + mins; 61 | } else { 62 | if (hour < 10) { 63 | return '0' + hour + ':' + mins; 64 | } else { 65 | return hour + ':' + mins; 66 | } 67 | } 68 | } 69 | }, 70 | // noon 71 | { re: /^no/i, 72 | handler: function(bits) { 73 | return '12:00'; 74 | } 75 | }, 76 | // midnight 77 | { re: /^mid/i, 78 | handler: function(bits) { 79 | return '00:00'; 80 | } 81 | } 82 | ]; 83 | 84 | function parseTimeString(s) { 85 | for (var i = 0; i < timeParsePatterns.length; i++) { 86 | var re = timeParsePatterns[i].re; 87 | var handler = timeParsePatterns[i].handler; 88 | var bits = re.exec(s); 89 | if (bits) { 90 | return handler(bits); 91 | } 92 | } 93 | return s; 94 | } 95 | -------------------------------------------------------------------------------- /application_fields.py: -------------------------------------------------------------------------------- 1 | # This is where we define the questions that are within the application 2 | # 3 | 4 | fields = [ 5 | ('Where were you born?','q1','T') 6 | ] 7 | 8 | 9 | q1 = models.TextField(verbose_name='Where were you born?') 10 | 11 | 12 | -------------------------------------------------------------------------------- /blog/CHANGELOG.yml: -------------------------------------------------------------------------------- 1 | changes: 2 | date: 2008-09-17 3 | change: Enabled the ability to override the default template names. 4 | 5 | date: 2008-08-26 6 | change: Upgraded post_detail.html to now use new Django refactored comments. Sidenote: basic.remarks have been removed. 7 | 8 | date: 2008-07-14 9 | change: Removed get_query_set from Blog manager to fix a problem where saving a post marked as Draft would not save. 10 | change: Added a get_previous_post and get_next_post method for front end template. These will not return Draft posts. 11 | 12 | date: 2008-06-17 13 | change: BlogPostFeed is now BlogPostsFeed and there is a new BlogPostsByCategory. 14 | 15 | date: 2008-05-18 16 | change: Converted everything to 4 space tabs and made a few other changes to comply with Python Style Guide. 17 | 18 | date: 2008-04-23 19 | change: Added an inline admin interface helper for choosing inlines to go into posts. 20 | change: The inline app is now a dependancy of the blog. 21 | 22 | date: 2008-04-22 23 | change: Removed the 'render_inlines' filter from the Blog template tags. The tag is now in an app called inlines which can be used with any django app. 24 | 25 | date: 2008-02-27 26 | change: Added 'allow_comments' field to the Post model. 27 | change: Removed 'Closed' choice from status field of Post model 28 | 29 | date: 2008-02-18 30 | fix: Fixed feed pointing to hardcoded url. 31 | 32 | date: 2008-02-15 33 | change: Internationalized models 34 | 35 | date: 2008-02-04 36 | change: Added 'get_links' template filter. 37 | change: Templates: added a {% block content_title %} 38 | 39 | date: 2008-02-02 40 | change: Added a sitemap 41 | 42 | date: 2008-01-30 43 | change: Renamed 'do_inlines' filter to 'render_inlines' 44 | 45 | date: 2008-01-29 46 | change: BeautifulSoup is no longer a dependancy unless you want to use the do_inlines filter. 47 | 48 | date: 2008-01-27 49 | fix: removed 'tagging.register(Post)' from model. It was causing too many unnecessary SQL JOINS. 50 | change: Changed the inlines tag to a filter. (Example: {{ object.text|do_inlines }}) 51 | 52 | date: 2008-01-22 53 | change: Registered the Post model with the tagging app 54 | 55 | date: 2008-01-19 56 | change: Renamed the 'list' class to 'link_list' 57 | 58 | date: 2008-01-09 59 | change: Changed urls.py so you can have /posts/page/2/ or /posts/?page=2 60 | 61 | date: 2008-01-07 62 | change: Removed PublicPostManager in favor of ManagerWithPublished. 63 | change: Made wrappers for generic views. 64 | 65 | date: 2008-01-06 66 | fix: In blog.py changed 'beautifulsoup' to 'BeautifulSoup' 67 | 68 | date: 2007-12-31 69 | change: Changed some syntax in managers.py to hopefully fix a bug. 70 | change: Removed an inline template that didn't belong. 71 | 72 | date: 2007-12-21 73 | change: Added markup tag that formats inlines. 74 | 75 | date: 2007-12-12 76 | change: Cleaned up unit tests. 77 | 78 | date: 2007-12-11 79 | change: Add documentation to templatetags and views. 80 | change: Smartened up the previous/next blog part of the post_detail.html template. 81 | 82 | date: 2007-12-09 83 | change: Added feed templates and wrapped up feeds.py. 84 | change: Changed Post.live manager to Post.public 85 | change: Added a search view along with templates 86 | -------------------------------------------------------------------------------- /blog/README.txt: -------------------------------------------------------------------------------- 1 | =========================================== 2 | Django Basic Blog 3 | http://code.google.com/p/django-basic-apps/ 4 | =========================================== 5 | 6 | A simple blog application for Django projects. 7 | 8 | To install this app, simply create a folder somewhere in 9 | your PYTHONPATH named 'basic' and place the 'blog' 10 | app inside. Then add 'basic.blog' to your projects 11 | INSTALLED_APPS list in your settings.py file. 12 | 13 | === Dependancies === 14 | * Basic Inlines 15 | * [http://www.djangoproject.com/documentation/add_ons/#comments Django Comments] 16 | * [http://code.google.com/p/django-tagging Django Tagging] 17 | * [http://www.djangoproject.com/documentation/add_ons/#markup Markup] 18 | * [http://www.crummy.com/software/BeautifulSoup/ BeautifulSoup] - only if you want to use the [http://code.google.com/p/django-basic-blog/wiki/BlogInlinesProposal render_inlines] filter, otherwise it's not necessary. -------------------------------------------------------------------------------- /blog/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/blog/__init__.py -------------------------------------------------------------------------------- /blog/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from blog.models import * 3 | 4 | 5 | class CategoryAdmin(admin.ModelAdmin): 6 | prepopulated_fields = {'slug': ('title',)} 7 | 8 | admin.site.register(Category, CategoryAdmin) 9 | 10 | 11 | class PostAdmin(admin.ModelAdmin): 12 | list_display = ('title', 'publish', 'status') 13 | list_filter = ('publish', 'categories', 'status') 14 | search_fields = ('title', 'body') 15 | prepopulated_fields = {'slug': ('title',)} 16 | 17 | admin.site.register(Post, PostAdmin) 18 | -------------------------------------------------------------------------------- /blog/feeds.py: -------------------------------------------------------------------------------- 1 | from django.contrib.syndication.feeds import FeedDoesNotExist 2 | from django.core.exceptions import ObjectDoesNotExist 3 | from django.contrib.sites.models import Site 4 | from django.contrib.syndication.feeds import Feed 5 | from django.core.urlresolvers import reverse 6 | from blog.models import Post, Category 7 | 8 | 9 | class BlogPostsFeed(Feed): 10 | _site = Site.objects.get_current() 11 | title = '%s feed' % _site.name 12 | description = '%s posts feed.' % _site.name 13 | 14 | def link(self): 15 | return reverse('blog_index') 16 | 17 | def items(self): 18 | return Post.objects.published()[:10] 19 | 20 | def item_pubdate(self, obj): 21 | return obj.publish 22 | 23 | 24 | class BlogPostsByCategory(Feed): 25 | _site = Site.objects.get_current() 26 | title = '%s posts category feed' % _site.name 27 | 28 | def get_object(self, bits): 29 | if len(bits) != 1: 30 | raise ObjectDoesNotExist 31 | return Category.objects.get(slug__exact=bits[0]) 32 | 33 | def link(self, obj): 34 | if not obj: 35 | raise FeedDoesNotExist 36 | return obj.get_absolute_url() 37 | 38 | def description(self, obj): 39 | return "Posts recently categorized as %s" % obj.title 40 | 41 | def items(self, obj): 42 | return obj.post_set.published()[:10] 43 | -------------------------------------------------------------------------------- /blog/managers.py: -------------------------------------------------------------------------------- 1 | from django.db.models import Manager 2 | import datetime 3 | 4 | 5 | class PublicManager(Manager): 6 | """Returns published posts that are not in the future.""" 7 | 8 | def published(self): 9 | return self.get_query_set().filter(status__gte=2, publish__lte=datetime.datetime.now()) 10 | -------------------------------------------------------------------------------- /blog/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.utils.translation import ugettext_lazy as _ 3 | from django.db.models import permalink 4 | from django.contrib.auth.models import User 5 | from tagging.fields import TagField 6 | from blog.managers import PublicManager 7 | 8 | import tagging 9 | 10 | 11 | class Category(models.Model): 12 | """Category model.""" 13 | title = models.CharField(_('title'), max_length=100) 14 | slug = models.SlugField(_('slug'), unique=True) 15 | 16 | class Meta: 17 | verbose_name = _('category') 18 | verbose_name_plural = _('categories') 19 | db_table = 'blog_categories' 20 | ordering = ('title',) 21 | 22 | class Admin: 23 | pass 24 | 25 | def __unicode__(self): 26 | return u'%s' % self.title 27 | 28 | @permalink 29 | def get_absolute_url(self): 30 | return ('blog_category_detail', None, {'slug': self.slug}) 31 | 32 | 33 | class Post(models.Model): 34 | """Post model.""" 35 | STATUS_CHOICES = ( 36 | (1, _('Draft')), 37 | (2, _('Public')), 38 | ) 39 | title = models.CharField(_('title'), max_length=200) 40 | slug = models.SlugField(_('slug'), unique_for_date='publish') 41 | author = models.ForeignKey(User, blank=True, null=True) 42 | body = models.TextField(_('body')) 43 | tease = models.TextField(_('tease'), blank=True) 44 | status = models.IntegerField(_('status'), choices=STATUS_CHOICES, default=2) 45 | allow_comments = models.BooleanField(_('allow comments'), default=True) 46 | publish = models.DateTimeField(_('publish')) 47 | created = models.DateTimeField(_('created'), auto_now_add=True) 48 | modified = models.DateTimeField(_('modified'), auto_now=True) 49 | categories = models.ManyToManyField(Category, blank=True) 50 | tags = TagField() 51 | objects = PublicManager() 52 | 53 | class Meta: 54 | verbose_name = _('post') 55 | verbose_name_plural = _('posts') 56 | db_table = 'blog_posts' 57 | ordering = ('-publish',) 58 | get_latest_by = 'publish' 59 | 60 | class Admin: 61 | list_display = ('title', 'publish', 'status') 62 | list_filter = ('publish', 'categories', 'status') 63 | search_fields = ('title', 'body') 64 | 65 | def __unicode__(self): 66 | return u'%s' % self.title 67 | 68 | @permalink 69 | def get_absolute_url(self): 70 | return ('blog_detail', None, { 71 | 'year': self.publish.year, 72 | 'month': self.publish.strftime('%b').lower(), 73 | 'day': self.publish.day, 74 | 'slug': self.slug 75 | }) 76 | 77 | def get_previous_post(self): 78 | return self.get_previous_by_publish(status__gte=2) 79 | 80 | def get_next_post(self): 81 | return self.get_next_by_publish(status__gte=2) 82 | -------------------------------------------------------------------------------- /blog/sitemap.py: -------------------------------------------------------------------------------- 1 | from django.contrib.sitemaps import Sitemap 2 | from basic.blog.models import Post 3 | 4 | 5 | class BlogSitemap(Sitemap): 6 | changefreq = "never" 7 | priority = 0.5 8 | 9 | def items(self): 10 | return Post.objects.published() 11 | 12 | def lastmod(self, obj): 13 | return obj.publish -------------------------------------------------------------------------------- /blog/templates/base.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | {% block title %}{% endblock %} 8 | 9 | 10 |
11 | {% block body %} 12 |
13 | {% block content_title %}{% endblock %} 14 |
15 |
16 | {% block content %}{% endblock %} 17 |
18 | {% endblock %} 19 |
20 | 21 | -------------------------------------------------------------------------------- /blog/templates/blog/base_blog.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | 4 | {% block onload %}{% endblock %} 5 | 6 | -------------------------------------------------------------------------------- /blog/templates/blog/category_detail.html: -------------------------------------------------------------------------------- 1 | {% extends "blog/base_blog.html" %} 2 | 3 | 4 | {% block title %}Posts for {{ category.title }}{% endblock %} 5 | {% block body_class %}{{ block.super }} category_detail{% endblock %} 6 | {% block body_id %}category_{{ category.id }}{% endblock %} 7 | 8 | 9 | {% block content_title %} 10 |

Posts for {{ category.title }}

11 | {% endblock %} 12 | 13 | 14 | {% block content %} 15 | {% load markup %} 16 |
17 | {% for post in object_list %} 18 |
19 |

{{ post.title }}

20 |

{{ post.publish|date:"Y F d" }}

21 |

{{ post.tease }}

22 |
23 | {% endfor %} 24 |
25 | {% endblock %} -------------------------------------------------------------------------------- /blog/templates/blog/category_list.html: -------------------------------------------------------------------------------- 1 | {% extends "blog/base_blog.html" %} 2 | 3 | 4 | {% block title %}Post categories{% endblock %} 5 | {% block body_class %}{{ block.super }} category_list{% endblock %} 6 | 7 | 8 | {% block content_title %} 9 |

Post categories

10 | {% endblock %} 11 | 12 | 13 | {% block content %} 14 | {% load markup %} 15 | 20 | {% endblock %} -------------------------------------------------------------------------------- /blog/templates/blog/post_archive_day.html: -------------------------------------------------------------------------------- 1 | {% extends "blog/base_blog.html" %} 2 | 3 | 4 | {% block title %}Post archive for {{ day|date:"d F Y" }}{% endblock %} 5 | {% block body_class %}{{ block.super }} post_archive_day{% endblock %} 6 | 7 | 8 | {% block content_title %} 9 |

Post archive for {{ day|date:"d F Y" }}

10 | {% endblock %} 11 | 12 | 13 | {% block content %} 14 |
15 | {% for post in object_list %} 16 |
17 |

{{ post.title }}

18 |

{{ post.publish|date:"Y F d" }}

19 |

{{ post.tease }}

20 |
21 | {% endfor %} 22 |
23 | {% endblock %} -------------------------------------------------------------------------------- /blog/templates/blog/post_archive_month.html: -------------------------------------------------------------------------------- 1 | {% extends "blog/base_blog.html" %} 2 | 3 | 4 | {% block title %}Post archive for {{ month|date:"F Y" }}{% endblock %} 5 | {% block body_class %}{{ block.super }} post_archive_month{% endblock %} 6 | 7 | 8 | {% block content_title %} 9 |

Post archive for {{ month|date:"F Y" }}

10 | {% endblock %} 11 | 12 | 13 | {% block content %} 14 |
15 | {% for post in object_list %} 16 |
17 |

{{ post.title }}

18 |

{{ post.publish|date:"Y F d" }}

19 |

{{ post.tease }}

20 |
21 | {% endfor %} 22 |
23 | {% endblock %} -------------------------------------------------------------------------------- /blog/templates/blog/post_archive_year.html: -------------------------------------------------------------------------------- 1 | {% extends "blog/base_blog.html" %} 2 | 3 | 4 | {% block title %}Post archive for {{ year }}{% endblock %} 5 | {% block body_class %}{{ block.super }} post_archive_year{% endblock %} 6 | 7 | 8 | {% block content_title %} 9 |

Post archive for {{ year }}

10 | {% endblock %} 11 | 12 | 13 | {% block content %} 14 | {% load markup %} 15 | 16 | 21 | {% endblock %} -------------------------------------------------------------------------------- /blog/templates/blog/post_detail.html: -------------------------------------------------------------------------------- 1 | {% extends "blog/base_blog.html" %} 2 | 3 | 4 | {% block title %}{{ object.title }}{% endblock %} 5 | {% block body_class %}{{ block.super }} post_detail{% endblock %} 6 | {% block body_id %}post_{{ object.id }}{% endblock %} 7 | 8 | 9 | {% block content %} 10 |

{{ object.title }}

11 | 19 | 20 | {% load blog markup comments tagging_tags %} 21 | 22 |

{{ object.publish|date:"j F Y" }}

23 | 24 |
25 | {{ object.body|markdown:"safe" }} 26 |
27 | 28 | {% tags_for_object object as tag_list %} 29 | {% if tag_list %} 30 |

Related tags: 31 | {% for tag in tag_list %} 32 | {{ tag }}{% if not forloop.last %}, {% endif %} 33 | {% endfor %} 34 |

35 | {% endif %} 36 | 37 | {% get_comment_list for object as comment_list %} 38 | {% if comment_list %} 39 |
40 | 41 |

Comments

42 | {% for comment in comment_list %} 43 | {% if comment.is_public %} 44 |
45 |
46 | {{ forloop.counter }} 47 | {% if comment.user_url %}{{ comment.user_name }}{% else %}{{ comment.user_name }}{% endif %} says... 48 |
49 | {{ comment.comment|urlizetrunc:"60"|markdown:"safe" }} 50 |

Posted at {{ comment.submit_date|date:"P" }} on {{ comment.submit_date|date:"F j, Y" }}

51 |
52 | {% endif %} 53 | {% endfor %} 54 |
55 | {% endif %} 56 | {% if object.allow_comments %} 57 | {% render_comment_form for object %} 58 | {% else %} 59 |
60 |

Comments are closed.

61 |

Comments have been close for this post.

62 |
63 | {% endif %} 64 | {% endblock %} 65 | -------------------------------------------------------------------------------- /blog/templates/blog/post_list.html: -------------------------------------------------------------------------------- 1 | {% extends "blog/base_blog.html" %} 2 | 3 | 4 | {% block title %}Post archive{% endblock %} 5 | {% block body_class %}{{ block.super }} post_list{% endblock %} 6 | 7 | 8 | {% block content_title %} 9 |

Post archive

10 | {% endblock %} 11 | 12 | 13 | {% block content %} 14 |
15 | {% for post in object_list %} 16 |
17 |

{{ post.title }}

18 |

{{ post.publish|date:"Y F d" }}

19 |

{{ post.tease }}

20 |
21 | {% endfor %} 22 |
23 | 24 | {% if is_paginated %} 25 |

26 | {% if has_next %} 27 | Older 28 | {% endif %} 29 | {% if has_next and has_previous %} | {% endif %} 30 | {% if has_previous %} 31 | Newer 32 | {% endif %} 33 |

34 | {% endif %} 35 | {% endblock %} -------------------------------------------------------------------------------- /blog/templates/blog/post_search.html: -------------------------------------------------------------------------------- 1 | {% extends "blog/base_blog.html" %} 2 | 3 | 4 | {% block title %}Post search{% endblock %} 5 | {% block body_class %}{{ block.super }} post_search{% endblock %} 6 | 7 | 8 | {% block content_title %} 9 |

Search

10 | {% endblock %} 11 | 12 | 13 | {% block content %} 14 |
15 |

16 | 17 | 18 |

19 |
20 | 21 | {% if message %} 22 |

{{ message }}

23 | {% endif %} 24 | 25 | {% if object_list %} 26 |
27 | {% for post in object_list %} 28 |
29 |

{{ post.title }}

30 |

{{ post.publish|date:"Y F d" }}

31 |

{{ post.tease }}

32 |

{% if comment_count %}{{ comment_count }} comment{{ comment_count|pluralize }}{% endif %}

33 |
34 | {% endfor %} 35 |
36 | {% endif %} 37 | {% endblock %} -------------------------------------------------------------------------------- /blog/templates/feeds/posts_description.html: -------------------------------------------------------------------------------- 1 | {{ obj.tease }} -------------------------------------------------------------------------------- /blog/templates/feeds/posts_title.html: -------------------------------------------------------------------------------- 1 | {{ obj.title }} -------------------------------------------------------------------------------- /blog/templates/inlines/default.html: -------------------------------------------------------------------------------- 1 | {% if object %} 2 | {{ object }} 3 | {% else %} 4 | {% for object in object_list %} 5 | {{ object }} 6 | {% endfor %} 7 | {% endif %} -------------------------------------------------------------------------------- /blog/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/blog/templatetags/__init__.py -------------------------------------------------------------------------------- /blog/templatetags/blog.py: -------------------------------------------------------------------------------- 1 | from django import template 2 | from django.conf import settings 3 | from django.db import models 4 | 5 | import re 6 | 7 | Post = models.get_model('blog', 'post') 8 | Category = models.get_model('blog', 'category') 9 | 10 | register = template.Library() 11 | 12 | 13 | class LatestPosts(template.Node): 14 | def __init__(self, limit, var_name): 15 | self.limit = limit 16 | self.var_name = var_name 17 | 18 | def render(self, context): 19 | posts = Post.objects.published()[:int(self.limit)] 20 | if posts and (int(self.limit) == 1): 21 | context[self.var_name] = posts[0] 22 | else: 23 | context[self.var_name] = posts 24 | return '' 25 | 26 | @register.tag 27 | def get_latest_posts(parser, token): 28 | """ 29 | Gets any number of latest posts and stores them in a varable. 30 | 31 | Syntax:: 32 | 33 | {% get_latest_posts [limit] as [var_name] %} 34 | 35 | Example usage:: 36 | 37 | {% get_latest_posts 10 as latest_post_list %} 38 | """ 39 | try: 40 | tag_name, arg = token.contents.split(None, 1) 41 | except ValueError: 42 | raise template.TemplateSyntaxError, "%s tag requires arguments" % token.contents.split()[0] 43 | m = re.search(r'(.*?) as (\w+)', arg) 44 | if not m: 45 | raise template.TemplateSyntaxError, "%s tag had invalid arguments" % tag_name 46 | format_string, var_name = m.groups() 47 | return LatestPosts(format_string, var_name) 48 | 49 | 50 | class BlogCategories(template.Node): 51 | def __init__(self, var_name): 52 | self.var_name = var_name 53 | 54 | def render(self, context): 55 | categories = Category.objects.all() 56 | context[self.var_name] = categories 57 | return '' 58 | 59 | @register.tag 60 | def get_blog_categories(parser, token): 61 | """ 62 | Gets all blog categories. 63 | 64 | Syntax:: 65 | 66 | {% get_blog_categories as [var_name] %} 67 | 68 | Example usage:: 69 | 70 | {% get_blog_categories as category_list %} 71 | """ 72 | try: 73 | tag_name, arg = token.contents.split(None, 1) 74 | except ValueError: 75 | raise template.TemplateSyntaxError, "%s tag requires arguments" % token.contents.split()[0] 76 | m = re.search(r'as (\w+)', arg) 77 | if not m: 78 | raise template.TemplateSyntaxError, "%s tag had invalid arguments" % tag_name 79 | var_name = m.groups()[0] 80 | return BlogCategories(var_name) 81 | 82 | 83 | @register.filter 84 | def get_links(value): 85 | """ 86 | Extracts links from a ``Post`` body and returns a list. 87 | 88 | Template Syntax:: 89 | 90 | {{ post.body|markdown:"safe"|get_links }} 91 | 92 | """ 93 | try: 94 | try: 95 | from BeautifulSoup import BeautifulSoup 96 | except ImportError: 97 | from beautifulsoup import BeautifulSoup 98 | soup = BeautifulSoup(value) 99 | return soup.findAll('a') 100 | except ImportError: 101 | if settings.DEBUG: 102 | raise template.TemplateSyntaxError, "Error in 'get_links' filter: BeautifulSoup isn't installed." 103 | return value 104 | -------------------------------------------------------------------------------- /blog/tests.py: -------------------------------------------------------------------------------- 1 | """ 2 | >>> from django.test import Client 3 | >>> from blog.models import Post, Category 4 | >>> import datetime 5 | >>> from django.core.urlresolvers import reverse 6 | >>> client = Client() 7 | 8 | >>> category = Category(title='Django', slug='django') 9 | >>> category.save() 10 | >>> category2 = Category(title='Rails', slug='rails') 11 | >>> category2.save() 12 | 13 | >>> post = Post(title='DJ Ango', slug='dj-ango', body='Yo DJ! Turn that music up!', status=2, publish=datetime.datetime(2008,5,5,16,20)) 14 | >>> post.save() 15 | 16 | >>> post2 = Post(title='Where my grails at?', slug='where', body='I Can haz Holy plez?', status=2, publish=datetime.datetime(2008,4,2,11,11)) 17 | >>> post2.save() 18 | 19 | >>> post.categories.add(category) 20 | >>> post2.categories.add(category2) 21 | 22 | >>> response = client.get(reverse('blog_index')) 23 | >>> response.context[-1]['object_list'] 24 | [, ] 25 | >>> response.status_code 26 | 200 27 | 28 | >>> response = client.get(reverse('blog_category_list')) 29 | >>> response.context[-1]['object_list'] 30 | [, ] 31 | >>> response.status_code 32 | 200 33 | 34 | >>> response = client.get(category.get_absolute_url()) 35 | >>> response.context[-1]['object_list'] 36 | [] 37 | >>> response.status_code 38 | 200 39 | 40 | >>> response = client.get(post.get_absolute_url()) 41 | >>> response.context[-1]['object'] 42 | 43 | >>> response.status_code 44 | 200 45 | 46 | >>> response = client.get(reverse('blog_search'), {'q': 'DJ'}) 47 | >>> response.context[-1]['object_list'] 48 | [] 49 | >>> response.status_code 50 | 200 51 | >>> response = client.get(reverse('blog_search'), {'q': 'Holy'}) 52 | >>> response.context[-1]['object_list'] 53 | [] 54 | >>> response.status_code 55 | 200 56 | >>> response = client.get(reverse('blog_search'), {'q': ''}) 57 | >>> response.context[-1]['message'] 58 | 'Search term was too vague. Please try again.' 59 | 60 | >>> response = client.get(reverse('blog_detail', args=[2008, 'apr', 2, 'where'])) 61 | >>> response.context[-1]['object'] 62 | 63 | >>> response.status_code 64 | 200 65 | """ 66 | 67 | -------------------------------------------------------------------------------- /blog/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls.defaults import * 2 | from blog import views as blog_views 3 | 4 | 5 | urlpatterns = patterns('', 6 | url(r'^(?P\d{4})/(?P\w{3})/(?P\d{1,2})/(?P[-\w]+)/$', 7 | view=blog_views.post_detail, 8 | name='blog_detail'), 9 | 10 | url(r'^(?P\d{4})/(?P\w{3})/(?P\d{1,2})/$', 11 | view=blog_views.post_archive_day, 12 | name='blog_archive_day'), 13 | 14 | url(r'^(?P\d{4})/(?P\w{3})/$', 15 | view=blog_views.post_archive_month, 16 | name='blog_archive_month'), 17 | 18 | url(r'^(?P\d{4})/$', 19 | view=blog_views.post_archive_year, 20 | name='blog_archive_year'), 21 | 22 | url(r'^categories/(?P[-\w]+)/$', 23 | view=blog_views.category_detail, 24 | name='blog_category_detail'), 25 | 26 | url (r'^categories/$', 27 | view=blog_views.category_list, 28 | name='blog_category_list'), 29 | 30 | url (r'^search/$', 31 | view=blog_views.search, 32 | name='blog_search'), 33 | 34 | url(r'^page/(?P\w)/$', 35 | view=blog_views.post_list, 36 | name='blog_index_paginated'), 37 | 38 | url(r'^$', 39 | view=blog_views.post_list, 40 | name='blog_index'), 41 | ) 42 | -------------------------------------------------------------------------------- /calendar_dates/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/calendar_dates/__init__.py -------------------------------------------------------------------------------- /calendar_dates/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | import settings 3 | 4 | from djangogcal.adapter import CalendarAdapter, CalendarEvendata 5 | 6 | class Date(models.Model): 7 | ''' For Gcalendar ''' 8 | title = models.CharField(max_length=30) 9 | start_time = models.DateTimeField() 10 | end_time = models.DateTimeField() 11 | 12 | def __unicode__(self): 13 | return "%s - %s" % (self.title, self.start_time.date()) 14 | 15 | class DateCalendarAdapter(CalendarAdapter): 16 | 17 | def get_event_data(self, instance): 18 | return CalendarEventData( 19 | start=instance.start_time, 20 | end = instance.end_time, 21 | title=instance.title 22 | ) 23 | observer = CalendarObserver(email=settings.CALENDAR_EMAIL, 24 | password=settings.CALENDAR_PASSWORD) 25 | observer.observe(Date, DateCalendarAdapter()) 26 | -------------------------------------------------------------------------------- /calendar_dates/tests.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file demonstrates two different styles of tests (one doctest and one 3 | unittest). These will both pass when you run "manage.py test". 4 | 5 | Replace these with more appropriate tests for your application. 6 | """ 7 | 8 | from django.test import TestCase 9 | 10 | class SimpleTest(TestCase): 11 | def test_basic_addition(self): 12 | """ 13 | Tests that 1 + 1 always equals 2. 14 | """ 15 | self.failUnlessEqual(1 + 1, 2) 16 | 17 | __test__ = {"doctest": """ 18 | Another way to test that 1 + 1 is equal to 2. 19 | 20 | >>> 1 + 1 == 2 21 | True 22 | """} 23 | 24 | -------------------------------------------------------------------------------- /calendar_dates/views.py: -------------------------------------------------------------------------------- 1 | # Create your views here. 2 | -------------------------------------------------------------------------------- /comments/__init__.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | from django.core import urlresolvers 3 | from django.core.exceptions import ImproperlyConfigured 4 | from django.contrib.comments.models import Comment 5 | from django.contrib.comments.forms import CommentForm 6 | 7 | DEFAULT_COMMENTS_APP = 'django.contrib.comments' 8 | 9 | def get_comment_app(): 10 | """ 11 | Get the comment app (i.e. "django.contrib.comments") as defined in the settings 12 | """ 13 | # Make sure the app's in INSTALLED_APPS 14 | comments_app = get_comment_app_name() 15 | if comments_app not in settings.INSTALLED_APPS: 16 | raise ImproperlyConfigured("The COMMENTS_APP (%r) "\ 17 | "must be in INSTALLED_APPS" % settings.COMMENTS_APP) 18 | 19 | # Try to import the package 20 | try: 21 | package = __import__(comments_app, '', '', ['']) 22 | except ImportError: 23 | raise ImproperlyConfigured("The COMMENTS_APP setting refers to "\ 24 | "a non-existing package.") 25 | 26 | return package 27 | 28 | def get_comment_app_name(): 29 | """ 30 | Returns the name of the comment app (either the setting value, if it 31 | exists, or the default). 32 | """ 33 | return getattr(settings, 'COMMENTS_APP', DEFAULT_COMMENTS_APP) 34 | 35 | def get_model(): 36 | """ 37 | Returns the comment model class. 38 | """ 39 | if get_comment_app_name() != DEFAULT_COMMENTS_APP and hasattr(get_comment_app(), "get_model"): 40 | return get_comment_app().get_model() 41 | else: 42 | return Comment 43 | 44 | def get_form(): 45 | """ 46 | Returns the comment ModelForm class. 47 | """ 48 | if get_comment_app_name() != DEFAULT_COMMENTS_APP and hasattr(get_comment_app(), "get_form"): 49 | return get_comment_app().get_form() 50 | else: 51 | return CommentForm 52 | 53 | def get_form_target(): 54 | """ 55 | Returns the target URL for the comment form submission view. 56 | """ 57 | if get_comment_app_name() != DEFAULT_COMMENTS_APP and hasattr(get_comment_app(), "get_form_target"): 58 | return get_comment_app().get_form_target() 59 | else: 60 | return urlresolvers.reverse("django.contrib.comments.views.comments.post_comment") 61 | 62 | def get_flag_url(comment): 63 | """ 64 | Get the URL for the "flag this comment" view. 65 | """ 66 | if get_comment_app_name() != DEFAULT_COMMENTS_APP and hasattr(get_comment_app(), "get_flag_url"): 67 | return get_comment_app().get_flag_url(comment) 68 | else: 69 | return urlresolvers.reverse("django.contrib.comments.views.moderation.flag", 70 | args=(comment.id,)) 71 | 72 | def get_delete_url(comment): 73 | """ 74 | Get the URL for the "delete this comment" view. 75 | """ 76 | if get_comment_app_name() != DEFAULT_COMMENTS_APP and hasattr(get_comment_app(), "get_delete_url"): 77 | return get_comment_app().get_delete_url(comment) 78 | else: 79 | return urlresolvers.reverse("django.contrib.comments.views.moderation.delete", 80 | args=(comment.id,)) 81 | 82 | def get_approve_url(comment): 83 | """ 84 | Get the URL for the "approve this comment from moderation" view. 85 | """ 86 | if get_comment_app_name() != DEFAULT_COMMENTS_APP and hasattr(get_comment_app(), "get_approve_url"): 87 | return get_comment_app().get_approve_url(comment) 88 | else: 89 | return urlresolvers.reverse("django.contrib.comments.views.moderation.approve", 90 | args=(comment.id,)) 91 | -------------------------------------------------------------------------------- /comments/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from django.contrib.comments.models import Comment 3 | from django.utils.translation import ugettext_lazy as _ 4 | from django.contrib.comments import get_model 5 | 6 | class CommentsAdmin(admin.ModelAdmin): 7 | fieldsets = ( 8 | (None, 9 | {'fields': ('content_type', 'object_pk', 'site')} 10 | ), 11 | (_('Content'), 12 | {'fields': ('user', 'user_name', 'user_email', 'user_url', 'comment')} 13 | ), 14 | (_('Metadata'), 15 | {'fields': ('submit_date', 'ip_address', 'is_public', 'is_removed')} 16 | ), 17 | ) 18 | 19 | list_display = ('name', 'content_type', 'object_pk', 'ip_address', 'submit_date', 'is_public', 'is_removed') 20 | list_filter = ('submit_date', 'site', 'is_public', 'is_removed') 21 | date_hierarchy = 'submit_date' 22 | ordering = ('-submit_date',) 23 | search_fields = ('comment', 'user__username', 'user_name', 'user_email', 'user_url', 'ip_address') 24 | 25 | # Only register the default admin if the model is the built-in comment model 26 | # (this won't be true if there's a custom comment app). 27 | if get_model() is Comment: 28 | admin.site.register(Comment, CommentsAdmin) 29 | -------------------------------------------------------------------------------- /comments/feeds.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | from django.contrib.syndication.feeds import Feed 3 | from django.contrib.sites.models import Site 4 | from django.contrib import comments 5 | 6 | class LatestCommentFeed(Feed): 7 | """Feed of latest comments on the current site.""" 8 | 9 | def title(self): 10 | if not hasattr(self, '_site'): 11 | self._site = Site.objects.get_current() 12 | return u"%s comments" % self._site.name 13 | 14 | def link(self): 15 | if not hasattr(self, '_site'): 16 | self._site = Site.objects.get_current() 17 | return "http://%s/" % (self._site.domain) 18 | 19 | def description(self): 20 | if not hasattr(self, '_site'): 21 | self._site = Site.objects.get_current() 22 | return u"Latest comments on %s" % self._site.name 23 | 24 | def items(self): 25 | qs = comments.get_model().objects.filter( 26 | site__pk = settings.SITE_ID, 27 | is_public = True, 28 | is_removed = False, 29 | ) 30 | if getattr(settings, 'COMMENTS_BANNED_USERS_GROUP', None): 31 | where = ['user_id NOT IN (SELECT user_id FROM auth_user_groups WHERE group_id = %s)'] 32 | params = [settings.COMMENTS_BANNED_USERS_GROUP] 33 | qs = qs.extra(where=where, params=params) 34 | return qs.order_by('-submit_date')[:40] 35 | 36 | def item_pubdate(self, item): 37 | return item.submit_date 38 | -------------------------------------------------------------------------------- /comments/managers.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.contrib.contenttypes.models import ContentType 3 | from django.utils.encoding import force_unicode 4 | 5 | class CommentManager(models.Manager): 6 | 7 | def in_moderation(self): 8 | """ 9 | QuerySet for all comments currently in the moderation queue. 10 | """ 11 | return self.get_query_set().filter(is_public=False, is_removed=False) 12 | 13 | def for_model(self, model): 14 | """ 15 | QuerySet for all comments for a particular model (either an instance or 16 | a class). 17 | """ 18 | ct = ContentType.objects.get_for_model(model) 19 | qs = self.get_query_set().filter(content_type=ct) 20 | if isinstance(model, models.Model): 21 | qs = qs.filter(object_pk=force_unicode(model._get_pk_val())) 22 | return qs 23 | -------------------------------------------------------------------------------- /comments/signals.py: -------------------------------------------------------------------------------- 1 | """ 2 | Signals relating to comments. 3 | """ 4 | from django.dispatch import Signal 5 | 6 | # Sent just before a comment will be posted (after it's been approved and 7 | # moderated; this can be used to modify the comment (in place) with posting 8 | # details or other such actions. If any receiver returns False the comment will be 9 | # discarded and a 403 (not allowed) response. This signal is sent at more or less 10 | # the same time (just before, actually) as the Comment object's pre-save signal, 11 | # except that the HTTP request is sent along with this signal. 12 | comment_will_be_posted = Signal(providing_args=["comment", "request"]) 13 | 14 | # Sent just after a comment was posted. See above for how this differs 15 | # from the Comment object's post-save signal. 16 | comment_was_posted = Signal(providing_args=["comment", "request"]) 17 | 18 | # Sent after a comment was "flagged" in some way. Check the flag to see if this 19 | # was a user requesting removal of a comment, a moderator approving/removing a 20 | # comment, or some other custom user flag. 21 | comment_was_flagged = Signal(providing_args=["comment", "flag", "created", "request"]) 22 | -------------------------------------------------------------------------------- /comments/templates/comments/400-debug.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Comment post not allowed (400) 6 | 7 | 24 | 25 | 26 |
27 |

Comment post not allowed (400)

28 | 29 | 30 | 31 | 32 | 33 |
Why:{{ why }}
34 |
35 |
36 |

37 | The comment you tried to post to this view wasn't saved because something 38 | tampered with the security information in the comment form. The message 39 | above should explain the problem, or you can check the comment 41 | documentation for more help. 42 |

43 |
44 | 45 |
46 |

47 | You're seeing this error because you have DEBUG = True in 48 | your Django settings file. Change that to False, and Django 49 | will display a standard 400 error page. 50 |

51 |
52 | 53 | 54 | -------------------------------------------------------------------------------- /comments/templates/comments/approve.html: -------------------------------------------------------------------------------- 1 | {% extends "comments/base.html" %} 2 | {% load i18n %} 3 | 4 | {% block title %}{% trans "Approve a comment" %}{% endblock %} 5 | 6 | {% block content %} 7 |

{% trans "Really make this comment public?" %}

8 |
{{ comment|linebreaks }}
9 |
10 | 11 |

12 | or cancel 13 |

14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /comments/templates/comments/approved.html: -------------------------------------------------------------------------------- 1 | {% extends "comments/base.html" %} 2 | {% load i18n %} 3 | 4 | {% block title %}{% trans "Thanks for approving" %}.{% endblock %} 5 | 6 | {% block content %} 7 |

{% trans "Thanks for taking the time to improve the quality of discussion on our site" %}.

8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /comments/templates/comments/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {% block title %}{% endblock %} 6 | 7 | 8 | {% block content %}{% endblock %} 9 | 10 | 11 | -------------------------------------------------------------------------------- /comments/templates/comments/delete.html: -------------------------------------------------------------------------------- 1 | {% extends "comments/base.html" %} 2 | {% load i18n %} 3 | 4 | {% block title %}{% trans "Remove a comment" %}{% endblock %} 5 | 6 | {% block content %} 7 |

{% trans "Really remove this comment?" %}

8 |
{{ comment|linebreaks }}
9 |
10 | 11 |

12 | or cancel 13 |

14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /comments/templates/comments/deleted.html: -------------------------------------------------------------------------------- 1 | {% extends "comments/base.html" %} 2 | {% load i18n %} 3 | 4 | {% block title %}{% trans "Thanks for removing" %}.{% endblock %} 5 | 6 | {% block content %} 7 |

{% trans "Thanks for taking the time to improve the quality of discussion on our site" %}.

8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /comments/templates/comments/flag.html: -------------------------------------------------------------------------------- 1 | {% extends "comments/base.html" %} 2 | {% load i18n %} 3 | 4 | {% block title %}{% trans "Flag this comment" %}{% endblock %} 5 | 6 | {% block content %} 7 |

{% trans "Really flag this comment?" %}

8 |
{{ comment|linebreaks }}
9 |
10 | 11 |

12 | or cancel 13 |

14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /comments/templates/comments/flagged.html: -------------------------------------------------------------------------------- 1 | {% extends "comments/base.html" %} 2 | {% load i18n %} 3 | 4 | {% block title %}{% trans "Thanks for flagging" %}.{% endblock %} 5 | 6 | {% block content %} 7 |

{% trans "Thanks for taking the time to improve the quality of discussion on our site" %}.

8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /comments/templates/comments/form.html: -------------------------------------------------------------------------------- 1 | {% load comments i18n %} 2 |
3 | {% for field in form %} 4 | {% if field.is_hidden %} 5 | {{ field }} 6 | {% else %} 7 | 13 | {% endif %} 14 | {% endfor %} 15 |

16 | 17 | 18 |

19 |
20 | -------------------------------------------------------------------------------- /comments/templates/comments/moderation_queue.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/change_list.html" %} 2 | {% load adminmedia i18n %} 3 | 4 | {% block title %}{% trans "Comment moderation queue" %}{% endblock %} 5 | 6 | {% block extrahead %} 7 | {{ block.super }} 8 | 16 | {% endblock %} 17 | 18 | {% block branding %} 19 |

{% trans "Comment moderation queue" %}

20 | {% endblock %} 21 | 22 | {% block breadcrumbs %}{% endblock %} 23 | 24 | {% block content %} 25 | {% if empty %} 26 |

{% trans "No comments to moderate" %}.

27 | {% else %} 28 |
29 |
30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | {% for comment in comments %} 45 | 46 | 56 | 57 | 58 | 59 | 60 | 66 | 67 | 68 | 69 | {% endfor %} 70 | 71 |
{% trans "Action" %}{% trans "Name" %}{% trans "Comment" %}{% trans "Email" %}{% trans "URL" %}{% trans "Authenticated?" %}{% trans "IP Address" %}{% trans "Date posted" %}
47 |
48 | 49 | 50 |
51 |
52 | 53 | 54 |
55 |
{{ comment.name }}{{ comment.comment|truncatewords:"50" }}{{ comment.email }}{{ comment.url }} 61 | {% if comment.user %}{% trans 65 | {{ comment.ip_address }}{{ comment.submit_date|date:"F j, P" }}
72 |
73 |
74 | {% endif %} 75 | {% endblock %} 76 | -------------------------------------------------------------------------------- /comments/templates/comments/posted.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load i18n %} 3 | 4 | {% block title %}{% trans "Thanks for commenting" %}.{% endblock %} 5 | 6 | {% block content %} 7 |

{% trans "Thank you for your comment" %}.

8 |

Go back to {{comment.content_object}} »

9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /comments/templates/comments/preview.html: -------------------------------------------------------------------------------- 1 | {% extends "comments/base.html" %} 2 | {% load i18n %} 3 | 4 | {% block title %}{% trans "Preview your comment" %}{% endblock %} 5 | 6 | {% block content %} 7 | {% load comments %} 8 |
9 | {% if form.errors %} 10 |

{% blocktrans count form.errors|length as counter %}Please correct the error below{% plural %}Please correct the errors below{% endblocktrans %}

11 | {% else %} 12 |

{% trans "Preview your comment" %}

13 |
{{ comment|linebreaks }}
14 |

15 | {% trans "and" %} {% trans "or make changes" %}: 16 |

17 | {% endif %} 18 | {% for field in form %} 19 | {% if field.is_hidden %} 20 | {{ field }} 21 | {% else %} 22 | 28 | {% endif %} 29 | {% endfor %} 30 |

31 | 32 | 33 |

34 |
35 | {% endblock %} 36 | -------------------------------------------------------------------------------- /comments/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/comments/templatetags/__init__.py -------------------------------------------------------------------------------- /comments/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls.defaults import * 2 | 3 | urlpatterns = patterns('django.contrib.comments.views', 4 | url(r'^post/$', 'comments.post_comment', name='comments-post-comment'), 5 | url(r'^posted/$', 'comments.comment_done', name='comments-comment-done'), 6 | url(r'^flag/(\d+)/$', 'moderation.flag', name='comments-flag'), 7 | url(r'^flagged/$', 'moderation.flag_done', name='comments-flag-done'), 8 | url(r'^delete/(\d+)/$', 'moderation.delete', name='comments-delete'), 9 | url(r'^deleted/$', 'moderation.delete_done', name='comments-delete-done'), 10 | url(r'^moderate/$', 'moderation.moderation_queue', name='comments-moderation-queue'), 11 | url(r'^approve/(\d+)/$', 'moderation.approve', name='comments-approve'), 12 | url(r'^approved/$', 'moderation.approve_done', name='comments-approve-done'), 13 | ) 14 | 15 | urlpatterns += patterns('', 16 | url(r'^cr/(\d+)/(\w+)/$', 'django.views.defaults.shortcut', name='comments-url-redirect'), 17 | ) 18 | 19 | -------------------------------------------------------------------------------- /comments/views/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/comments/views/__init__.py -------------------------------------------------------------------------------- /comments/views/utils.py: -------------------------------------------------------------------------------- 1 | """ 2 | A few bits of helper functions for comment views. 3 | """ 4 | 5 | import urllib 6 | import textwrap 7 | from django.http import HttpResponseRedirect 8 | from django.core import urlresolvers 9 | from django.shortcuts import render_to_response 10 | from django.template import RequestContext 11 | from django.core.exceptions import ObjectDoesNotExist 12 | from django.contrib import comments 13 | 14 | def next_redirect(data, default, default_view, **get_kwargs): 15 | """ 16 | Handle the "where should I go next?" part of comment views. 17 | 18 | The next value could be a kwarg to the function (``default``), or a 19 | ``?next=...`` GET arg, or the URL of a given view (``default_view``). See 20 | the view modules for examples. 21 | 22 | Returns an ``HttpResponseRedirect``. 23 | """ 24 | next = data.get("next", default) 25 | if next is None: 26 | next = urlresolvers.reverse(default_view) 27 | if get_kwargs: 28 | next += "?" + urllib.urlencode(get_kwargs) 29 | return HttpResponseRedirect(next) 30 | 31 | def confirmation_view(template, doc="Display a confirmation view."): 32 | """ 33 | Confirmation view generator for the "comment was 34 | posted/flagged/deleted/approved" views. 35 | """ 36 | def confirmed(request): 37 | comment = None 38 | if 'c' in request.GET: 39 | try: 40 | comment = comments.get_model().objects.get(pk=request.GET['c']) 41 | except ObjectDoesNotExist: 42 | pass 43 | return render_to_response(template, 44 | {'comment': comment}, 45 | context_instance=RequestContext(request) 46 | ) 47 | 48 | confirmed.__doc__ = textwrap.dedent("""\ 49 | %s 50 | 51 | Templates: `%s`` 52 | Context: 53 | comment 54 | The posted comment 55 | """ % (doc, template) 56 | ) 57 | return confirmed 58 | -------------------------------------------------------------------------------- /constants.py: -------------------------------------------------------------------------------- 1 | payment_types = ( 2 | ('MealPlan', 'MealPlan'), 3 | ('ApplicationFee', 'ApplicationFee'), 4 | ('RegistrationFee', 'RegistrationFee'), 5 | ('EnrollmentFee', 'EnrollmentFee'), 6 | ) 7 | 8 | title_choices = ( 9 | ('Mr','Mr.'), 10 | ('Mrs','Mrs.'), 11 | ('Ms','Ms.'), 12 | ('Miss','Miss'), 13 | ('Dr','Dr.'), 14 | ('Prof','Prof.'), 15 | ('Rev','Rev.'), 16 | ) 17 | 18 | grade_choices = ( 19 | ('k4','K4'), 20 | ('k5','K5'), 21 | ('1st','1st'), 22 | ('2nd','2nd'), 23 | ('3rd','3rd'), 24 | ('4th','4th'), 25 | ('5th','5th'), 26 | ('6th','6th'), 27 | ('7th','7th'), 28 | ('8th','8th'), 29 | ) 30 | 31 | gender_choices = ( 32 | ('m', 'Male'), 33 | ('f', 'Female') 34 | ) 35 | 36 | relationship_choices = ( 37 | ('mother', 'Mother'), 38 | ('father', 'Father'), 39 | ('grandfather', 'Grandfather'), 40 | ('grandmother', 'Grandmother'), 41 | ('aunt', 'Aunt'), 42 | ('uncle', 'Uncle'), 43 | ('brother', 'Brother'), 44 | ('sister', 'Sister'), 45 | ('cousin', 'Cousin'), 46 | ('other', 'Other'), 47 | ) 48 | 49 | -------------------------------------------------------------------------------- /email-auth.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.models import User 2 | from django.forms.fields import email_re 3 | 4 | class BasicBackend: 5 | def get_user(self, user_id): 6 | try: 7 | return User.objects.get(pk=user_id) 8 | except User.DoesNotExist: 9 | return None 10 | 11 | class EmailBackend(BasicBackend): 12 | def authenticate(self, username=None, password=None): 13 | #If username is an email address, then try to pull it up 14 | if email_re.search(username): 15 | try: 16 | user = User.objects.get(email=username) 17 | except User.DoesNotExist: 18 | return None 19 | else: 20 | #We have a non-email address username we should try username 21 | try: 22 | user = User.objects.get(username=username) 23 | except User.DoesNotExist: 24 | return None 25 | if user.check_password(password): 26 | return user 27 | 28 | -------------------------------------------------------------------------------- /empty_local_settings.py: -------------------------------------------------------------------------------- 1 | SECRET_KEY = '' 2 | DATABASE_ENGINE = '' 3 | DATABASE_NAME = '' 4 | DATABASE_USER = '' 5 | DATABASE_PASSWORD = '' 6 | DATABASE_HOST = '' 7 | DATABASE_PORT = '' 8 | 9 | EMAIL_HOST = '' 10 | EMAIL_HOST_USER = '' 11 | EMAIL_HOST_PASSWORD = '' 12 | EMAIL_PORT = '' 13 | DEFAULT_FROM_EMAIL = '' 14 | SERVER_EMAIL = '' 15 | 16 | MEDIA_URL = '' 17 | ADMIN_MEDIA_PREFIX = '' 18 | 19 | -------------------------------------------------------------------------------- /homeviews.py: -------------------------------------------------------------------------------- 1 | import datetime 2 | from django.shortcuts import render_to_response 3 | from django.template import RequestContext 4 | 5 | from menu.models import DateSet 6 | def home(request): 7 | try: 8 | menu = DateSet.objects.get(start_taking_orders__lte =\ 9 | datetime.date.today(), end_taking_orders__gte =\ 10 | datetime.date.today()) 11 | except: 12 | menu = None 13 | 14 | home=True 15 | try: 16 | profile = request.user.get_profile() 17 | except: 18 | profile=None 19 | context = {'menu':menu, 'home':home, 'profile':profile,} 20 | return render_to_response('home.html', context,\ 21 | context_instance=RequestContext(request)) 22 | 23 | def calendar(request): 24 | context = {} 25 | return render_to_response('calendar.html', context,\ 26 | context_instance=RequestContext(request)) 27 | -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | from django.core.management import execute_manager 3 | try: 4 | import settings # Assumed to be in the same directory. 5 | except ImportError: 6 | import sys 7 | sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) 8 | sys.exit(1) 9 | 10 | if __name__ == "__main__": 11 | execute_manager(settings) 12 | -------------------------------------------------------------------------------- /media/css/images/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/ajax-loader.gif -------------------------------------------------------------------------------- /media/css/images/arrow-down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/arrow-down.gif -------------------------------------------------------------------------------- /media/css/images/arrow-up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/arrow-up.gif -------------------------------------------------------------------------------- /media/css/images/brand-back.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/brand-back.jpg -------------------------------------------------------------------------------- /media/css/images/btn-paynow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/btn-paynow.gif -------------------------------------------------------------------------------- /media/css/images/ccs-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/ccs-logo.png -------------------------------------------------------------------------------- /media/css/images/ccs-ribbon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/ccs-ribbon.gif -------------------------------------------------------------------------------- /media/css/images/changelist-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/changelist-bg.gif -------------------------------------------------------------------------------- /media/css/images/changelist-bg_rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/changelist-bg_rtl.gif -------------------------------------------------------------------------------- /media/css/images/chooser-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/chooser-bg.gif -------------------------------------------------------------------------------- /media/css/images/chooser_stacked-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/chooser_stacked-bg.gif -------------------------------------------------------------------------------- /media/css/images/create-account-btn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/create-account-btn.gif -------------------------------------------------------------------------------- /media/css/images/default-bg-reverse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/default-bg-reverse.gif -------------------------------------------------------------------------------- /media/css/images/default-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/default-bg.gif -------------------------------------------------------------------------------- /media/css/images/deleted-overlay.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/deleted-overlay.gif -------------------------------------------------------------------------------- /media/css/images/icon-no.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/icon-no.gif -------------------------------------------------------------------------------- /media/css/images/icon-unknown.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/icon-unknown.gif -------------------------------------------------------------------------------- /media/css/images/icon-yes.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/icon-yes.gif -------------------------------------------------------------------------------- /media/css/images/icon_addlink.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/icon_addlink.gif -------------------------------------------------------------------------------- /media/css/images/icon_alert.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/icon_alert.gif -------------------------------------------------------------------------------- /media/css/images/icon_calendar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/icon_calendar.gif -------------------------------------------------------------------------------- /media/css/images/icon_changelink.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/icon_changelink.gif -------------------------------------------------------------------------------- /media/css/images/icon_clock.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/icon_clock.gif -------------------------------------------------------------------------------- /media/css/images/icon_deletelink.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/icon_deletelink.gif -------------------------------------------------------------------------------- /media/css/images/icon_error.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/icon_error.gif -------------------------------------------------------------------------------- /media/css/images/icon_searchbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/icon_searchbox.png -------------------------------------------------------------------------------- /media/css/images/icon_success.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/icon_success.gif -------------------------------------------------------------------------------- /media/css/images/inline-delete-8bit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/inline-delete-8bit.png -------------------------------------------------------------------------------- /media/css/images/inline-delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/inline-delete.png -------------------------------------------------------------------------------- /media/css/images/inline-restore-8bit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/inline-restore-8bit.png -------------------------------------------------------------------------------- /media/css/images/inline-restore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/inline-restore.png -------------------------------------------------------------------------------- /media/css/images/inline-splitter-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/inline-splitter-bg.gif -------------------------------------------------------------------------------- /media/css/images/menu-key.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/menu-key.gif -------------------------------------------------------------------------------- /media/css/images/menu-month-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/menu-month-bg.gif -------------------------------------------------------------------------------- /media/css/images/nav-bg-grabber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/nav-bg-grabber.gif -------------------------------------------------------------------------------- /media/css/images/nav-bg-reverse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/nav-bg-reverse.gif -------------------------------------------------------------------------------- /media/css/images/nav-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/nav-bg.gif -------------------------------------------------------------------------------- /media/css/images/photo_60x60.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/photo_60x60.jpg -------------------------------------------------------------------------------- /media/css/images/photo_60x60.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/photo_60x60.psd -------------------------------------------------------------------------------- /media/css/images/rounded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/rounded.png -------------------------------------------------------------------------------- /media/css/images/selector-add.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/selector-add.gif -------------------------------------------------------------------------------- /media/css/images/selector-addall.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/selector-addall.gif -------------------------------------------------------------------------------- /media/css/images/selector-remove.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/selector-remove.gif -------------------------------------------------------------------------------- /media/css/images/selector-removeall.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/selector-removeall.gif -------------------------------------------------------------------------------- /media/css/images/selector-search.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/selector-search.gif -------------------------------------------------------------------------------- /media/css/images/selector_stacked-add.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/selector_stacked-add.gif -------------------------------------------------------------------------------- /media/css/images/selector_stacked-remove.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/selector_stacked-remove.gif -------------------------------------------------------------------------------- /media/css/images/status-complete.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/status-complete.gif -------------------------------------------------------------------------------- /media/css/images/status-incomplete.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/status-incomplete.gif -------------------------------------------------------------------------------- /media/css/images/switch_minus.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/switch_minus.gif -------------------------------------------------------------------------------- /media/css/images/switch_plus.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/switch_plus.gif -------------------------------------------------------------------------------- /media/css/images/tool-left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/tool-left.gif -------------------------------------------------------------------------------- /media/css/images/tool-left_over.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/tool-left_over.gif -------------------------------------------------------------------------------- /media/css/images/tool-right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/tool-right.gif -------------------------------------------------------------------------------- /media/css/images/tool-right_over.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/tool-right_over.gif -------------------------------------------------------------------------------- /media/css/images/tooltag-add.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/tooltag-add.gif -------------------------------------------------------------------------------- /media/css/images/tooltag-add_over.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/tooltag-add_over.gif -------------------------------------------------------------------------------- /media/css/images/tooltag-arrowright.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/tooltag-arrowright.gif -------------------------------------------------------------------------------- /media/css/images/tooltag-arrowright_over.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/tooltag-arrowright_over.gif -------------------------------------------------------------------------------- /media/css/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /media/css/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /media/css/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /media/css/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /media/css/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /media/css/images/ui-bg_glass_75_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/ui-bg_glass_75_ffffff_1x400.png -------------------------------------------------------------------------------- /media/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /media/css/images/ui-bg_inset-soft_95_fef1ec_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/ui-bg_inset-soft_95_fef1ec_1x100.png -------------------------------------------------------------------------------- /media/css/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /media/css/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /media/css/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /media/css/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /media/css/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/css/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /media/css/reset.css: -------------------------------------------------------------------------------- 1 | /* Resets 2 | ----------------------------------------------- */ 3 | html, body, div, span, applet, object, iframe, 4 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 5 | a, abbr, acronym, address, big, cite, code, 6 | del, dfn, em, font, img, ins, kbd, q, s, samp, 7 | small, strike, strong, sub, sup, tt, var, 8 | dl, dt, dd, ol, ul, li, 9 | fieldset, form, label, legend, 10 | table, caption, tbody, tfoot, thead, tr, th, td { 11 | margin: 0; 12 | padding: 0; 13 | border: 0; 14 | outline: 0; 15 | font-weight: inherit; 16 | font-style: inherit; 17 | font-size: 100%; 18 | font-family: inherit; 19 | vertical-align: baseline; 20 | } 21 | /* remember to define focus styles! */ 22 | :focus { 23 | outline: 0; 24 | } 25 | body { 26 | line-height: 1; 27 | color: black; 28 | background: white; 29 | } 30 | ol, ul { 31 | list-style: none; 32 | } 33 | /* tables still need 'cellspacing="0"' in the markup */ 34 | table { 35 | border-collapse: separate; 36 | border-spacing: 0; 37 | } 38 | caption, th, td { 39 | text-align: left; 40 | font-weight: normal; 41 | } 42 | 43 | /* whoever thought blue linked image borders were a good idea? */ 44 | a img,:link img,:visited img { border:none } -------------------------------------------------------------------------------- /media/highslide/graphics/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/close.png -------------------------------------------------------------------------------- /media/highslide/graphics/closeX.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/closeX.png -------------------------------------------------------------------------------- /media/highslide/graphics/controlbar-black-border.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/controlbar-black-border.gif -------------------------------------------------------------------------------- /media/highslide/graphics/controlbar-text-buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/controlbar-text-buttons.png -------------------------------------------------------------------------------- /media/highslide/graphics/controlbar-white-small.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/controlbar-white-small.gif -------------------------------------------------------------------------------- /media/highslide/graphics/controlbar-white.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/controlbar-white.gif -------------------------------------------------------------------------------- /media/highslide/graphics/controlbar2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/controlbar2.gif -------------------------------------------------------------------------------- /media/highslide/graphics/controlbar3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/controlbar3.gif -------------------------------------------------------------------------------- /media/highslide/graphics/controlbar4-hover.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/controlbar4-hover.gif -------------------------------------------------------------------------------- /media/highslide/graphics/controlbar4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/controlbar4.gif -------------------------------------------------------------------------------- /media/highslide/graphics/fullexpand.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/fullexpand.gif -------------------------------------------------------------------------------- /media/highslide/graphics/geckodimmer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/geckodimmer.png -------------------------------------------------------------------------------- /media/highslide/graphics/icon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/icon.gif -------------------------------------------------------------------------------- /media/highslide/graphics/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/loader.gif -------------------------------------------------------------------------------- /media/highslide/graphics/loader.white.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/loader.white.gif -------------------------------------------------------------------------------- /media/highslide/graphics/outlines/Outlines.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/outlines/Outlines.psd -------------------------------------------------------------------------------- /media/highslide/graphics/outlines/beveled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/outlines/beveled.png -------------------------------------------------------------------------------- /media/highslide/graphics/outlines/drop-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/outlines/drop-shadow.png -------------------------------------------------------------------------------- /media/highslide/graphics/outlines/glossy-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/outlines/glossy-dark.png -------------------------------------------------------------------------------- /media/highslide/graphics/outlines/outer-glow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/outlines/outer-glow.png -------------------------------------------------------------------------------- /media/highslide/graphics/outlines/rounded-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/outlines/rounded-black.png -------------------------------------------------------------------------------- /media/highslide/graphics/outlines/rounded-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/outlines/rounded-white.png -------------------------------------------------------------------------------- /media/highslide/graphics/resize.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/resize.gif -------------------------------------------------------------------------------- /media/highslide/graphics/scrollarrows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/scrollarrows.png -------------------------------------------------------------------------------- /media/highslide/graphics/zoomin.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/zoomin.cur -------------------------------------------------------------------------------- /media/highslide/graphics/zoomout.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/graphics/zoomout.cur -------------------------------------------------------------------------------- /media/highslide/highslide-full.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/highslide-full.js -------------------------------------------------------------------------------- /media/highslide/highslide-full.packed.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/highslide-full.packed.js -------------------------------------------------------------------------------- /media/highslide/highslide-ie6.css: -------------------------------------------------------------------------------- 1 | .closebutton { 2 | /* NOTE! This URL is relative to the HTML page, not the CSS */ 3 | filter:progid:DXImageTransform.Microsoft.AlphaImageLoader( 4 | src='../highslide/graphics/close.png', sizingMethod='scale'); 5 | 6 | background: none; 7 | cursor: hand; 8 | } 9 | 10 | /* Viewport fixed hack */ 11 | .highslide-viewport { 12 | position: absolute; 13 | left: expression( ( ( ignoreMe1 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); 14 | top: expression( ( ignoreMe2 = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) + 'px' ); 15 | width: expression( ( ( ignoreMe3 = document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) ) + 'px' ); 16 | height: expression( ( ( ignoreMe4 = document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) ) + 'px' ); 17 | } 18 | 19 | /* Thumbstrip PNG fix */ 20 | .highslide-scroll-down, .highslide-scroll-up { 21 | position: relative; 22 | overflow: hidden; 23 | } 24 | .highslide-scroll-down div, .highslide-scroll-up div { 25 | /* NOTE! This URL is relative to the HTML page, not the CSS */ 26 | filter:progid:DXImageTransform.Microsoft.AlphaImageLoader( 27 | src='/highslide/graphics/scrollarrows.png', sizingMethod='scale'); 28 | background: none !important; 29 | position: absolute; 30 | cursor: hand; 31 | width: 75px; 32 | height: 75px !important; 33 | } 34 | .highslide-thumbstrip-horizontal .highslide-scroll-down div { 35 | left: -50px; 36 | top: -15px; 37 | } 38 | .highslide-thumbstrip-horizontal .highslide-scroll-up div { 39 | top: -15px; 40 | } 41 | .highslide-thumbstrip-vertical .highslide-scroll-down div { 42 | top: -50px; 43 | } 44 | 45 | /* Thumbstrip marker arrow trasparent background fix */ 46 | .highslide-thumbstrip .highslide-marker { 47 | border-color: white; /* match the background */ 48 | } 49 | .dark .highslide-thumbstrip-horizontal .highslide-marker { 50 | border-color: #111; 51 | } 52 | .highslide-viewport .highslide-marker { 53 | border-color: #333; 54 | } 55 | .highslide-thumbstrip { 56 | float: left; 57 | } 58 | 59 | /* Positioning fixes for the control bar */ 60 | .text-controls .highslide-controls { 61 | width: 480px; 62 | } 63 | .text-controls a span { 64 | width: 4em; 65 | } 66 | .text-controls .highslide-full-expand a span { 67 | width: 0; 68 | } 69 | .text-controls .highslide-close a span { 70 | width: 0; 71 | } 72 | -------------------------------------------------------------------------------- /media/highslide/highslide-with-gallery.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/highslide-with-gallery.js -------------------------------------------------------------------------------- /media/highslide/highslide-with-gallery.packed.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/highslide-with-gallery.packed.js -------------------------------------------------------------------------------- /media/highslide/highslide-with-html.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/highslide-with-html.js -------------------------------------------------------------------------------- /media/highslide/highslide-with-html.packed.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/highslide-with-html.packed.js -------------------------------------------------------------------------------- /media/highslide/highslide.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/highslide.js -------------------------------------------------------------------------------- /media/highslide/highslide.packed.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/highslide/highslide.packed.js -------------------------------------------------------------------------------- /media/img/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/img/ajax-loader.gif -------------------------------------------------------------------------------- /media/js/admin-expand.js: -------------------------------------------------------------------------------- 1 | /* Selectively expands and collapses installed Django apps in the main Django 2 | * Admin page. If jquery.cookie.js [1] is available, it will remember which apps you 3 | * have expanded. 4 | * 5 | * .. [1] http://dev.jquery.com/browser/trunk/plugins/cookie/jquery.cookie.js 6 | */ 7 | 8 | $(document).ready(function() { 9 | var cookie_name = "admin_expanded"; 10 | var delim = "|"; 11 | var admin_expanded = []; 12 | var base_selector = $("body.dashboard #content-main .module caption"); 13 | 14 | // if the cookie plugin is available 15 | if ($.isFunction($.cookie)) { 16 | // put any expanded modules in the expanded list 17 | $.each(($.cookie(cookie_name) || "").split(delim), function(index, obj) { 18 | if (obj) { admin_expanded.push(base_selector.filter("caption:contains('"+obj+"')")[0]); } 19 | }); 20 | } 21 | 22 | // minor usability fix 23 | base_selector.css("width", "100%").css("cursor", "pointer"); 24 | 25 | // collapse all modules that aren't remembered in the cookie 26 | base_selector.not(admin_expanded).siblings('tbody').hide(); 27 | 28 | // toggle on click 29 | base_selector.click(function(){ 30 | $(this).siblings('tbody').animate({opacity: 'toggle'}, "fast", null, function(){ 31 | // if the cookie plugin is available 32 | if ($.isFunction($.cookie)) { 33 | // set or remove this module in the cookie 34 | t = $(this).siblings('caption').text(); 35 | j = ($.cookie(cookie_name) || "").split(delim); 36 | if (j.indexOf(t) != -1) { 37 | j.splice(j.indexOf(t), 1); 38 | } else { 39 | j.push(t); 40 | } 41 | $.cookie(cookie_name, j.join("|")); 42 | } 43 | }); 44 | }); 45 | }); 46 | 47 | -------------------------------------------------------------------------------- /media/js/jqDnR.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jqDnR - Minimalistic Drag'n'Resize for jQuery. 3 | * 4 | * Copyright (c) 2007 Brice Burgess , http://www.iceburg.net 5 | * Licensed under the MIT License: 6 | * http://www.opensource.org/licenses/mit-license.php 7 | * 8 | * $Version: 2007.08.19 +r2 9 | */ 10 | 11 | (function($){ 12 | $.fn.jqDrag=function(h){return i(this,h,'d');}; 13 | $.fn.jqResize=function(h){return i(this,h,'r');}; 14 | $.jqDnR={dnr:{},e:0, 15 | drag:function(v){ 16 | if(M.k == 'd')E.css({left:M.X+v.pageX-M.pX,top:M.Y+v.pageY-M.pY}); 17 | else E.css({width:Math.max(v.pageX-M.pX+M.W,0),height:Math.max(v.pageY-M.pY+M.H,0)}); 18 | return false;}, 19 | stop:function(){E.css('opacity',M.o);$().unbind('mousemove',J.drag).unbind('mouseup',J.stop);} 20 | }; 21 | var J=$.jqDnR,M=J.dnr,E=J.e, 22 | i=function(e,h,k){return e.each(function(){h=(h)?$(h,e):e; 23 | h.bind('mousedown',{e:e,k:k},function(v){var d=v.data,p={};E=d.e; 24 | // attempt utilization of dimensions plugin to fix IE issues 25 | if(E.css('position') != 'relative'){try{E.position(p);}catch(e){}} 26 | M={X:p.left||f('left')||0,Y:p.top||f('top')||0,W:f('width')||E[0].scrollWidth||0,H:f('height')||E[0].scrollHeight||0,pX:v.pageX,pY:v.pageY,k:d.k,o:E.css('opacity')}; 27 | E.css({opacity:0.8});$().mousemove($.jqDnR.drag).mouseup($.jqDnR.stop); 28 | return false; 29 | }); 30 | });}, 31 | f=function(k){return parseInt(E.css(k))||false;}; 32 | })(jQuery); -------------------------------------------------------------------------------- /media/js/jqModal.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jqModal - Minimalist Modaling with jQuery 3 | * (http://dev.iceburg.net/jquery/jqModal/) 4 | * 5 | * Copyright (c) 2007,2008 Brice Burgess 6 | * Dual licensed under the MIT and GPL licenses: 7 | * http://www.opensource.org/licenses/mit-license.php 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * $Version: 07/06/2008 +r13 11 | */ 12 | (function($) { 13 | $.fn.jqm=function(o){ 14 | var p={ 15 | overlay: 50, 16 | overlayClass: 'jqmOverlay', 17 | closeClass: 'jqmClose', 18 | trigger: '.jqModal', 19 | ajax: F, 20 | ajaxText: '', 21 | target: F, 22 | modal: F, 23 | toTop: F, 24 | onShow: F, 25 | onHide: F, 26 | onLoad: F 27 | }; 28 | return this.each(function(){if(this._jqm)return H[this._jqm].c=$.extend({},H[this._jqm].c,o);s++;this._jqm=s; 29 | H[s]={c:$.extend(p,$.jqm.params,o),a:F,w:$(this).addClass('jqmID'+s),s:s}; 30 | if(p.trigger)$(this).jqmAddTrigger(p.trigger); 31 | });}; 32 | 33 | $.fn.jqmAddClose=function(e){return hs(this,e,'jqmHide');}; 34 | $.fn.jqmAddTrigger=function(e){return hs(this,e,'jqmShow');}; 35 | $.fn.jqmShow=function(t){return this.each(function(){$.jqm.open(this._jqm,t);});}; 36 | $.fn.jqmHide=function(t){return this.each(function(){$.jqm.close(this._jqm,t)});}; 37 | 38 | $.jqm = { 39 | hash:{}, 40 | open:function(s,t){var h=H[s],c=h.c,cc='.'+c.closeClass,z=(parseInt(h.w.css('z-index'))),z=(z>0)?z:3000,o=$('
').css({height:'100%',width:'100%',position:'fixed',left:0,top:0,'z-index':z-1,opacity:c.overlay/100});if(h.a)return F;h.t=t;h.a=true;h.w.css('z-index',z); 41 | if(c.modal) {if(!A[0])L('bind');A.push(s);} 42 | else if(c.overlay > 0)h.w.jqmAddClose(o); 43 | else o=F; 44 | 45 | h.o=(o)?o.addClass(c.overlayClass).prependTo('body'):F; 46 | if(ie6){$('html,body').css({height:'100%',width:'100%'});if(o){o=o.css({position:'absolute'})[0];for(var y in {Top:1,Left:1})o.style.setExpression(y.toLowerCase(),"(_=(document.documentElement.scroll"+y+" || document.body.scroll"+y+"))+'px'");}} 47 | 48 | if(c.ajax) {var r=c.target||h.w,u=c.ajax,r=(typeof r == 'string')?$(r,h.w):$(r),u=(u.substr(0,1) == '@')?$(t).attr(u.substring(1)):u; 49 | r.html(c.ajaxText).load(u,function(){if(c.onLoad)c.onLoad.call(this,h);if(cc)h.w.jqmAddClose($(cc,h.w));e(h);});} 50 | else if(cc)h.w.jqmAddClose($(cc,h.w)); 51 | 52 | if(c.toTop&&h.o)h.w.before('').insertAfter(h.o); 53 | (c.onShow)?c.onShow(h):h.w.show();e(h);return F; 54 | }, 55 | close:function(s){var h=H[s];if(!h.a)return F;h.a=F; 56 | if(A[0]){A.pop();if(!A[0])L('unbind');} 57 | if(h.c.toTop&&h.o)$('#jqmP'+h.w[0]._jqm).after(h.w).remove(); 58 | if(h.c.onHide)h.c.onHide(h);else{h.w.hide();if(h.o)h.o.remove();} return F; 59 | }, 60 | params:{}}; 61 | var s=0,H=$.jqm.hash,A=[],ie6=$.browser.msie&&($.browser.version == "6.0"),F=false, 62 | i=$('').css({opacity:0}), 63 | e=function(h){if(ie6)if(h.o)h.o.html('

').prepend(i);else if(!$('iframe.jqm',h.w)[0])h.w.prepend(i); f(h);}, 64 | f=function(h){try{$(':input:visible',h.w)[0].focus();}catch(_){}}, 65 | L=function(t){$()[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m);}, 66 | m=function(e){var h=H[A[A.length-1]],r=(!$(e.target).parents('.jqmID'+h.s)[0]);if(r)f(h);return !r;}, 67 | hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function() { 68 | if(!this[c]){this[c]=[];$(this).click(function(){for(var i in {jqmShow:1,jqmHide:1})for(var s in this[i])if(H[this[i][s]])H[this[i][s]].w[i](this);return F;});}this[c].push(s);});});}; 69 | })(jQuery); -------------------------------------------------------------------------------- /media/js/jquery-menu.js: -------------------------------------------------------------------------------- 1 | /* ================================================================ 2 | This copyright notice must be untouched at all times. 3 | Copyright (c) 2008 Stu Nicholls - stunicholls.com - all rights reserved. 4 | =================================================================== */ 5 | 6 | $(document).ready(function(){ 7 | if($("#topnav")) { 8 | $("#topnav dd").hide(); 9 | $("#topnav dt b").click(function() { 10 | if(this.className.indexOf("clicked") != -1) { 11 | $(this).parent().next().slideUp(200); 12 | $(this).removeClass("clicked"); 13 | } 14 | else { 15 | $("#topnav dt b").removeClass(); 16 | $(this).addClass("clicked"); 17 | $("#topnav dd:visible").slideUp(200); 18 | $(this).parent().next().slideDown(500); 19 | } 20 | return false; 21 | }); 22 | } 23 | }); 24 | -------------------------------------------------------------------------------- /media/js/jquery.cookie.js: -------------------------------------------------------------------------------- 1 | jQuery.cookie = function(name, value, options) { 2 | if (typeof value != 'undefined') { // name and value given, set cookie 3 | options = options || {}; 4 | if (value === null) { 5 | value = ''; 6 | options.expires = -1; 7 | } 8 | var expires = ''; 9 | if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { 10 | var date; 11 | if (typeof options.expires == 'number') { 12 | date = new Date(); 13 | date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); 14 | } else { 15 | date = options.expires; 16 | } 17 | expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE 18 | } 19 | // CAUTION: Needed to parenthesize options.path and options.domain 20 | // in the following expressions, otherwise they evaluate to undefined 21 | // in the packed version for some reason... 22 | var path = options.path ? '; path=' + (options.path) : ''; 23 | var domain = options.domain ? '; domain=' + (options.domain) : ''; 24 | var secure = options.secure ? '; secure' : ''; 25 | document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); 26 | } else { // only name given, get cookie 27 | var cookieValue = null; 28 | if (document.cookie && document.cookie != '') { 29 | var cookies = document.cookie.split(';'); 30 | for (var i = 0; i < cookies.length; i++) { 31 | var cookie = jQuery.trim(cookies[i]); 32 | // Does this cookie string begin with the name we want? 33 | if (cookie.substring(0, name.length + 1) == (name + '=')) { 34 | cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); 35 | break; 36 | } 37 | } 38 | } 39 | return cookieValue; 40 | } 41 | }; 42 | -------------------------------------------------------------------------------- /media/js/validate.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/js/validate.js -------------------------------------------------------------------------------- /media/our_people_avatars/images.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/our_people_avatars/images.jpeg -------------------------------------------------------------------------------- /media/player.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/player.swf -------------------------------------------------------------------------------- /media/school.wsgi: -------------------------------------------------------------------------------- 1 | import os, sys 2 | sys.path.append('/home/skyl/proj') 3 | sys.path.append('/home/skyl/proj/django-school') 4 | os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' 5 | 6 | import django.core.handlers.wsgi 7 | 8 | application = django.core.handlers.wsgi.WSGIHandler() 9 | -------------------------------------------------------------------------------- /media/video_stills/beach.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/video_stills/beach.jpg -------------------------------------------------------------------------------- /media/video_stills/beach_.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/video_stills/beach_.jpg -------------------------------------------------------------------------------- /media/videos/out-4.ogv.flv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media/videos/out-4.ogv.flv -------------------------------------------------------------------------------- /media_logs/CHANGELOG.yml: -------------------------------------------------------------------------------- 1 | changes: 2 | date: 2008-02-04 3 | change: Templates: added a {% block content_title %} 4 | 5 | date: 2008-01-27 6 | change: Videos - removed 'tagging.register(Video)' from model. It was causing too many unnecessary SQL JOINS. 7 | change: Photos - removed 'tagging.register(Photo)' from model. It was causing too many unnecessary SQL JOINS. 8 | 9 | date: 2008-01-22 10 | change: Videos - Registered the Video model with the tagging app 11 | change: Photos - Registered the Photo model with the tagging app 12 | 13 | date: 2008-01-19 14 | change: Renamed the 'list' class to 'link_list' 15 | -------------------------------------------------------------------------------- /media_logs/README.txt: -------------------------------------------------------------------------------- 1 | ============================================== 2 | Django Basic Media 3 | http://code.google.com/p/django-basic-apps/ 4 | ============================================== 5 | 6 | A simple videos application for Django projects. 7 | 8 | To install this app, simply create a folder somewhere in 9 | your PYTHONPATH named 'basic' and place the 'media' 10 | app inside. Then add 'basic.media' to your projects 11 | INSTALLED_APPS list in your settings.py file. -------------------------------------------------------------------------------- /media_logs/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media_logs/__init__.py -------------------------------------------------------------------------------- /media_logs/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from media_logs.models import * 3 | 4 | 5 | class AudioSetAdmin(admin.ModelAdmin): 6 | prepopulated_fields = {'slug': ('title',)} 7 | 8 | admin.site.register(AudioSet, AudioSetAdmin) 9 | 10 | class AudioAdmin(admin.ModelAdmin): 11 | prepopulated_fields = {'slug': ('title',)} 12 | 13 | admin.site.register(Audio, AudioAdmin) 14 | 15 | 16 | class PhotoSetAdmin(admin.ModelAdmin): 17 | prepopulated_fields = {'slug': ('title',)} 18 | 19 | admin.site.register(PhotoSet, PhotoSetAdmin) 20 | 21 | class PhotoAdmin(admin.ModelAdmin): 22 | prepopulated_fields = {'slug': ('title',)} 23 | 24 | admin.site.register(Photo, PhotoAdmin) 25 | 26 | 27 | class VideoSetAdmin(admin.ModelAdmin): 28 | prepopulated_fields = {'slug': ('title',)} 29 | 30 | admin.site.register(VideoSet, VideoSetAdmin) 31 | 32 | class VideoAdmin(admin.ModelAdmin): 33 | prepopulated_fields = {'slug': ('title',)} 34 | 35 | admin.site.register(Video, VideoAdmin) 36 | 37 | class GroupAdmin(admin.ModelAdmin): 38 | prepopulated_fields = {'slug': ('title',)} 39 | 40 | admin.site.register(Group, GroupAdmin) 41 | -------------------------------------------------------------------------------- /media_logs/templates/base.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | {% block title %}{% endblock %} 8 | 9 | 10 |

11 | {% block body %} 12 |
13 | {% block content_title %}{% endblock %} 14 |
15 |
16 | {% block content %}{% endblock %} 17 |
18 | {% endblock %} 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /media_logs/templates/media_logs/audio_detail.html: -------------------------------------------------------------------------------- 1 | {% extends "media/base_videos.html" %} 2 | 3 | 4 | {% block title %}{{ object.title }}{% endblock %} 5 | 6 | 7 | {% block content_title %} 8 |

{{ object.title }}

9 | {% endblock %} 10 | 11 | {% block content %} 12 |
{{object.description}}
13 |

video goes here

14 | 15 | 22 | 23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /media_logs/templates/media_logs/audio_list.html: -------------------------------------------------------------------------------- 1 | {% extends "media/base_audio.html" %} 2 | 3 | 4 | {% block title %}Audios{% endblock %} 5 | 6 | 7 | {% block content_title %} 8 |

Audios

9 | {% endblock %} 10 | 11 | 12 | {% block content %} 13 | 18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /media_logs/templates/media_logs/audioset_detail.html: -------------------------------------------------------------------------------- 1 | {% extends "media/base_audio.html" %} 2 | 3 | 4 | {% block title %}{{ object.title }}{% endblock %} 5 | 6 | 7 | {% block content_title %} 8 |

{{ object.title }}

9 | {% endblock %} 10 | 11 | 12 | {% block content %} 13 |

Audios

14 |
    15 | {% for audio in object.audios.all %} 16 |
  • {{ audio.title }}
  • 17 | {% endfor %} 18 |
19 | {% endblock %} 20 | -------------------------------------------------------------------------------- /media_logs/templates/media_logs/audioset_list.html: -------------------------------------------------------------------------------- 1 | {% extends "media/base_audio.html" %} 2 | 3 | 4 | {% block title %}Audio Sets{% endblock %} 5 | 6 | 7 | {% block content_title %} 8 |

Audio Sets

9 | {% endblock %} 10 | 11 | 12 | {% block content %} 13 |
    14 | {% for set in object_list %} 15 |
  • {{ set.title }} ({{ set.audios.count }} audio{{ set.audios.count|pluralize }})
  • 16 | {% endfor %} 17 |
18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /media_logs/templates/media_logs/base_audio.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | 4 | {% block body_class %}audio{% endblock %} -------------------------------------------------------------------------------- /media_logs/templates/media_logs/base_photos.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | 4 | {% block body_class %}photos{% endblock %} -------------------------------------------------------------------------------- /media_logs/templates/media_logs/base_videos.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | 4 | {% block body_class %}videos{% endblock %} 5 | -------------------------------------------------------------------------------- /media_logs/templates/media_logs/photo_detail.html: -------------------------------------------------------------------------------- 1 | {% extends "media_logs/base_photos.html" %} 2 | 3 | 4 | {% block title %}{{ object.title }}{% endblock %} 5 | 6 | 7 | {% block content_title %} 8 |

{{ object.title }}

9 | {% endblock %} 10 | 11 | 12 | {% block content %} 13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /media_logs/templates/media_logs/photo_list.html: -------------------------------------------------------------------------------- 1 | {% extends "media_logs/base_photos.html" %} 2 | 3 | 4 | {% block title %}Photos{% endblock %} 5 | 6 | 7 | {% block content_title %} 8 |

Photos

9 | {% endblock %} 10 | 11 | 12 | {% block content %} 13 | 18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /media_logs/templates/media_logs/photoset_detail.html: -------------------------------------------------------------------------------- 1 | {% extends "media_logs/base_photos.html" %} 2 | 3 | 4 | {% block title %}{{ object.title }}{% endblock %} 5 | 6 | 7 | {% block content_title %} 8 |

{{ object.title }}

9 | {% endblock %} 10 | 11 | 12 | {% block content %} 13 |

Photos

14 |
    15 | {% for photo in object.photos.all %} 16 |
  • {{ photo.title }}
  • 17 | {% endfor %} 18 |
19 | {% endblock %} 20 | -------------------------------------------------------------------------------- /media_logs/templates/media_logs/photoset_list.html: -------------------------------------------------------------------------------- 1 | {% extends "media_logs/base_photos.html" %} 2 | 3 | 4 | {% block title %}Photo Sets{% endblock %} 5 | 6 | 7 | {% block content_title %} 8 |

Photo Sets

9 | {% endblock %} 10 | 11 | 12 | {% block content %} 13 |
    14 | {% for set in object_list %} 15 |
  • {{ set.title }} ({{ set.videos.count }} photo{{ set.videos.count|pluralize }})
  • 16 | {% endfor %} 17 |
18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /media_logs/templates/media_logs/video_detail.html: -------------------------------------------------------------------------------- 1 | {% extends "media_logs/base_videos.html" %} 2 | 3 | 4 | {% block title %}{{ object.title }}{% endblock %} 5 | 6 | 7 | {% block content_title %} 8 |

{{ object.title }}

9 | {% endblock %} 10 | 11 | {% block content %} 12 | hello? 13 |
{{object.description}}
14 |

video goes here

15 | 16 | 23 | 24 | {{sql_queries}} 25 | {% endblock %} 26 | -------------------------------------------------------------------------------- /media_logs/templates/media_logs/video_list.html: -------------------------------------------------------------------------------- 1 | {% extends "media_logs/base_videos.html" %} 2 | 3 | 4 | {% block title %}Videos{% endblock %} 5 | 6 | 7 | {% block content_title %} 8 |

Videos

9 | {% endblock %} 10 | 11 | 12 | {% block content %} 13 | 18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /media_logs/templates/media_logs/videoset_detail.html: -------------------------------------------------------------------------------- 1 | {% extends "media_logs/base_videos.html" %} 2 | 3 | 4 | {% block title %}{{ object.title }}{% endblock %} 5 | 6 | 7 | {% block content_title %} 8 |

{{ object.title }}

9 | {% endblock %} 10 | 11 | 12 | {% block content %} 13 |

Videos

14 |
    15 | {% for video in object.videos.all %} 16 |
  • {{ video.title }}
  • 17 | {% endfor %} 18 |
19 | {% endblock %} 20 | -------------------------------------------------------------------------------- /media_logs/templates/media_logs/videoset_list.html: -------------------------------------------------------------------------------- 1 | {% extends "media_logs/base_videos.html" %} 2 | 3 | 4 | {% block title %}Video Sets{% endblock %} 5 | 6 | 7 | {% block content_title %} 8 |

Video Sets

9 | {% endblock %} 10 | 11 | 12 | {% block content %} 13 |
    14 | {% for set in object_list %} 15 |
  • {{ set.title }} ({{ set.photos.count }} photo{{ set.photos.count|pluralize }})
  • 16 | {% endfor %} 17 |
18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /media_logs/tests.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file demonstrates two different styles of tests (one doctest and one 3 | unittest). These will both pass when you run "manage.py test". 4 | 5 | Replace these with more appropriate tests for your application. 6 | """ 7 | 8 | from django.test import TestCase 9 | 10 | class SimpleTest(TestCase): 11 | def test_basic_addition(self): 12 | """ 13 | Tests that 1 + 1 always equals 2. 14 | """ 15 | self.failUnlessEqual(1 + 1, 2) 16 | 17 | __test__ = {"doctest": """ 18 | Another way to test that 1 + 1 is equal to 2. 19 | 20 | >>> 1 + 1 == 2 21 | True 22 | """} 23 | 24 | -------------------------------------------------------------------------------- /media_logs/urls/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/media_logs/urls/__init__.py -------------------------------------------------------------------------------- /media_logs/urls/audios.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls.defaults import * 2 | from media_logs.models import * 3 | 4 | 5 | audio_list = { 6 | 'queryset': Audio.objects.all(), 7 | } 8 | audio_set_list = { 9 | 'queryset': AudioSet.objects.all(), 10 | } 11 | 12 | 13 | urlpatterns = patterns('', 14 | url( 15 | regex = '^sets/(?P[-\w]+)/$', 16 | view = 'django.views.generic.list_detail.object_detail', 17 | kwargs = audio_set_list, 18 | name = 'audio_set_detail', 19 | ), 20 | url ( 21 | regex = '^sets/$', 22 | view = 'django.views.generic.list_detail.object_list', 23 | kwargs = audio_set_list, 24 | name = 'audio_set_list', 25 | ), 26 | url( 27 | regex = '^(?P[-\w]+)/(?P[-\w]+)/$', 28 | #regex = '^(?P[-\w]+)/$', 29 | view = 'views.generic.list_detail.object_detail', 30 | kwargs = audio_list, 31 | name = 'audio_detail', 32 | ), 33 | url ( 34 | regex = '^$', 35 | view = 'django.views.generic.list_detail.object_list', 36 | kwargs = audio_list, 37 | name = 'audio_list', 38 | ), 39 | ) 40 | -------------------------------------------------------------------------------- /media_logs/urls/photos.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls.defaults import * 2 | from media_logs.models import * 3 | 4 | 5 | photo_list = { 6 | 'queryset': Photo.objects.all(), 7 | } 8 | photo_set_list = { 9 | 'queryset': PhotoSet.objects.all(), 10 | } 11 | 12 | 13 | urlpatterns = patterns('', 14 | url( 15 | regex = '^sets/(?P[-\w]+)/$', 16 | view = 'django.views.generic.list_detail.object_detail', 17 | kwargs = photo_set_list, 18 | name = 'photo_set_detail', 19 | ), 20 | url ( 21 | regex = '^sets/$', 22 | view = 'django.views.generic.list_detail.object_list', 23 | kwargs = photo_set_list, 24 | name = 'photo_set_list', 25 | ), 26 | url( 27 | regex = '^(?P[-\w]+)/(?P[-\w]+)/$', 28 | view = 'views.generic.list_detail.object_detail_user', 29 | kwargs = photo_list, 30 | name = 'photo_detail', 31 | ), 32 | url ( 33 | regex = '^$', 34 | view = 'django.views.generic.list_detail.object_list', 35 | kwargs = photo_list, 36 | name = 'photo_list', 37 | ), 38 | ) 39 | -------------------------------------------------------------------------------- /media_logs/urls/videos.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls.defaults import * 2 | from media_logs.models import * 3 | 4 | 5 | video_list = { 6 | 'queryset': Video.objects.all(), 7 | } 8 | video_set_list = { 9 | 'queryset': VideoSet.objects.all(), 10 | } 11 | 12 | 13 | urlpatterns = patterns('', 14 | url( 15 | regex = '^sets/(?P[-\w]+)/$', 16 | view = 'django.views.generic.list_detail.object_detail', 17 | kwargs = video_set_list, 18 | name = 'video_set_detail', 19 | ), 20 | url ( 21 | regex = '^sets/$', 22 | view = 'django.views.generic.list_detail.object_list', 23 | kwargs = video_set_list, 24 | name = 'video_set_list', 25 | ), 26 | url( 27 | regex = '^(?P[-\w]+)/$', 28 | #regex = '^(?P[-\w]+)/$', 29 | view = 'django.views.generic.list_detail.object_detail', 30 | kwargs = video_list, 31 | name = 'video_detail', 32 | ), 33 | url ( 34 | regex = '^$', 35 | view = 'django.views.generic.list_detail.object_list', 36 | kwargs = video_list, 37 | name = 'video_list', 38 | ), 39 | ) 40 | -------------------------------------------------------------------------------- /menu/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/menu/__init__.py -------------------------------------------------------------------------------- /menu/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from menu.models import Meal, Lunch, Order, Account, DateSet 3 | 4 | class LunchInline(admin.TabularInline): 5 | model = Lunch 6 | extra = 10 7 | 8 | class MealAdmin(admin.ModelAdmin): 9 | # list_display = [] 10 | search_fields = ['name', 'description',] 11 | list_filter = ['type'] 12 | inlines = [LunchInline] 13 | 14 | class LunchAdmin(admin.ModelAdmin): 15 | list_display = ['__unicode__', 'number','date'] # future 16 | search_fields = ['meal__name',] 17 | # list_filter = ['date'] 18 | date_hierarchy = 'date' 19 | 20 | class OrderAdmin(admin.ModelAdmin): 21 | list_display = ['student', 'lunch','paid'] 22 | # search_fields = 23 | 24 | #class AccountAdmin(admin.ModelAdmin): 25 | # list_display=['__unicode__','paid', 'total',] 26 | 27 | admin.site.register(Meal, MealAdmin) 28 | admin.site.register(Lunch, LunchAdmin) 29 | admin.site.register(Order, OrderAdmin) 30 | #admin.site.register(Account, AccountAdmin) 31 | admin.site.register(DateSet) 32 | 33 | 34 | -------------------------------------------------------------------------------- /menu/forms.py: -------------------------------------------------------------------------------- 1 | from django.forms import ModelForm 2 | 3 | from menu.models import Meal, Lunch, Order 4 | 5 | class ChickOrderForm(ModelForm): 6 | class Meta: 7 | model = Order 8 | fields = ('nuggets', 'sandwiches') 9 | 10 | class PizzaOrderForm(ModelForm): 11 | class Meta: 12 | model = Order 13 | fields = ('cheese', 'pepperoni', ) 14 | 15 | class HotOrderForm(ModelForm): 16 | class Meta: 17 | model = Order 18 | exclude = ('lunch', 'student', 'nuggets','sandwiches', 'cheese', 'pepperoni', 'hot_lunch', 'paid') 19 | -------------------------------------------------------------------------------- /menu/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/menu/templatetags/__init__.py -------------------------------------------------------------------------------- /menu/templatetags/logic.py: -------------------------------------------------------------------------------- 1 | from django import template 2 | register = template.Library() 3 | 4 | @register.filter 5 | def EQ(value,arg): return value == arg 6 | 7 | @register.filter 8 | def LT(value,arg): return value < arg 9 | 10 | @register.filter 11 | def GT(value,arg): return value > arg 12 | 13 | @register.filter 14 | def LE(value,arg): return value <= arg 15 | 16 | @register.filter 17 | def GE(value,arg): return value >= arg 18 | 19 | @register.filter 20 | def NE(value,arg): return value != arg 21 | 22 | @register.filter 23 | def IS(value,arg): return value is arg 24 | 25 | @register.filter 26 | def IN(value,arg): return value in arg 27 | 28 | -------------------------------------------------------------------------------- /menu/tests.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file demonstrates two different styles of tests (one doctest and one 3 | unittest). These will both pass when you run "manage.py test". 4 | 5 | Replace these with more appropriate tests for your application. 6 | """ 7 | 8 | from django.test import TestCase 9 | 10 | class SimpleTest(TestCase): 11 | def test_basic_addition(self): 12 | """ 13 | Tests that 1 + 1 always equals 2. 14 | """ 15 | self.failUnlessEqual(1 + 1, 2) 16 | 17 | __test__ = {"doctest": """ 18 | Another way to test that 1 + 1 is equal to 2. 19 | 20 | >>> 1 + 1 == 2 21 | True 22 | """} 23 | 24 | -------------------------------------------------------------------------------- /menu/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls.defaults import * 2 | urlpatterns = patterns('',\ 3 | (r'^$', 'menu.views.see'), 4 | url(r'^(?P\d+)/(?P\d{4})/(?P\d{1,2})/(?P\d{1,2})/$',\ 5 | 'menu.views.order', name='place_order'), 6 | (r'^cancel/(?P\d+)/(?P\d{4})/(?P\d{1,2})/(?P\d{1,2})/$',\ 7 | 'menu.views.cancel'), 8 | (r'^paynow/(?P\d+)/$', 'menu.views.paynow'), 9 | ) 10 | -------------------------------------------------------------------------------- /our_people/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/our_people/__init__.py -------------------------------------------------------------------------------- /our_people/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.contrib import admin 3 | 4 | from constants import title_choices 5 | 6 | class Person(models.Model): 7 | user = models.ForeignKey('auth.User', blank=True, null=True) 8 | groups = models.ManyToManyField('auth.Group', blank=True, null=True) 9 | title = models.CharField(max_length=4, choices=title_choices, blank=True, null=True) 10 | last = models.CharField(max_length=30) 11 | first = models.CharField(max_length=20) 12 | pic = models.ImageField(upload_to='our_people_avatars') 13 | description = models.TextField() 14 | email = models.EmailField() 15 | featured = models.BooleanField() 16 | 17 | def __unicode__(self): 18 | return "%s %s" % (self.first, self.last) 19 | 20 | def name(self): 21 | return self.__unicode__() 22 | 23 | class PersonAdmin(admin.ModelAdmin): 24 | list_filter = ['groups', 'featured',] 25 | search_fields = ['last', 'first', 'description'] 26 | list_display = ['__unicode__', 'user', 'featured'] 27 | 28 | admin.site.register(Person, PersonAdmin) 29 | -------------------------------------------------------------------------------- /our_people/tests.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file demonstrates two different styles of tests (one doctest and one 3 | unittest). These will both pass when you run "manage.py test". 4 | 5 | Replace these with more appropriate tests for your application. 6 | """ 7 | 8 | from django.test import TestCase 9 | 10 | class SimpleTest(TestCase): 11 | def test_basic_addition(self): 12 | """ 13 | Tests that 1 + 1 always equals 2. 14 | """ 15 | self.failUnlessEqual(1 + 1, 2) 16 | 17 | __test__ = {"doctest": """ 18 | Another way to test that 1 + 1 is equal to 2. 19 | 20 | >>> 1 + 1 == 2 21 | True 22 | """} 23 | 24 | -------------------------------------------------------------------------------- /our_people/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls.defaults import * 2 | from our_people import views as our_people_views 3 | 4 | urlpatterns = patterns('',\ 5 | url(r'^$', view=our_people_views.person_list, name='person_index'), 6 | (r'(?P\d+)/$', 'our_people.views.detail'), 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /our_people/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render_to_response, get_object_or_404 2 | from django.template import RequestContext 3 | from django.views.generic import list_detail 4 | from our_people.models import Person 5 | 6 | import datetime 7 | import re 8 | 9 | def person_list(request, page=0, **kwargs): 10 | return list_detail.object_list(request,\ 11 | queryset = Person.objects.filter(featured=True),\ 12 | paginate_by = 20,\ 13 | page = page,\ 14 | **kwargs 15 | ) 16 | person_list.__doc__ = list_detail.object_list.__doc__ 17 | 18 | def detail(request, id): 19 | try: 20 | person = Person.objects.get(id=id) 21 | except: 22 | return HttpResponseRedirect('/') 23 | context = {'person':person, } 24 | return render_to_response('our_people/detail.html', context,\ 25 | context_instance = RequestContext(request)) 26 | -------------------------------------------------------------------------------- /payments/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/payments/__init__.py -------------------------------------------------------------------------------- /payments/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | from django.contrib import admin 4 | 5 | from constants import payment_types 6 | 7 | class Payment(models.Model): 8 | from records.models import UserProfile 9 | profile = models.ForeignKey(UserProfile) 10 | item_name = models.CharField(max_length=50, choices=payment_types) 11 | item_number = models.PositiveIntegerField() 12 | mc_gross = models.DecimalField(max_digits=4, decimal_places=2) 13 | timestamp = models.DateTimeField(auto_now_add=True) 14 | 15 | def __unicode__(self): 16 | return "%s, %s, $%.2f on %s" % (self.profile, self.item_name, 17 | self.mc_gross, self.timestamp.strftime("%B %d, %Y")) 18 | 19 | class PaymentAdmin(admin.ModelAdmin): 20 | list_filter = ['item_name',] 21 | date_hierarchy = 'timestamp' 22 | search_fields = ['profile', 'item_name', 'profile__student__first',\ 23 | 'profile__student__last', 'profile__student__preferred_name',] 24 | 25 | admin.site.register(Payment, PaymentAdmin) 26 | -------------------------------------------------------------------------------- /payments/tests.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file demonstrates two different styles of tests (one doctest and one 3 | unittest). These will both pass when you run "manage.py test". 4 | 5 | Replace these with more appropriate tests for your application. 6 | """ 7 | 8 | from django.test import TestCase 9 | 10 | class SimpleTest(TestCase): 11 | def test_basic_addition(self): 12 | """ 13 | Tests that 1 + 1 always equals 2. 14 | """ 15 | self.failUnlessEqual(1 + 1, 2) 16 | 17 | __test__ = {"doctest": """ 18 | Another way to test that 1 + 1 is equal to 2. 19 | 20 | >>> 1 + 1 == 2 21 | True 22 | """} 23 | 24 | -------------------------------------------------------------------------------- /people/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/people/__init__.py -------------------------------------------------------------------------------- /people/tests.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file demonstrates two different styles of tests (one doctest and one 3 | unittest). These will both pass when you run "manage.py test". 4 | 5 | Replace these with more appropriate tests for your application. 6 | """ 7 | 8 | from django.test import TestCase 9 | 10 | class SimpleTest(TestCase): 11 | def test_basic_addition(self): 12 | """ 13 | Tests that 1 + 1 always equals 2. 14 | """ 15 | self.failUnlessEqual(1 + 1, 2) 16 | 17 | __test__ = {"doctest": """ 18 | Another way to test that 1 + 1 is equal to 2. 19 | 20 | >>> 1 + 1 == 2 21 | True 22 | """} 23 | 24 | -------------------------------------------------------------------------------- /records/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/records/__init__.py -------------------------------------------------------------------------------- /records/forms.py: -------------------------------------------------------------------------------- 1 | 2 | from records.models import UserProfile, Student, Application, MiddleSchoolStudentQuestionnaire, CurrentSchool, ParentPart 3 | 4 | from people.models import Guardian, FamilyMember, AuthorizedPickUpPerson, Volunteer, EmergencyContacts 5 | 6 | from django.forms import ModelForm 7 | from django.forms import DateField 8 | from django.forms.extras.widgets import SelectDateWidget 9 | 10 | 11 | class VolunteerForm(ModelForm): 12 | class Meta: 13 | model = Volunteer 14 | exclude = ('user','date', 'classroom', 15 | 'campus', 16 | 'academic', 17 | 'music', 18 | 'library', 19 | 'art', 20 | 'yearbook', 21 | 'office', 22 | 'fundraising', 23 | 'maintenance', 24 | 'resources', 25 | ) 26 | 27 | class ProfileForm(ModelForm): 28 | class Meta: 29 | model = UserProfile 30 | exclude = ('user', 'has_completed_profile', 'has_added_guardians', 'has_added_church', 31 | 'has_added_family', 'has_signed_form', 'has_signed_contract', ) 32 | 33 | # These are the forms that are part of the application process 34 | 35 | 36 | class StudentApplyForm(ModelForm): 37 | date_of_birth = DateField(widget=SelectDateWidget(years=[1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009])) 38 | class Meta: 39 | model = Student 40 | # exclude = ('application_completed', 'registration_signed_paid', 'currently_student', 'enrolled_for_upcoming_year', 'alumni', 'user', 'allergies', 'allergy_description','date', 'changes_affect') 41 | fields = ('last','first','middle','preferred_name','present_grade','next_grade','date_of_birth','gender','living_with') 42 | 43 | class StudentAddForm(StudentApplyForm): 44 | class Meta: 45 | model = Student 46 | fields = ('last','first','middle','preferred_name','present_grade','next_grade','date_of_birth','gender','living_with', 'allergies', 'allergy_description',) 47 | 48 | 49 | import datetime 50 | class ApplicationForm(ModelForm): 51 | dated = DateField(initial=datetime.date.today()) 52 | class Meta: 53 | model = Application 54 | exclude = ('student') 55 | 56 | class MSSQForm(ModelForm): 57 | dated = DateField(initial=datetime.date.today()) 58 | class Meta: 59 | model = MiddleSchoolStudentQuestionnaire 60 | exclude = ('application') 61 | 62 | class CurrentSchoolForm(ModelForm): 63 | class Meta: 64 | model = CurrentSchool 65 | exclude = ('application') 66 | 67 | class ParentForm(ModelForm): 68 | dated = DateField(initial=datetime.date.today()) 69 | class Meta: 70 | model = ParentPart 71 | exclude = ('application') 72 | 73 | class EmergencyContactsForm(ModelForm): 74 | class Meta: 75 | model = EmergencyContacts 76 | exclude = ('user') 77 | 78 | -------------------------------------------------------------------------------- /records/tests.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file demonstrates two different styles of tests (one doctest and one 3 | unittest). These will both pass when you run "manage.py test". 4 | 5 | Replace these with more appropriate tests for your application. 6 | """ 7 | 8 | from django.test import TestCase 9 | 10 | class SimpleTest(TestCase): 11 | def test_basic_addition(self): 12 | """ 13 | Tests that 1 + 1 always equals 2. 14 | """ 15 | self.failUnlessEqual(1 + 1, 2) 16 | 17 | __test__ = {"doctest": """ 18 | Another way to test that 1 + 1 is equal to 2. 19 | 20 | >>> 1 + 1 == 2 21 | True 22 | """} 23 | 24 | -------------------------------------------------------------------------------- /records/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls.defaults import * 2 | 3 | urlpatterns = patterns('',\ 4 | ################################ Main dash forms 5 | (r'^$', 'records.views.home'), 6 | (r'^volunteer/$', 'records.views.volunteer'), 7 | (r'^volunteer/change/(?P\d+)/$', 'records.views.changeVol'), 8 | (r'^profile/$', 'records.views.profile'), 9 | (r'^family/$', 'records.views.family'), 10 | (r'^pickup/$', 'records.views.pickup'), 11 | (r'^students/add/$', 'records.views.addStudent'), 12 | (r'^students/$', 'records.views.addStudent'), 13 | (r'^students/change/(?P\d+)/$', 'records.views.changeStudent'), 14 | (r'^guardians/$', 'records.views.guardians'), 15 | (r'^contacts/$', 'records.views.ecf'), 16 | 17 | ################################# Application Process 18 | (r'^apply/guardians/$', 'records.views.guardians'), 19 | (r'^apply/profile/$', 'records.views.profile'), 20 | (r'^apply/family/$', 'records.views.family'), 21 | (r'^apply/volunteer/$', 'records.views.volunteer'), 22 | (r'^apply/$', 'records.views.apply'), 23 | (r'^apply/questions/parent/(?P\d+)/$', 'records.views.parent'), 24 | (r'^apply/questions/(?P\d+)/$', 'records.views.questions'), 25 | (r'^apply/questions/mssq/(?P\d+)/$', 'records.views.mssq'), 26 | (r'^apply/current/(?P\d+)/$', 'records.views.current'), 27 | (r'^apply/complete/$', 'records.views.appcontinue'), 28 | (r'^apply/complete/(?P\d+)/$', 'records.views.appcomplete'), 29 | 30 | ################################# Registraton and re-enrollment process 31 | (r'^register/$', 'records.views.register'), 32 | (r'^register/(?P\d+)/$', 'records.views.registerStudent'), 33 | (r'^enroll/$', 'records.views.enroll'), 34 | (r'^enroll/(?P\d+)/$', 'records.views.enrollStudent'), 35 | ) 36 | -------------------------------------------------------------------------------- /settings.py: -------------------------------------------------------------------------------- 1 | import os 2 | PROJECT_DIR = os.path.dirname(__file__) 3 | 4 | DEBUG = False 5 | TEMPLATE_DEBUG = DEBUG 6 | LIVE = True 7 | 8 | 9 | ADMINS = ( 10 | ('Skylar Saveland', 'skylar.saveland@gmail.com'), 11 | ) 12 | 13 | MANAGERS = ADMINS 14 | 15 | if not LIVE: 16 | DATABASE_ENGINE = 'sqlite3' 17 | DATABASE_NAME = os.path.join(PROJECT_DIR, 'dev.db') 18 | else: 19 | from local_settings import DATABASE_ENGINE, DATABASE_NAME, DATABASE_USER,\ 20 | DATABASE_PASSWORD, DATABASE_HOST, DATABASE_PORT 21 | 22 | TIME_ZONE = 'America/New_York' 23 | LANGUAGE_CODE = 'en-us' 24 | SITE_ID = 1 25 | USE_I18N = True 26 | 27 | MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media') 28 | 29 | if not LIVE: 30 | MEDIA_URL = '/media/' 31 | ADMIN_MEDIA_PREFIX = '/admin_media/' 32 | else: 33 | from local_settings import MEDIA_URL, ADMIN_MEDIA_PREFIX 34 | 35 | from local_settings import SECRET_KEY 36 | 37 | TEMPLATE_LOADERS = ( 38 | 'django.template.loaders.filesystem.load_template_source', 39 | 'django.template.loaders.app_directories.load_template_source', 40 | ) 41 | 42 | MIDDLEWARE_CLASSES = ( 43 | 'django.middleware.common.CommonMiddleware', 44 | 'django.contrib.sessions.middleware.SessionMiddleware', 45 | 'django.contrib.auth.middleware.AuthenticationMiddleware', ) 46 | 47 | ROOT_URLCONF = 'urls' 48 | 49 | TEMPLATE_DIRS = ( 50 | os.path.join(PROJECT_DIR, 'templates'), 51 | ) 52 | 53 | INSTALLED_APPS = ( 54 | 'django.contrib.auth', 55 | 'django.contrib.contenttypes', 56 | 'django.contrib.sessions', 57 | 'django.contrib.sites', 58 | 'django.contrib.admin', 59 | 'django.contrib.markup', 60 | 'comments', 61 | 'registration', # easy_install django-registration 62 | 'template_utils', # easy_install django-template-utils 63 | # 'djangogcal', # put on svn version on python path 64 | 'tagging', 65 | 'blog', 66 | 'media_logs', 67 | 'people', 68 | 'records', 69 | 'menu', 70 | 'years', 71 | 'payments', 72 | 'our_people', 73 | ) 74 | 75 | AUTHENTICATION_BACKENDS = ( 76 | 'email-auth.EmailBackend', 77 | 'django.contrib.auth.backends.ModelBackend', 78 | ) 79 | 80 | from local_settings import EMAIL_HOST, EMAIL_HOST_USER, EMAIL_HOST_PASSWORD,\ 81 | EMAIL_PORT, DEFAULT_FROM_EMAIL, SERVER_EMAIL 82 | 83 | AUTH_PROFILE_MODULE = 'records.userprofile' 84 | ACCOUNT_ACTIVATION_DAYS = 7 85 | 86 | -------------------------------------------------------------------------------- /templates/admin/base_site.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base.html" %} 2 | {% block extrahead %} 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | {% endblock %} 12 | 13 | {% load i18n %} 14 | 15 | {% block title %}{{ title }} | {% trans 'Django School' %}{% endblock %} 16 | 17 | {% block branding %} 18 |

{% trans 'Django School' %}

19 | {% endblock %} 20 | 21 | {% block nav-global %}{% endblock %} 22 | -------------------------------------------------------------------------------- /templates/admin/people/guardian/change_list.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/change_list.html" %} 2 | 3 | {% load i18n %} 4 | 5 | {% block object-tools %} 6 | {% if has_add_permission %} 7 | 13 | 18 | {% endif %} 19 | {% endblock %} 20 | 21 | 22 | -------------------------------------------------------------------------------- /templates/admin/records/application/change_form.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/change_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block object-tools %} 5 | {% if change %}{% if not is_popup %} 6 | 9 | {% endif %}{% endif %} 10 | {% endblock %} 11 | 12 | -------------------------------------------------------------------------------- /templates/admin/records/application_print_detail.html: -------------------------------------------------------------------------------- 1 | {{object}} 2 | 3 | {{pp}} 4 | -------------------------------------------------------------------------------- /templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% block head %} 4 | 5 | {% block title %}Welcome to Django School{% endblock %} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | {% endblock %} 20 | {% block extrahead %}{% endblock %} 21 | 22 | 23 |
24 | {% if user.is_authenticated %} 25 | 26 | {% else %} 27 | 28 | {% endif %} 29 |
30 | 31 |
32 |
33 |
34 | {% if not home %} 35 |
Home »
36 | {% endif %} 37 |
News and Information »
38 |
39 | 45 |
46 | {% if not profile.students %} 47 |
Apply »
48 | {% endif %} 49 | {% if profile.ongoing_app_form %} 50 |
Complete ongoing application »
51 | {% endif %} 52 | {% if user.is_authenticated %} 53 |
Your Records »
54 |
55 | 64 |
65 | {% if menu %} 66 |
Lunch Menu »
67 | {% endif %} 68 | {% else %} 69 |
Login or Create »
70 |
71 | 75 |
76 | 77 | {% endif %} 78 |
79 |
80 | 81 |
82 |
83 | {% if user.is_authenticated %} 84 | You are currently logged in as: {{user}} 85 | {% else %} 86 | You are not currently logged in 87 | {% endif %} 88 | 89 |
90 |
91 | {% block content %}{% endblock %} 92 | 93 |
94 |
95 |
96 |
97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /templates/calendar.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block content %} 3 | 4 | {% endblock %} 5 | -------------------------------------------------------------------------------- /templates/home.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block content %} 4 | 5 | {% if thanks %} 6 |

Payment Completed

7 |

Your payment has been received. Thank you.

8 | {% else %} 9 |

Welcome to Django School

10 | 11 | {% endif %} 12 | {% endblock %} 13 | 14 | 15 | -------------------------------------------------------------------------------- /templates/menu/.see.html.swo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/templates/menu/.see.html.swo -------------------------------------------------------------------------------- /templates/menu/order.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block extrahead %} 4 | {% comment %} 5 | 23 | {% endcomment %} 24 | {% endblock %} 25 | 26 | {% block content %} 27 |
28 |
29 |

{{lunch.date|date}}

30 |
{{lunch.description}}
31 |
32 | {% if cancel %} 33 |
34 | Cancel Order » 35 | 36 |
37 | {% endif %} 38 |
39 | {{form.as_p}} 40 |
41 |
42 | 43 |
44 |
45 | {% endblock %} 46 | -------------------------------------------------------------------------------- /templates/menu/paynow.html: -------------------------------------------------------------------------------- 1 |
2 |

Subtotal: {{account.total}}

3 |

Credits: -{{ account.vouchers_total }}

4 |

Total: {{account.total_minus_vouchers}}

5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 18 |
19 |
20 | 21 | -------------------------------------------------------------------------------- /templates/our_people/detail.html: -------------------------------------------------------------------------------- 1 |
{{person.name}}
2 | 3 |

{{ person.description }}

4 | 5 | -------------------------------------------------------------------------------- /templates/our_people/person_list.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block extrahead %} 4 | {% endblock %} 5 | 6 | {% block content %} 7 |

Meet Our People

8 |

To find out more about our people click on the picture

9 |
10 |
11 | {% for person in object_list %} 12 |
13 |
{{person.name}}
14 | 15 |

{{ person.description|truncatewords:20 }}

16 |
17 | {% endfor %} 18 |
19 | {% endblock %} 20 | -------------------------------------------------------------------------------- /templates/records/addStudent.html: -------------------------------------------------------------------------------- 1 | {% extends "records/base.html" %} 2 | 3 | {% block content %} 4 |

Students

5 |

Please use the following form to update student information.

6 | 7 |
8 |
9 | 10 | 11 | {{form.as_p}} 12 | 13 | 14 |
15 |
16 | 17 | {% endblock %} 18 | -------------------------------------------------------------------------------- /templates/records/apply.html: -------------------------------------------------------------------------------- 1 | {% extends "records/base.html" %} 2 | 3 | {% block content %} 4 | 5 |

Information about the Student

6 |

This is the introduction section or explanatory paragraph.

7 | 8 |
9 | 10 | {% for field in form %} 11 | 12 |
13 | 14 | {% if field.field.required %} 15 | {{ field.label }} 16 | {% else %} 17 | {{field.label }} 18 | {% endif %} 19 | {{ field }} 20 | 21 | {% if field.help_text %}
{{field.help_text}}
{% endif %} 22 | {% if field.errors %}
{{ field.errors }}
{% endif %} 23 |
24 | 25 | {% endfor %} 26 | 27 |
28 | 29 |
30 | 31 | {% endblock %} 32 | 33 | -------------------------------------------------------------------------------- /templates/records/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% block head %} 4 | 5 | {% block title %}Welcome to Django School{% endblock %} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | {% endblock %} 20 | {% block extrahead %}{% endblock %} 21 | 22 | {% block onload %} {% endblock %} 23 |
24 | 25 |
26 | 27 |
28 |
29 |
30 |
Home »
31 | 40 | {% if not dash %} 41 |
Family Dashboard »
42 | {% else %} 43 |
Enrolled Students »
44 |
45 |
    46 | {% if students %} 47 | {% for s in students %} 48 |
  • {{s}}
  • 49 | {% endfor %} 50 | {% endif %} 51 |
  • Add a student »
  • 52 |
53 |
54 |
Parents/Guardians »
55 |
Emergency Contacts »
56 |
Student Pickup »
57 |
Grandparents/Friends »
58 |
Volunteers »
59 |
60 |
    61 | {% if volunteers %} 62 | {% for v in volunteers %} 63 |
  • {{v}}
  • 64 | {% endfor %} 65 | {% endif %} 66 |
  • Add a volunteer »
  • 67 |
68 |
69 | {% endif %} 70 |
71 |
72 | 73 |
74 |
75 | {% if user.is_authenticated %} 76 | You are currently logged in as: {{user}} 77 | {% else %} 78 | You are not currently logged in 79 | {% endif %} 80 | 81 |
82 |
83 | {% block content %}{% endblock %} 84 | 85 |
86 |
87 |
88 |
89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /templates/records/changeStudent.html: -------------------------------------------------------------------------------- 1 | {% extends "records/base.html" %} 2 | 3 | {% block content %} 4 |

Students

5 |

Please use the following form to update student information.

6 | 7 |
8 |
9 | 10 | 11 | {{form.as_p}} 12 | 13 | 14 |
15 |
16 | 17 | {% endblock %} 18 | -------------------------------------------------------------------------------- /templates/records/changeVol.html: -------------------------------------------------------------------------------- 1 | {% extends "records/base.html" %} 2 | 3 | {% block content %} 4 |

Volunteer Form

5 |

Volunteer help is essential to controlling costs and providing many of the fine programs at our school. Parents have a 6 | special interest in seeing that their children are well served. Grandparents and other relatives are also encouraged to 7 | participate. Below is a list of areas where volunteer help is needed for effective school operation. Where can you help?

8 |
9 | {% for field in form %} 10 | {% ifequal field.name 'grade_papers' %}

Classroom

{% endifequal %} 11 | {% ifequal field.name 'supervise_playground' %}

Campus

{% endifequal %} 12 | {% ifequal field.name 'substitute' %}

Academic

{% endifequal %} 13 | {% ifequal field.name 'piano' %}

Music

{% endifequal %} 14 | {% ifequal field.name 'check_out' %}

Library and Media left

{% endifequal %} 15 | {% ifequal field.name 'bulletin_boards' %}

Arts

{% endifequal %} 16 | {% ifequal field.name 'photography' %}

Yearbook

{% endifequal %} 17 | {% ifequal field.name 'substitute_secretary' %}

Office

{% endifequal %} 18 | {% ifequal field.name 'jogathon' %}

Fundraising

{% endifequal %} 19 | {% ifequal field.name 'landscape' %}

Maintenance

{% endifequal %} 20 | {% ifequal field.name 'business_equipment' %}

Resources

{% endifequal %} 21 | 22 | 23 | {% ifequal field.field.widget.input_type "text" %} 24 |
25 | {% else %} 26 |
27 | {% endifequal %} 28 | 29 | {{ field.label_tag }} 30 | {% if field.help_text %}{{ field.help_text }}{% endif %} 31 | {{ field }} 32 | {% if field.errors %}
{{ field.errors }}
{% endif %} 33 |
34 | 35 | {% endfor %} 36 |
37 |
38 | 39 | {% endblock %} 40 | 41 | -------------------------------------------------------------------------------- /templates/records/complete.html: -------------------------------------------------------------------------------- 1 | {% extends "records/base.html" %} 2 | 3 | 4 | {% block content %} 5 | 6 |

Congratulations! You have successfully completed the application process for {{student.name}}

7 | Continue » 8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /templates/records/continue.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block content %} 4 | {% if complete or uncomplete %} 5 |

Students have already completed the application process:

6 | {% for s in complete %} 7 | {{s.name}} 8 | {% endfor %} 9 | 10 |

Click on the student for whom you would like to finish the application process

11 | {% for s in uncomplete %} 12 | {{s.name}} 13 | {% endfor %} 14 | {% else %} 15 |

16 | You have no students on records you can Apply now ». 17 | If you feel that you have reached this message in error. Contact {{SUPPORT_EMAIL}}. 18 |

19 | {% endif %} 20 | 21 | {% endblock %} 22 | -------------------------------------------------------------------------------- /templates/records/current.html: -------------------------------------------------------------------------------- 1 | {% extends "records/base.html" %} 2 | 3 | {% block content %} 4 | 5 |

Current School Information

6 |

This is the introduction section or explanatory paragraph.

7 | 8 |
9 | 10 |
11 |

Please tell us about your current school.

12 | {% for field in form %} 13 | 14 |
15 | {{field.label_tag }} 16 | {% if field.help_text %}
{{field.help_text}}
{% endif %} 17 | {{ field }} 18 | {% if field.errors %}{{ field.errors }}{% endif %} 19 | 20 |
21 | 22 | {% endfor %} 23 |
24 |
25 | 26 | 27 |
28 | 29 | {% endblock %} 30 | 31 | -------------------------------------------------------------------------------- /templates/records/emergency.html: -------------------------------------------------------------------------------- 1 | {% extends "records/base.html" %} 2 | 3 | {% block content %} 4 |

Emergency Contact Information

5 |

In the event you cannot be reached, please list the names and phone numbers of 2 adults who will care for your child.

6 |

We also ask that you provide your doctor's name and phone number.

7 | 8 |
9 | 10 | {% for field in form %} 11 | 12 |
13 | {% if field.field.required %} 14 | {{ field.label_tag }} 15 | {% else %} 16 | {{field.label_tag }} 17 | {% endif %} 18 | {{ field }} 19 | 20 | {% if field.help_text %}
{{field.help_text}}
{% endif %} 21 | {% if field.errors %}{{ field.errors }}{% endif %} 22 |
23 | 24 | {% endfor %} 25 | 26 |
27 | 28 |
29 | 30 | {% endblock %} 31 | -------------------------------------------------------------------------------- /templates/records/enroll.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | 4 | {% block content %} 5 | {% if students %} 6 |

Please review your information below and make sure that it is up to date. 7 | If you need to update something you can go to Parent Dashboard »

8 | {% for s in students %} 9 | {% if s.enrolled_for_upcoming_year %} 10 |

{{s.preferred_name}} is enrolled for next year!

11 | {% else %} 12 |

Enroll {{s.preferred_name}} »

13 | {% endif %} 14 | {% endfor %} 15 | {%else%} 16 |

You have no students eligible Apply now » 17 | or Check on the status of a pending application » 18 |

19 | {% endif %} 20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /templates/records/family.html: -------------------------------------------------------------------------------- 1 | {% extends "records/base.html" %} 2 | 3 | {% block content %} 4 |

CCS Connections

5 |

This section provides a place for you to add family and/or friends who may be interested in receiving emails or mailings regarding CCS events. 6 | Grandparents are, of course, excellent resources to list in these fields. It is our hope that your entire extended family become involved in the 7 | education and nurture of your child.

8 | 9 |
10 | 11 | {{ formset.management_form }} 12 | 13 | {% for form in formset.forms %} 14 |
15 | {{form.as_p}} 16 |
17 | 18 | {% endfor %} 19 | 20 |
21 |
22 | 23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /templates/records/guardians.html: -------------------------------------------------------------------------------- 1 | {% extends "records/base.html" %} 2 | 3 | {% block content %} 4 |

Parents/Guardians

5 |

The parent(s) or legal guardians for this household.

6 | 7 |
8 | {{ formset.management_form }} 9 | 10 | {% for form in formset.forms %} 11 |
12 | {% for field in form %} 13 |
14 | {% ifnotequal field.name 'id' %} 15 | {% ifnotequal field.name 'user' %} 16 | {% if field.field.required %} 17 | {{ field.label_tag }} 18 | {% else %} 19 | {{field.label_tag}} 20 | {% endif %} 21 | {{field.help_text}} 22 | {% endifnotequal %}{% endifnotequal %} 23 | 24 | {{ field }} 25 | {% if field.errors %} 26 | {{ field.errors }} 27 | {% endif %} 28 |
29 | {% endfor %} 30 |
31 | {% endfor %} 32 |
33 |
34 | 35 | {% endblock %} 36 | -------------------------------------------------------------------------------- /templates/records/mssq.html: -------------------------------------------------------------------------------- 1 | {% extends "records/base.html" %} 2 | 3 | {% block content %} 4 | 5 |

Middle School Student Questionnaire

6 |

This part of the application is to be completed by the student.

7 | 8 |
9 | 10 |

Tell us about yourself!

11 | {% for field in form %} 12 | 13 |
14 | {% ifequal field.name "music"%}

On a scale of 1 to 5, tell us how interested you are in the following activities (5 is highest)

{% endifequal %} 15 | {{field.label_tag }} 16 | {% if field.help_text %}
{{field.help_text}}
{% endif %} 17 | {{ field }} 18 | {% if field.errors %}
{{ field.errors }}
{% endif %} 19 | 20 |
21 | 22 | {% endfor %} 23 |
24 | 25 |
26 | 27 | {% endblock %} 28 | 29 | -------------------------------------------------------------------------------- /templates/records/mystudents.html: -------------------------------------------------------------------------------- 1 | {% extends "records/base.html" %} 2 | 3 | {% block content %} 4 | {% if students %} 5 | {% for student in students %} 6 |

We have {{student.name}} in {{student.get_present_grade_display}} grade.

7 | 8 | {% if student.application_completed %} Application Completed! 9 | {% else %} 10 |

This student has not been flagged as having completed the application process

11 | Here is where you go to do that or call. 12 | {% endif %} 13 | 14 | {% if student.registration_signed_paid %} Registered! 15 | {% else %} 16 |

You need to register, this is where you do that:

17 | link_to_register_form (Goes to templates/register_student.html 18 | {% endif %} 19 | 20 | {% if student.currently_student %} 21 | {{student.preferred_name}} has {% for teacher in student.teacher %} 22 | {{teacher.title}} {{teacher.name}} 23 | {% endfor %} 24 | {% endif %} 25 | {% if not enrolled_for_upcoming_year and not alumni %} 26 | You still need to enroll for the upcoming year here 27 | {% endif %} 28 | {% endfor %} 29 |

Click here to add more students

30 | 31 | 32 | {% else %} 33 |

You have not added any students yet

34 | Click here to get started, the application, registration, and enrollment process takes less than 1 hour! 35 | {% endif %} 36 | 37 | 38 | 39 | {% endblock %} 40 | -------------------------------------------------------------------------------- /templates/records/parent.html: -------------------------------------------------------------------------------- 1 | {% extends "records/base.html" %} 2 | 3 | {% block content %} 4 | 5 |

Parent Questionnaire

6 |

This is the introduction section or explanatory paragraph.

7 | 8 |
9 | 10 | {% load comparison %} 11 |

Tell us about yourself.

12 | {% for field in form %} 13 | 14 |
15 | {{field.label_tag }} 16 | {% if field.help_text %}
{{field.help_text}}
{% endif %} 17 | {{ field }} 18 | {% if field.errors %}
{{ field.errors }}
{% endif %} 19 | 20 |
21 | 22 | {% endfor %} 23 |
24 | 25 |
26 | 27 | {% endblock %} 28 | 29 | -------------------------------------------------------------------------------- /templates/records/pickup.html: -------------------------------------------------------------------------------- 1 | {% extends "records/base.html" %} 2 | 3 | {% block content %} 4 |

People who can pickup students

5 |

Please enter up to four family members or friends who are authorized to pickup your children.

6 | 7 |
8 | 9 | 12 | {{ formset.management_form }} 13 | 14 | {% for form in formset.forms %} 15 |
16 | {{form.as_p}} 17 |
18 | 19 | {% endfor %} 20 |
21 |
22 | 23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /templates/records/profile.html: -------------------------------------------------------------------------------- 1 | {% extends "records/base.html" %} 2 | 3 | {% block content %} 4 | 5 |

Household Profile

6 |

This information may be updated at any time throughout the year.

7 | 8 |
9 | 10 | {% for field in form %} 11 | 12 |
13 | {% if field.field.required %} 14 | {{ field.label_tag }} 15 | {% else %} 16 | {{field.label_tag }} 17 | {% endif %} 18 | {{ field }} 19 | 20 | {% if field.help_text %}

{{field.help_text}}

{% endif %} 21 | {% if field.errors %}{{ field.errors }}{% endif %} 22 |
23 | 24 | {% endfor %} 25 | 26 |
27 | 28 |
29 | 30 | {% endblock %} 31 | 32 | -------------------------------------------------------------------------------- /templates/records/questions.html: -------------------------------------------------------------------------------- 1 | {% extends "records/base.html" %} 2 | 3 | {% block content %} 4 | 5 |

More Information about {{student.name}}

6 |

This is the introduction section or explanatory paragraph.

7 | 8 |
9 | 10 | {% load comparison %} 11 |

Please check all that apply for this student

12 | 13 | {% for field in form %} 14 | 15 | 16 | {% if_less forloop.counter 7 %} 17 | 18 |
19 | {{ field.label_tag}} 20 | {% if field.help_text %}
{{field.help_text}}
{% endif %} 21 | {% if field.errors %}
{{ field.errors }}
{% endif %} 22 | {{ field }} 23 |
24 | {%else%} 25 |
26 | {{field.label_tag }} 27 | {% if field.help_text %}
{{field.help_text}}
{% endif %} 28 | {{ field }} 29 | {% if field.errors %}
{{ field.errors }}
{% endif %} 30 | 31 |
32 | {% endif_less %} 33 | 34 | {% endfor %} 35 |
36 | 37 |
38 | 39 | {% endblock %} 40 | 41 | -------------------------------------------------------------------------------- /templates/records/register.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/templates/records/register.html -------------------------------------------------------------------------------- /templates/records/students.html: -------------------------------------------------------------------------------- 1 | {% extends "records/base.html" %} 2 | 3 | {% block content %} 4 |

Students

5 |

Please use the following form to update student information.

6 | 7 |
8 | 9 | {{ formset.management_form }} 10 | 11 | {% for form in formset.forms %} 12 |
13 | {{form.as_p}} 14 |
15 | 16 | {% endfor %} 17 | 18 |
19 |
20 | 21 | {% endblock %} 22 | -------------------------------------------------------------------------------- /templates/records/volunteer.html: -------------------------------------------------------------------------------- 1 | {% extends "records/base.html" %} 2 | 3 | {% block content %} 4 |

Volunteer Form

5 |

Volunteer help is essential to controlling costs and providing many of the fine programs at our school. Parents have a 6 | special interest in seeing that their children are well served. Grandparents and other relatives are also encouraged to 7 | participate. Below is a list of areas where volunteer help is needed for effective school operation. Where can you help?

8 |
9 | {% for field in form %} 10 | {% ifequal field.name 'grade_papers' %}

Classroom

{% endifequal %} 11 | {% ifequal field.name 'supervise_playground' %}

Campus

{% endifequal %} 12 | {% ifequal field.name 'substitute' %}

Academic

{% endifequal %} 13 | {% ifequal field.name 'piano' %}

Music

{% endifequal %} 14 | {% ifequal field.name 'check_out' %}

Library and Media left

{% endifequal %} 15 | {% ifequal field.name 'bulletin_boards' %}

Arts

{% endifequal %} 16 | {% ifequal field.name 'photography' %}

Yearbook

{% endifequal %} 17 | {% ifequal field.name 'substitute_secretary' %}

Office

{% endifequal %} 18 | {% ifequal field.name 'jogathon' %}

Fundraising

{% endifequal %} 19 | {% ifequal field.name 'landscape' %}

Maintenance

{% endifequal %} 20 | {% ifequal field.name 'business_equipment' %}

Resources

{% endifequal %} 21 | 22 | 23 | {% ifequal field.field.widget.input_type "text" %} 24 |
25 | {% else %} 26 |
27 | {% endifequal %} 28 | 29 | {{ field.label_tag }} 30 | {% if field.help_text %}{{ field.help_text }}{% endif %} 31 | {{ field }} 32 | {% if field.errors %}
{{ field.errors }}
{% endif %} 33 |
34 | 35 | {% endfor %} 36 |
37 |
38 | 39 | {% endblock %} 40 | 41 | -------------------------------------------------------------------------------- /templates/registration/activate.html: -------------------------------------------------------------------------------- 1 | {% extends "home.html" %} 2 | 3 | {% block form %} 4 |

Your account is now activated

5 | Proceed » 6 | {% endblock %} 7 | 8 | -------------------------------------------------------------------------------- /templates/registration/activation_email.txt: -------------------------------------------------------------------------------- 1 | Please click here to activate your account: {{ site }}/accounts/activate/{{ activation_key }}/ 2 | -------------------------------------------------------------------------------- /templates/registration/activation_email_subject.txt: -------------------------------------------------------------------------------- 1 | Account Activation - {{ site }} 2 | 3 | -------------------------------------------------------------------------------- /templates/registration/login.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% comment %} 4 | {% block extrahead %} 6 | {% endblock %} 7 | {% endcomment %} 8 | {% block content %} 9 |

Login

10 |

Welcome to the new records keeping system. If you do not have a username and password please create an account. An email will be sent to you for activation.

11 |
12 | {% if form.errors %} 13 |

Your username and password didn't match. Please try again. Have you activated your account? If you continue to have trouble please contact 123-123-1234

14 | {% endif %} 15 | 16 |
17 | 18 |

You can use your username or the email you provided as your username.

19 |
20 | {{ form.username.label_tag }}{{ form.username }} 21 |
22 |
23 | {{ form.password.label_tag }}{{ form.password }} 24 |
25 | 26 |
27 | 28 | 29 |
30 | 31 |

32 | Create a new account! » 33 |

34 | {% endblock %} 35 | -------------------------------------------------------------------------------- /templates/registration/logout.html: -------------------------------------------------------------------------------- 1 | {% extends "home.html" %} 2 | 3 | {% block form %} 4 |
5 | You are now logged out!    6 | 7 | Login » 8 |
9 | {% endblock %} 10 | 11 | -------------------------------------------------------------------------------- /templates/registration/registration_complete.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |

An email has been sent to your email account with a link to activate your registration.

5 | Home » 6 | {% endblock %} 7 | -------------------------------------------------------------------------------- /templates/registration/registration_form.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |

Create an Account

5 |
6 |

Thank you for creating an account. Please create a username and password. You must also provide a valid email address.

7 |

Once you have entered this information and click "Create" an email will be sent to the email address you provided. Simple click on the link in the email to activate your account. Also remember to record you username and password for future reference.

8 |
9 | 10 |
11 |
12 |
13 |

You will be able to user your username or email address as your username when you login.

14 | {% for field in form %} 15 |
16 | {{ field.label_tag }} 17 | {{ field }} 18 | {% if field.help_text %}{{ field.help_text }}{% endif %} 19 | {% if field.errors %}{{ field.errors }}{% endif %} 20 |
21 | {% endfor %} 22 |
23 |
24 |
25 | 26 |
27 | {% endblock %} 28 | 29 | -------------------------------------------------------------------------------- /urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls.defaults import * 2 | from django.contrib import admin 3 | admin.autodiscover() 4 | 5 | from django.views.generic.simple import redirect_to 6 | 7 | from registration.forms import RegistrationFormUniqueEmail 8 | from endpoint import Endpoint 9 | 10 | from settings import DEBUG, PROJECT_DIR 11 | import os 12 | 13 | if DEBUG: 14 | urlpatterns = patterns('',\ 15 | (r'^media/(?P.*)$', 'django.views.static.serve',\ 16 | {'document_root': os.path.join(PROJECT_DIR, 'media/')}), 17 | 18 | (r'^admin_media/(?P.*)$', 'django.views.static.serve',\ 19 | {'document_root': os.path.join(PROJECT_DIR, 'admin_media/')}), 20 | ) 21 | else: 22 | urlpatterns = patterns('',) 23 | 24 | urlpatterns += patterns('', 25 | # This is the return url for processing the IPN for paypal 26 | (r'^endpoint/$', Endpoint(),), 27 | 28 | ################################# Registration 29 | (r'^accounts/profile/$', redirect_to, {'url':'/'}), 30 | (r'^accounts/register/$', 'registration.views.register',\ 31 | {'form_class': RegistrationFormUniqueEmail},), 32 | (r'^accounts/', include('registration.urls')), 33 | 34 | ################################# Admin 35 | # Mail 36 | (r'^admin/(?P[\d\w]+)/(?P[\d\w]+)/mail/$',\ 37 | 'utils.mail',), 38 | # For export to csv 39 | (r'^admin/(?P[\d\w]+)/(?P[\d\w]+)/csv/$',\ 40 | 'utils.admin_list_export'), 41 | # For Printing 42 | (r'^admin/(?P[\d\w]+)/(?P[\d\w]+)/(?P[\d]+)/print/$',\ 43 | 'records.views.print_detail'), 44 | (r'^admin/(.*)', admin.site.root), 45 | 46 | ################ Parent Dashboard, Application and Enrollment 47 | (r'^records/', include('records.urls')), 48 | 49 | ################################### Menu urls 50 | (r'^menu/', include('menu.urls')), 51 | 52 | ############### Blog urls 53 | (r'blog/', include('blog.urls')), 54 | (r'^comments/', include('django.contrib.comments.urls')), 55 | 56 | ################## Media_logs 57 | (r'videos/', include('media_logs.urls.videos')), 58 | (r'photos/', include('media_logs.urls.photos')), 59 | 60 | ########### our_people 61 | (r'our_people/', include('our_people.urls')), 62 | 63 | ######### Basic site views 64 | (r'^$', 'homeviews.home'), 65 | (r'^calendar/$', 'homeviews.calendar'), 66 | ) 67 | 68 | -------------------------------------------------------------------------------- /utils.py: -------------------------------------------------------------------------------- 1 | import csv 2 | from django.http import HttpResponse, HttpResponseForbidden 3 | from django.template.defaultfilters import slugify 4 | from django.db.models.loading import get_model 5 | 6 | def export(qs, fields=None): 7 | model = qs.model 8 | response = HttpResponse(mimetype='text/csv') 9 | response['Content-Disposition'] = 'attachment; filename=%s.csv' % slugify(model.__name__) 10 | writer = csv.writer(response) 11 | # Write headers to CSV file 12 | if fields: 13 | headers = fields 14 | else: 15 | headers = [] 16 | for field in model._meta.fields: 17 | headers.append(field.name) 18 | writer.writerow(headers) 19 | # Write data to CSV file 20 | for obj in qs: 21 | row = [] 22 | for field in headers: 23 | if field in headers: 24 | val = getattr(obj, field) 25 | if callable(val): 26 | val = val() 27 | row.append(val) 28 | writer.writerow(row) 29 | # Return CSV file to browser as download 30 | return response 31 | 32 | def admin_list_export(request, model_name, app_label, queryset=None, fields=None, list_display=True): 33 | """ 34 | Put the following line in your urls.py BEFORE your admin include 35 | (r'^admin/(?P[\d\w]+)/(?P[\d\w]+)/csv/', 'util.csv_view.admin_list_export'), 36 | """ 37 | if not request.user.is_staff: 38 | return HttpResponseForbidden() 39 | if not queryset: 40 | model = get_model(app_label, model_name) 41 | queryset = model.objects.all() 42 | filters = dict() 43 | for key, value in request.GET.items(): 44 | if key not in ('ot', 'o'): 45 | filters[str(key)] = str(value) 46 | if len(filters): 47 | queryset = queryset.filter(**filters) 48 | 49 | if not fields and list_display: 50 | from django.contrib import admin 51 | ld = admin.site._registry[queryset.model].list_display 52 | if ld and len(ld) > 0: 53 | fields = ld 54 | 55 | ''' 56 | if not fields: 57 | if list_display and len(queryset.model._meta.admin.list_display) > 1: 58 | fields = queryset.model._meta.admin.list_display 59 | else: 60 | fields = None 61 | ''' 62 | return export(queryset, fields) 63 | """ 64 | Create your own change_list.html for your admin view and put something like this in it: 65 | {% block object-tools %} 66 | 72 | {% endblock %} 73 | """ 74 | import datetime 75 | from django.http import HttpResponseRedirect #, HttpResponse 76 | from django.shortcuts import render_to_response 77 | from django.template import RequestContext 78 | 79 | from django.contrib.auth.decorators import login_required 80 | 81 | def mail(request, app_label, model_name): 82 | context = { 'app_label':app_label, 'model_name':model_name, } 83 | return render_to_response('mail.html', context, context_instance=RequestContext(request)) 84 | 85 | -------------------------------------------------------------------------------- /views/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/views/__init__.py -------------------------------------------------------------------------------- /views/generic/__init__.py: -------------------------------------------------------------------------------- 1 | class GenericViewError(Exception): 2 | """A problem in a generic view.""" 3 | pass 4 | -------------------------------------------------------------------------------- /views/generic/simple.py: -------------------------------------------------------------------------------- 1 | from django.template import loader, RequestContext 2 | from django.http import HttpResponse, HttpResponseRedirect, HttpResponsePermanentRedirect, HttpResponseGone 3 | 4 | def direct_to_template(request, template, extra_context=None, mimetype=None, **kwargs): 5 | """ 6 | Render a given template with any extra URL parameters in the context as 7 | ``{{ params }}``. 8 | """ 9 | if extra_context is None: extra_context = {} 10 | dictionary = {'params': kwargs} 11 | for key, value in extra_context.items(): 12 | if callable(value): 13 | dictionary[key] = value() 14 | else: 15 | dictionary[key] = value 16 | c = RequestContext(request, dictionary) 17 | t = loader.get_template(template) 18 | return HttpResponse(t.render(c), mimetype=mimetype) 19 | 20 | def redirect_to(request, url, permanent=True, **kwargs): 21 | """ 22 | Redirect to a given URL. 23 | 24 | The given url may contain dict-style string formatting, which will be 25 | interpolated against the params in the URL. For example, to redirect from 26 | ``/foo//`` to ``/bar//``, you could use the following URLconf:: 27 | 28 | urlpatterns = patterns('', 29 | ('^foo/(?P\d+)/$', 'django.views.generic.simple.redirect_to', {'url' : '/bar/%(id)s/'}), 30 | ) 31 | 32 | If the given url is ``None``, a HttpResponseGone (410) will be issued. 33 | 34 | If the ``permanent`` argument is False, then the response will have a 302 35 | HTTP status code. Otherwise, the status code will be 301. 36 | """ 37 | if url is not None: 38 | klass = permanent and HttpResponsePermanentRedirect or HttpResponseRedirect 39 | return klass(url % kwargs) 40 | else: 41 | return HttpResponseGone() 42 | -------------------------------------------------------------------------------- /years/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyl/Django-School/723d52db2cd3bc7665680a3adaf8687f97836d48/years/__init__.py -------------------------------------------------------------------------------- /years/tests.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file demonstrates two different styles of tests (one doctest and one 3 | unittest). These will both pass when you run "manage.py test". 4 | 5 | Replace these with more appropriate tests for your application. 6 | """ 7 | 8 | from django.test import TestCase 9 | 10 | class SimpleTest(TestCase): 11 | def test_basic_addition(self): 12 | """ 13 | Tests that 1 + 1 always equals 2. 14 | """ 15 | self.failUnlessEqual(1 + 1, 2) 16 | 17 | __test__ = {"doctest": """ 18 | Another way to test that 1 + 1 is equal to 2. 19 | 20 | >>> 1 + 1 == 2 21 | True 22 | """} 23 | 24 | -------------------------------------------------------------------------------- /years/views.py: -------------------------------------------------------------------------------- 1 | # Create your views here. 2 | --------------------------------------------------------------------------------