├── src
├── __init__.py
├── claims
│ ├── __init__.py
│ ├── migrations
│ │ ├── __init__.py
│ │ └── 0002_auto_20160803_1431.py
│ ├── tests
│ │ ├── factories.py
│ │ ├── __init__.py
│ │ └── tests.py
│ ├── templatetags
│ │ ├── __init__.py
│ │ └── claims_tags.py
│ └── urls.py
├── forum
│ ├── __init__.py
│ ├── migrations
│ │ └── __init__.py
│ ├── templatetags
│ │ └── __init__.py
│ ├── templates
│ │ └── djforum
│ │ │ ├── email_new_post.html
│ │ │ ├── _topic_statuses.html
│ │ │ ├── base.html
│ │ │ ├── _rating.html
│ │ │ └── my_topics.html
│ ├── settings.py
│ ├── admin.py
│ ├── search_indexes.py
│ └── static
│ │ └── forum
│ │ └── js
│ │ └── rating.js
├── jobs
│ ├── __init__.py
│ ├── migrations
│ │ └── __init__.py
│ ├── tests.py
│ ├── urls.py
│ ├── admin.py
│ └── views.py
├── links
│ ├── __init__.py
│ ├── migrations
│ │ └── __init__.py
│ ├── templatetags
│ │ ├── __init__.py
│ │ └── links_tags.py
│ └── admin.py
├── main
│ ├── __init__.py
│ ├── migrations
│ │ └── __init__.py
│ ├── templatetags
│ │ └── __init__.py
│ ├── migrations_auth
│ │ ├── __init__.py
│ │ ├── 0002_alter_permission_name_max_length.py
│ │ ├── 0002_auto_20150308_1901.py
│ │ ├── 0006_require_contenttypes_0002.py
│ │ ├── 0005_alter_user_last_login_null.py
│ │ ├── 0003_alter_user_email_max_length.py
│ │ └── 0004_alter_user_username_opts.py
│ ├── locale
│ │ └── ru
│ │ │ └── LC_MESSAGES
│ │ │ └── djangojs.mo
│ ├── admin.py
│ └── urls.py
├── news
│ ├── __init__.py
│ ├── management
│ │ ├── __init__.py
│ │ └── commands
│ │ │ └── __init__.py
│ ├── migrations
│ │ └── __init__.py
│ ├── templatetags
│ │ ├── __init__.py
│ │ └── news_tags.py
│ ├── static
│ │ └── news
│ │ │ ├── img
│ │ │ └── line.png
│ │ │ └── css
│ │ │ └── style.css
│ ├── urls.py
│ ├── search_indexes.py
│ ├── views.py
│ ├── feeds.py
│ └── admin.py
├── utils
│ ├── __init__.py
│ ├── db
│ │ ├── __init__.py
│ │ └── fields
│ │ │ └── __init__.py
│ ├── mail.py
│ └── forms.py
├── videos
│ ├── __init__.py
│ ├── migrations
│ │ └── __init__.py
│ ├── templatetags
│ │ ├── __init__.py
│ │ └── videos_tags.py
│ ├── urls.py
│ ├── admin.py
│ ├── forms.py
│ └── views.py
├── accounts
│ ├── __init__.py
│ ├── migrations
│ │ ├── __init__.py
│ │ └── 0003_fix_managers.py
│ ├── templatetags
│ │ ├── __init__.py
│ │ └── accounts_tags.py
│ ├── tests
│ │ ├── __init__.py
│ │ └── factories.py
│ ├── templates
│ │ └── accounts
│ │ │ ├── base.html
│ │ │ ├── email_password_reset.html
│ │ │ ├── email_confirmation_message.html
│ │ │ ├── _announcements.html
│ │ │ ├── _menu.html
│ │ │ ├── email_new_user.html
│ │ │ ├── password_reset_done.html
│ │ │ ├── password_reset_complete.html
│ │ │ ├── create.html
│ │ │ ├── password_reset.html
│ │ │ └── _achievements.html
│ └── backends.py
├── comments
│ ├── __init__.py
│ ├── migrations
│ │ └── __init__.py
│ ├── urls.py
│ ├── admin.py
│ └── templatetags
│ │ └── __init__.py
├── doc_comments
│ ├── __init__.py
│ ├── migrations
│ │ └── __init__.py
│ ├── static
│ │ └── doc_comments
│ │ │ └── img
│ │ │ ├── comment-active.png
│ │ │ ├── comment-hover.png
│ │ │ ├── comment-current.png
│ │ │ ├── comment-unclosed.png
│ │ │ ├── glyphicons-halflings.png
│ │ │ └── glyphicons-halflings-white.png
│ ├── forms.py
│ ├── urls.py
│ └── admin.py
├── examples
│ ├── __init__.py
│ ├── migrations
│ │ ├── __init__.py
│ │ └── 0002_example_is_draft_for.py
│ ├── templatetags
│ │ ├── __init__.py
│ │ └── example_tags.py
│ ├── urls.py
│ ├── feeds.py
│ └── search_indexes.py
├── header_messages
│ ├── __init__.py
│ ├── migrations
│ │ ├── __init__.py
│ │ └── 0001_initial.py
│ ├── views.py
│ ├── admin.py
│ ├── tests.py
│ └── models.py
├── static
│ ├── js
│ │ └── force_jquery.js
│ ├── pics
│ │ ├── README
│ │ ├── 404.png
│ │ ├── ch06
│ │ │ ├── 10.png
│ │ │ ├── 11.png
│ │ │ ├── 12.png
│ │ │ ├── 13.png
│ │ │ ├── 14.png
│ │ │ ├── 7.png
│ │ │ ├── 8.png
│ │ │ └── 9.png
│ │ ├── history.png
│ │ ├── login.png
│ │ ├── editform.png
│ │ ├── admin_index.png
│ │ ├── book_extra.png
│ │ ├── changelist.png
│ │ ├── changelist2.png
│ │ ├── get_response.png
│ │ ├── waiting_for.png
│ │ ├── delete_confirm.png
│ │ ├── editform_errors.png
│ │ ├── missing_template.png
│ │ └── books_by_publisher.png
│ ├── syntaxhighlighter_3.0.83
│ │ ├── tests
│ │ │ ├── .rvmrc
│ │ │ ├── webrick.sh
│ │ │ ├── webrick.rb
│ │ │ └── cases
│ │ │ │ ├── 008_first_line.html
│ │ │ │ ├── 012_server_side.html
│ │ │ │ ├── 009_class_name.html
│ │ │ │ ├── 013_html_script.html
│ │ │ │ ├── 003_script_tag.html
│ │ │ │ └── 001_basic.html
│ │ ├── compass
│ │ │ ├── shCoreDjango.scss
│ │ │ ├── shCoreEmacs.scss
│ │ │ ├── shCoreRDark.scss
│ │ │ ├── shCoreDefault.scss
│ │ │ ├── shCoreEclipse.scss
│ │ │ ├── shCoreMDUltra.scss
│ │ │ ├── shCoreMidnight.scss
│ │ │ ├── shCoreFadeToGrey.scss
│ │ │ ├── shThemeDefault.scss
│ │ │ └── config.rb
│ │ ├── index.html
│ │ └── scripts
│ │ │ └── shBrushPlain.js
│ ├── img
│ │ ├── map.png
│ │ ├── beta.png
│ │ ├── buzz.png
│ │ ├── login.png
│ │ ├── ando-qr.png
│ │ ├── facebook.png
│ │ ├── favicon.ico
│ │ ├── favicon.png
│ │ ├── favicon.xcf
│ │ ├── moiluch.gif
│ │ ├── openid.jpg
│ │ ├── twitter.png
│ │ ├── jino_175x56.png
│ │ ├── python_digest.png
│ │ ├── securelayer.png
│ │ ├── djangobook-title.png
│ │ ├── link-overlay-icon.png
│ │ └── djangobook-title-beta.png
│ ├── flags
│ │ └── flags.png
│ ├── menu
│ │ └── images
│ │ │ ├── hover.gif
│ │ │ ├── sub_sep.gif
│ │ │ ├── hover_sub.gif
│ │ │ └── seperator.gif
│ ├── theme
│ │ ├── images
│ │ │ ├── 10p.png
│ │ │ ├── 30p.png
│ │ │ ├── 50p.png
│ │ │ ├── 5p.png
│ │ │ ├── 70p.png
│ │ │ ├── 7p.png
│ │ │ ├── 80p.png
│ │ │ ├── hr.png
│ │ │ ├── logo.png
│ │ │ ├── logo.xcf
│ │ │ ├── plus.png
│ │ │ ├── rule.png
│ │ │ ├── top.png
│ │ │ ├── loader.gif
│ │ │ ├── search.png
│ │ │ ├── trans.gif
│ │ │ ├── 70pwhite.png
│ │ │ ├── 80pwhite.png
│ │ │ ├── logo_ny.png
│ │ │ ├── videoicon.png
│ │ │ ├── img_corner.png
│ │ │ ├── menu_arrow.png
│ │ │ ├── open-quote.png
│ │ │ ├── video-icon.png
│ │ │ ├── zoom-corner.png
│ │ │ ├── navtriggerbg.png
│ │ │ ├── retina
│ │ │ │ ├── hr_@2x.png
│ │ │ │ ├── top_@2x.png
│ │ │ │ ├── logo_@2x.png
│ │ │ │ ├── plus_@2x.png
│ │ │ │ ├── loader_@2x.gif
│ │ │ │ ├── search_@2x.png
│ │ │ │ ├── menu_arrow_@2x.png
│ │ │ │ ├── open-quote_@2x.png
│ │ │ │ ├── videoicon_@2x.png
│ │ │ │ ├── navtriggerbg_@2x.png
│ │ │ │ ├── sliderarrows_@2x.png
│ │ │ │ ├── zoom-corner_@2x.png
│ │ │ │ ├── open-quote-white_@2x.png
│ │ │ │ ├── sidebar-list-icon_@2x.png
│ │ │ │ ├── tall-logo-desktop_@2x.png
│ │ │ │ ├── tall-logo-mobile_@2x.png
│ │ │ │ └── video-icon-small_@2x.png
│ │ │ ├── sign-in-google.png
│ │ │ ├── sign-in-openid.png
│ │ │ ├── sign-in-yahoo.png
│ │ │ ├── sliderarrows.png
│ │ │ ├── open-quote-white.png
│ │ │ ├── sign-in-facebook.png
│ │ │ ├── sign-in-linkedin.png
│ │ │ ├── sign-in-twitter.png
│ │ │ ├── video-icon-small.png
│ │ │ ├── sidebar-list-icon.png
│ │ │ └── ssd-virtual-servers-banner-320x50.jpg
│ │ ├── js
│ │ │ ├── audiojs
│ │ │ │ ├── audiojs.swf
│ │ │ │ └── player-graphics.gif
│ │ │ └── fancybox
│ │ │ │ └── source
│ │ │ │ ├── blank.gif
│ │ │ │ ├── fancy-new-sprite.png
│ │ │ │ ├── fancybox_loading.gif
│ │ │ │ ├── fancybox_overlay.png
│ │ │ │ ├── fancybox_sprite.png
│ │ │ │ ├── fancy-new-sprite_@2x.png
│ │ │ │ └── helpers
│ │ │ │ ├── fancybox_buttons.png
│ │ │ │ ├── fancybox_buttons_@2x.png
│ │ │ │ └── jquery.fancybox-thumbs.css
│ │ ├── font
│ │ │ ├── socialico-webfont.eot
│ │ │ ├── socialico-webfont.ttf
│ │ │ ├── socialico-webfont.woff
│ │ │ ├── fontawesome-webfont.eot
│ │ │ ├── fontawesome-webfont.ttf
│ │ │ └── fontawesome-webfont.woff
│ │ ├── font-awesome-4.0.3
│ │ │ ├── fonts
│ │ │ │ ├── FontAwesome.otf
│ │ │ │ ├── fontawesome-webfont.eot
│ │ │ │ ├── fontawesome-webfont.ttf
│ │ │ │ └── fontawesome-webfont.woff
│ │ │ ├── less
│ │ │ │ ├── fixed-width.less
│ │ │ │ ├── core.less
│ │ │ │ ├── bordered-pulled.less
│ │ │ │ ├── rotated-flipped.less
│ │ │ │ ├── larger.less
│ │ │ │ ├── list.less
│ │ │ │ ├── font-awesome.less
│ │ │ │ ├── stacked.less
│ │ │ │ ├── path.less
│ │ │ │ ├── mixins.less
│ │ │ │ └── spinning.less
│ │ │ └── scss
│ │ │ │ ├── _fixed-width.scss
│ │ │ │ ├── _core.scss
│ │ │ │ ├── _bordered-pulled.scss
│ │ │ │ ├── _larger.scss
│ │ │ │ ├── _rotated-flipped.scss
│ │ │ │ ├── _list.scss
│ │ │ │ ├── font-awesome.scss
│ │ │ │ ├── _stacked.scss
│ │ │ │ ├── _path.scss
│ │ │ │ ├── _mixins.scss
│ │ │ │ └── _spinning.scss
│ │ └── css
│ │ │ ├── pagedown.css
│ │ │ └── admin.css
│ ├── leeflet_0.4.5
│ │ ├── icons
│ │ │ ├── snakes.png
│ │ │ └── snakes_blue.png
│ │ ├── .gitignore
│ │ ├── dist
│ │ │ └── images
│ │ │ │ ├── layers.png
│ │ │ │ ├── zoom-in.png
│ │ │ │ ├── zoom-out.png
│ │ │ │ ├── marker-icon.png
│ │ │ │ └── marker-shadow.png
│ │ ├── plugins
│ │ │ ├── draw
│ │ │ │ ├── images
│ │ │ │ │ ├── draw-circle.png
│ │ │ │ │ ├── draw-polygon.png
│ │ │ │ │ ├── draw-polyline.png
│ │ │ │ │ ├── draw-rectangle.png
│ │ │ │ │ └── draw-marker-icon.png
│ │ │ │ └── leaflet.draw.ie.css
│ │ │ └── markercluster
│ │ │ │ ├── MarkerCluster.css
│ │ │ │ ├── MarkerCluster.Default.ie.css
│ │ │ │ └── MarkerCluster.Default.css
│ │ └── src
│ │ │ ├── geo
│ │ │ ├── projection
│ │ │ │ ├── Projection.js
│ │ │ │ ├── Projection.LonLat.js
│ │ │ │ └── Projection.SphericalMercator.js
│ │ │ └── crs
│ │ │ │ ├── CRS.Simple.js
│ │ │ │ ├── CRS.EPSG4326.js
│ │ │ │ ├── CRS.EPSG3395.js
│ │ │ │ ├── CRS.EPSG3857.js
│ │ │ │ └── CRS.js
│ │ │ ├── Leaflet.js
│ │ │ ├── map
│ │ │ ├── ext
│ │ │ │ ├── Map.Popup.js
│ │ │ │ └── Map.Control.js
│ │ │ └── handler
│ │ │ │ └── Map.DoubleClickZoom.js
│ │ │ ├── layer
│ │ │ ├── vector
│ │ │ │ ├── canvas
│ │ │ │ │ ├── Circle.Canvas.js
│ │ │ │ │ ├── Polyline.Canvas.js
│ │ │ │ │ └── Polygon.Canvas.js
│ │ │ │ ├── CircleMarker.js
│ │ │ │ ├── Rectangle.js
│ │ │ │ └── Path.Popup.js
│ │ │ └── marker
│ │ │ │ └── DivIcon.js
│ │ │ ├── core
│ │ │ └── Handler.js
│ │ │ ├── dom
│ │ │ └── transition
│ │ │ │ └── Transition.js
│ │ │ └── geometry
│ │ │ └── Transformation.js
│ └── jquery-autocomplete
│ │ └── indicator.gif
├── templates
│ ├── jobs
│ │ ├── base.html
│ │ └── index.html
│ ├── search
│ │ └── indexes
│ │ │ ├── news
│ │ │ └── news_text.txt
│ │ │ ├── examples
│ │ │ └── example_text.txt
│ │ │ └── forum
│ │ │ └── topic_text.txt
│ ├── comments
│ │ ├── update_comments.html
│ │ ├── list_with_form.html
│ │ └── list.html
│ ├── robots.txt
│ ├── news
│ │ └── base.html
│ ├── videos
│ │ ├── base.html
│ │ └── _last_videos.html
│ ├── claims
│ │ └── _claims_statistic.html
│ ├── _pretty_date.html
│ ├── main
│ │ ├── first_page.html
│ │ ├── thanks.html
│ │ ├── _toc.html
│ │ └── feedback.html
│ ├── examples
│ │ ├── category.html
│ │ ├── base.html
│ │ ├── index.html
│ │ └── _examples_menu.html
│ ├── sitemap_index.xml
│ ├── links
│ │ ├── _archive.html
│ │ ├── _source_codes.html
│ │ └── _useful_links.html
│ ├── 404.html
│ ├── 500.html
│ ├── flatpages
│ │ └── default.html
│ ├── _addthis.html
│ ├── _markitup.html
│ ├── docbook_translator
│ │ └── parser.html
│ └── admin
│ │ └── examples
│ │ └── change_form.html
├── search_sites.py
├── locale
│ └── ru
│ │ └── LC_MESSAGES
│ │ └── djangojs.mo
├── public
│ └── media
│ │ └── staging
│ │ └── accounts
│ │ └── achievement
│ │ ├── construction.png
│ │ ├── highschool.png
│ │ ├── highschool_1.png
│ │ ├── construction_1.png
│ │ ├── crossingguard.png
│ │ ├── crossingguard_1.png
│ │ ├── sozialeeinrichtung.png
│ │ └── sozialeeinrichtung_1.png
├── UPDATE
├── fixtures
│ └── initial_data1.json
├── context_processors.py
└── local_settings.py.dev.template
├── docs
└── .gitignore
├── logs
└── .gitignore
├── sentry
├── client
│ ├── __init__.py
│ ├── celery
│ │ ├── __init__.py
│ │ ├── conf.py
│ │ ├── client.py
│ │ ├── tasks.py
│ │ └── models.py
│ └── log
│ │ └── __init__.py
├── management
│ ├── __init__.py
│ └── commands
│ │ └── __init__.py
├── migrations
│ └── __init__.py
├── templatetags
│ └── __init__.py
├── tests
│ ├── templates
│ │ ├── 404.html
│ │ └── sentry-tests
│ │ │ └── error.html
│ ├── __init__.py
│ ├── middleware.py
│ ├── models.py
│ ├── urls.py
│ └── views.py
├── plugins
│ ├── sentry_urls
│ │ ├── __init__.py
│ │ ├── templates
│ │ │ └── sentry
│ │ │ │ └── plugins
│ │ │ │ └── sentry_urls
│ │ │ │ ├── widget.html
│ │ │ │ └── index.html
│ │ └── models.py
│ ├── sentry_redmine
│ │ ├── __init__.py
│ │ ├── migrations
│ │ │ └── __init__.py
│ │ └── conf.py
│ ├── sentry_servers
│ │ ├── __init__.py
│ │ ├── templates
│ │ │ └── sentry
│ │ │ │ └── plugins
│ │ │ │ └── sentry_servers
│ │ │ │ ├── widget.html
│ │ │ │ └── index.html
│ │ └── models.py
│ └── sentry_sites
│ │ ├── __init__.py
│ │ ├── templates
│ │ └── sentry
│ │ │ └── plugins
│ │ │ └── sentry_sites
│ │ │ ├── widget.html
│ │ │ └── index.html
│ │ └── models.py
├── media
│ ├── images
│ │ ├── search.png
│ │ └── sentry.png
│ └── scripts
│ │ └── highcharts.js
├── __init__.py
├── templates
│ └── sentry
│ │ ├── emails
│ │ └── error.txt
│ │ └── group
│ │ └── message_list.html
└── routers.py
├── lib
├── oembed
│ ├── contrib
│ │ ├── __init__.py
│ │ └── models.py
│ ├── tests
│ │ ├── templates
│ │ │ ├── 404.html
│ │ │ └── oembed
│ │ │ │ ├── provider
│ │ │ │ └── tests_rich.html
│ │ │ │ └── inline
│ │ │ │ └── video.html
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── tests
│ │ │ ├── __init__.py
│ │ │ └── resources.py
│ │ └── urls.py
│ ├── templatetags
│ │ └── __init__.py
│ ├── templates
│ │ └── oembed
│ │ │ ├── rich.html
│ │ │ ├── video.html
│ │ │ ├── inline
│ │ │ ├── link.html
│ │ │ ├── photo.html
│ │ │ ├── rich.html
│ │ │ └── video.html
│ │ │ ├── photo.html
│ │ │ └── link.html
│ ├── image_processors
│ │ └── __init__.py
│ ├── parsers
│ │ └── __init__.py
│ ├── urls.py
│ ├── listeners.py
│ ├── exceptions.py
│ ├── __init__.py
│ └── admin.py
├── pagination
│ ├── __init__.py
│ ├── templatetags
│ │ └── __init__.py
│ ├── locale
│ │ ├── de
│ │ │ └── LC_MESSAGES
│ │ │ │ ├── django.mo
│ │ │ │ └── django.po
│ │ ├── fr
│ │ │ └── LC_MESSAGES
│ │ │ │ ├── django.mo
│ │ │ │ └── django.po
│ │ └── pl
│ │ │ └── LC_MESSAGES
│ │ │ ├── django.mo
│ │ │ └── django.po
│ └── middleware.py
├── tagging_autocomplete
│ ├── __init__.py
│ ├── urls.py
│ ├── views.py
│ ├── models.py
│ └── widgets.py
├── bootstrapform
│ ├── templatetags
│ │ └── __init__.py
│ ├── meta.py
│ ├── __init__.py
│ └── templates
│ │ └── bootstrapform
│ │ └── form.html
└── decodehtmlentities
├── reqs
├── test.txt
├── dev.txt
└── base.txt
├── addon
├── mysql_drop_db.sql
├── mysql_create_db.sql
├── wsgi.under_construction.py
├── xapian_install.sh
├── dump.sh
├── pil_install.sh
└── under_construction.html
├── Makefile
├── .gitignore
├── .production.template
├── manage.py
├── fabfile
├── pip.py
└── hosts.py
├── import_production.sh
├── po_compile.sh
└── import.sh
/src/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/.gitignore:
--------------------------------------------------------------------------------
1 | /rel*
--------------------------------------------------------------------------------
/logs/.gitignore:
--------------------------------------------------------------------------------
1 | *.log
--------------------------------------------------------------------------------
/src/claims/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/forum/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/jobs/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/links/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/main/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/news/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/utils/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/videos/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/sentry/client/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/accounts/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/comments/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/doc_comments/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/examples/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/utils/db/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/oembed/contrib/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/pagination/__init__.py:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/sentry/management/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/sentry/migrations/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/sentry/templatetags/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/sentry/tests/templates/404.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/claims/migrations/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/claims/tests/factories.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/forum/migrations/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/header_messages/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/jobs/migrations/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/links/migrations/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/main/migrations/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/main/templatetags/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/news/management/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/news/migrations/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/news/templatetags/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/utils/db/fields/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/videos/migrations/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/oembed/tests/templates/404.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/tagging_autocomplete/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/sentry/management/commands/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/sentry/plugins/sentry_urls/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/accounts/migrations/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/accounts/templatetags/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/claims/templatetags/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/comments/migrations/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/examples/migrations/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/examples/templatetags/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/forum/templatetags/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/links/templatetags/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/main/migrations_auth/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/videos/templatetags/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/bootstrapform/templatetags/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/oembed/templatetags/__init__.py:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/sentry/plugins/sentry_redmine/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/sentry/plugins/sentry_servers/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/sentry/plugins/sentry_sites/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/doc_comments/migrations/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/header_messages/migrations/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/news/management/commands/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/pagination/templatetags/__init__.py:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/claims/tests/__init__.py:
--------------------------------------------------------------------------------
1 | from .tests import *
--------------------------------------------------------------------------------
/reqs/test.txt:
--------------------------------------------------------------------------------
1 | coverage
2 | factory_boy
3 | mock
4 |
--------------------------------------------------------------------------------
/sentry/plugins/sentry_redmine/migrations/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/accounts/tests/__init__.py:
--------------------------------------------------------------------------------
1 | from .tests import *
--------------------------------------------------------------------------------
/src/header_messages/views.py:
--------------------------------------------------------------------------------
1 | # Create your views here.
2 |
--------------------------------------------------------------------------------
/src/static/js/force_jquery.js:
--------------------------------------------------------------------------------
1 | jQuery = jQuery || django.jQuery;
--------------------------------------------------------------------------------
/src/templates/jobs/base.html:
--------------------------------------------------------------------------------
1 | {% extends 'basepage.html' %}
2 |
--------------------------------------------------------------------------------
/src/templates/jobs/index.html:
--------------------------------------------------------------------------------
1 | {% extends 'jobs/base.html' %}
--------------------------------------------------------------------------------
/lib/oembed/tests/__init__.py:
--------------------------------------------------------------------------------
1 | from oembed.tests.tests import *
2 |
--------------------------------------------------------------------------------
/sentry/tests/__init__.py:
--------------------------------------------------------------------------------
1 | from tests import *
2 | from models import *
--------------------------------------------------------------------------------
/src/search_sites.py:
--------------------------------------------------------------------------------
1 | import haystack
2 | haystack.autodiscover()
3 |
--------------------------------------------------------------------------------
/sentry/client/celery/__init__.py:
--------------------------------------------------------------------------------
1 | from client import CelerySentryClient
--------------------------------------------------------------------------------
/sentry/tests/templates/sentry-tests/error.html:
--------------------------------------------------------------------------------
1 | {% invalid template tag %}
--------------------------------------------------------------------------------
/src/static/pics/README:
--------------------------------------------------------------------------------
1 | Pictures from the django book translation.
2 |
--------------------------------------------------------------------------------
/src/static/syntaxhighlighter_3.0.83/tests/.rvmrc:
--------------------------------------------------------------------------------
1 | rvm 1.8.7-p249@copydeca
--------------------------------------------------------------------------------
/src/static/syntaxhighlighter_3.0.83/tests/webrick.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | ruby webrick.rb
3 |
--------------------------------------------------------------------------------
/src/jobs/tests.py:
--------------------------------------------------------------------------------
1 | from django.test import TestCase
2 |
3 | # Create your tests here.
4 |
--------------------------------------------------------------------------------
/src/static/img/map.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/img/map.png
--------------------------------------------------------------------------------
/lib/oembed/templates/oembed/rich.html:
--------------------------------------------------------------------------------
1 | {% autoescape off %}{{ response.html }}{% endautoescape %}
2 |
--------------------------------------------------------------------------------
/lib/oembed/templates/oembed/video.html:
--------------------------------------------------------------------------------
1 | {% autoescape off %}{{ response.html }}{% endautoescape %}
2 |
--------------------------------------------------------------------------------
/src/static/img/beta.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/img/beta.png
--------------------------------------------------------------------------------
/src/static/img/buzz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/img/buzz.png
--------------------------------------------------------------------------------
/src/static/img/login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/img/login.png
--------------------------------------------------------------------------------
/src/static/pics/404.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/pics/404.png
--------------------------------------------------------------------------------
/src/static/flags/flags.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/flags/flags.png
--------------------------------------------------------------------------------
/src/static/img/ando-qr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/img/ando-qr.png
--------------------------------------------------------------------------------
/src/static/img/facebook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/img/facebook.png
--------------------------------------------------------------------------------
/src/static/img/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/img/favicon.ico
--------------------------------------------------------------------------------
/src/static/img/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/img/favicon.png
--------------------------------------------------------------------------------
/src/static/img/favicon.xcf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/img/favicon.xcf
--------------------------------------------------------------------------------
/src/static/img/moiluch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/img/moiluch.gif
--------------------------------------------------------------------------------
/src/static/img/openid.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/img/openid.jpg
--------------------------------------------------------------------------------
/src/static/img/twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/img/twitter.png
--------------------------------------------------------------------------------
/src/static/pics/ch06/10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/pics/ch06/10.png
--------------------------------------------------------------------------------
/src/static/pics/ch06/11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/pics/ch06/11.png
--------------------------------------------------------------------------------
/src/static/pics/ch06/12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/pics/ch06/12.png
--------------------------------------------------------------------------------
/src/static/pics/ch06/13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/pics/ch06/13.png
--------------------------------------------------------------------------------
/src/static/pics/ch06/14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/pics/ch06/14.png
--------------------------------------------------------------------------------
/src/static/pics/ch06/7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/pics/ch06/7.png
--------------------------------------------------------------------------------
/src/static/pics/ch06/8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/pics/ch06/8.png
--------------------------------------------------------------------------------
/src/static/pics/ch06/9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/pics/ch06/9.png
--------------------------------------------------------------------------------
/src/static/pics/history.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/pics/history.png
--------------------------------------------------------------------------------
/src/static/pics/login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/pics/login.png
--------------------------------------------------------------------------------
/src/static/pics/editform.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/pics/editform.png
--------------------------------------------------------------------------------
/sentry/media/images/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/sentry/media/images/search.png
--------------------------------------------------------------------------------
/sentry/media/images/sentry.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/sentry/media/images/sentry.png
--------------------------------------------------------------------------------
/src/static/img/jino_175x56.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/img/jino_175x56.png
--------------------------------------------------------------------------------
/src/static/img/python_digest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/img/python_digest.png
--------------------------------------------------------------------------------
/src/static/img/securelayer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/img/securelayer.png
--------------------------------------------------------------------------------
/src/static/menu/images/hover.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/menu/images/hover.gif
--------------------------------------------------------------------------------
/src/static/pics/admin_index.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/pics/admin_index.png
--------------------------------------------------------------------------------
/src/static/pics/book_extra.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/pics/book_extra.png
--------------------------------------------------------------------------------
/src/static/pics/changelist.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/pics/changelist.png
--------------------------------------------------------------------------------
/src/static/pics/changelist2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/pics/changelist2.png
--------------------------------------------------------------------------------
/src/static/pics/get_response.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/pics/get_response.png
--------------------------------------------------------------------------------
/src/static/pics/waiting_for.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/pics/waiting_for.png
--------------------------------------------------------------------------------
/src/static/theme/images/10p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/theme/images/10p.png
--------------------------------------------------------------------------------
/src/static/theme/images/30p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/theme/images/30p.png
--------------------------------------------------------------------------------
/src/static/theme/images/50p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/theme/images/50p.png
--------------------------------------------------------------------------------
/src/static/theme/images/5p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/theme/images/5p.png
--------------------------------------------------------------------------------
/src/static/theme/images/70p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/theme/images/70p.png
--------------------------------------------------------------------------------
/src/static/theme/images/7p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/theme/images/7p.png
--------------------------------------------------------------------------------
/src/static/theme/images/80p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/theme/images/80p.png
--------------------------------------------------------------------------------
/src/static/theme/images/hr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/theme/images/hr.png
--------------------------------------------------------------------------------
/src/static/theme/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/theme/images/logo.png
--------------------------------------------------------------------------------
/src/static/theme/images/logo.xcf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/theme/images/logo.xcf
--------------------------------------------------------------------------------
/src/static/theme/images/plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/theme/images/plus.png
--------------------------------------------------------------------------------
/src/static/theme/images/rule.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/theme/images/rule.png
--------------------------------------------------------------------------------
/src/static/theme/images/top.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djbook-ru/djbookru/HEAD/src/static/theme/images/top.png
--------------------------------------------------------------------------------
/lib/oembed/tests/templates/oembed/provider/tests_rich.html:
--------------------------------------------------------------------------------
1 |
\d+)/$', 'news', name='news'),
10 | url(r'^feed/$', feeds.LatestNewsFeed(), name='rss'),
11 | )
12 |
--------------------------------------------------------------------------------
/src/static/leeflet_0.4.5/plugins/draw/leaflet.draw.ie.css:
--------------------------------------------------------------------------------
1 | /* Conditional stylesheet for IE. */
2 |
3 | .leaflet-control-draw {
4 | filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#3F000000', EndColorStr='#3F000000');
5 | }
6 |
7 | .leaflet-control-draw a {
8 | background-color: #eee;
9 | filter: alpha(opacity=90);
10 | }
--------------------------------------------------------------------------------
/src/templates/sitemap_index.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {% for location in sitemaps %}{{ location }} {% endfor %}
4 | https://{{ site.domain }}{{ DJANGO_DOCUMENTATION_SITEMAP_URL }}
5 |
--------------------------------------------------------------------------------
/reqs/dev.txt:
--------------------------------------------------------------------------------
1 | # Список зависимостей, которые должен поставить разработчик.
2 |
3 | Fabric >= 1.3.2
4 | django-fab-deploy >= 0.7.2
5 |
6 | django-devserver==0.7.0
7 | werkzeug # interactive debugger
8 | guppy # tracks memory usage (required for MemoryUseModule)
9 |
10 | Whoosh == 1.8.4 # pretty easy search backend for xapian
11 |
--------------------------------------------------------------------------------
/src/accounts/templates/accounts/base.html:
--------------------------------------------------------------------------------
1 | {% extends 'basepage.html' %}
2 |
3 | {% load i18n accounts_tags %}
4 |
5 | {% block title %}{% trans "Profile" %} | {{ block.super }}{% endblock %}
6 |
7 | {% block header_container %}{% endblock %}
8 |
9 | {% block sidebar %}
10 | {% profile_menu %}
11 | {{ block.super }}
12 | {% endblock %}
--------------------------------------------------------------------------------
/src/static/leeflet_0.4.5/src/Leaflet.js:
--------------------------------------------------------------------------------
1 | var L, originalL;
2 |
3 | if (typeof exports !== undefined + '') {
4 | L = exports;
5 | } else {
6 | originalL = window.L;
7 | L = {};
8 |
9 | L.noConflict = function () {
10 | window.L = originalL;
11 | return this;
12 | };
13 |
14 | window.L = L;
15 | }
16 |
17 | L.version = '0.4.5';
18 |
--------------------------------------------------------------------------------
/src/templates/examples/base.html:
--------------------------------------------------------------------------------
1 | {% extends 'basepage.html' %}
2 |
3 | {% load i18n example_tags %}
4 |
5 | {% block title %}{% trans "Recipes" %} | {{ block.super }}{% endblock %}
6 |
7 | {% block header %}{% trans "Recipes" %}{% endblock %}
8 |
9 | {% block sidebar %}
10 | {% examples_menu %}
11 | {{ block.super }}
12 | {% endblock %}
--------------------------------------------------------------------------------
/src/templates/main/thanks.html:
--------------------------------------------------------------------------------
1 | {% extends 'basepage.html' %}
2 |
3 | {% load i18n bootstrap %}
4 |
5 | {% block title %}{% trans 'Help Our Project' %} | {{ block.super }}{% endblock %}
6 |
7 | {% block content %}
8 |
9 |
10 | {% trans "Thank you!" %}
11 |
12 |
13 | {% endblock %}
14 |
--------------------------------------------------------------------------------
/lib/oembed/listeners.py:
--------------------------------------------------------------------------------
1 | from django.db.models.signals import post_save
2 |
3 | import oembed
4 | from oembed.models import StoredProvider
5 |
6 | def provider_site_invalidate(sender, instance, created, **kwargs):
7 | oembed.site.invalidate_providers()
8 |
9 | def start_listening():
10 | post_save.connect(provider_site_invalidate, sender=StoredProvider)
11 |
--------------------------------------------------------------------------------
/src/static/theme/font-awesome-4.0.3/less/core.less:
--------------------------------------------------------------------------------
1 | // Base Class Definition
2 | // -------------------------
3 |
4 | .@{fa-css-prefix} {
5 | display: inline-block;
6 | font-family: FontAwesome;
7 | font-style: normal;
8 | font-weight: normal;
9 | line-height: 1;
10 | -webkit-font-smoothing: antialiased;
11 | -moz-osx-font-smoothing: grayscale;
12 | }
13 |
--------------------------------------------------------------------------------
/src/static/theme/font-awesome-4.0.3/scss/_core.scss:
--------------------------------------------------------------------------------
1 | // Base Class Definition
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix} {
5 | display: inline-block;
6 | font-family: FontAwesome;
7 | font-style: normal;
8 | font-weight: normal;
9 | line-height: 1;
10 | -webkit-font-smoothing: antialiased;
11 | -moz-osx-font-smoothing: grayscale;
12 | }
13 |
--------------------------------------------------------------------------------
/src/claims/templatetags/claims_tags.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from django import template
4 | from .. import models
5 |
6 | register = template.Library()
7 |
8 |
9 | @register.inclusion_tag('claims/_claims_statistic.html', takes_context=True)
10 | def claims_statistic(context):
11 | context['claims'] = models.Claims.statistic()
12 | return context
13 |
--------------------------------------------------------------------------------
/src/static/syntaxhighlighter_3.0.83/tests/webrick.rb:
--------------------------------------------------------------------------------
1 | require 'webrick'
2 | include WEBrick
3 |
4 | s = HTTPServer.new(
5 | :Port => 2010,
6 | :DocumentRoot => Dir::pwd
7 | )
8 | s.mount('/sh/scripts', WEBrick::HTTPServlet::FileHandler, '../scripts')
9 | s.mount('/sh/styles', WEBrick::HTTPServlet::FileHandler, '../styles')
10 | trap('INT') { s.stop }
11 | s.start
12 |
--------------------------------------------------------------------------------
/src/templates/links/_archive.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/templates/links/_source_codes.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/templates/404.html:
--------------------------------------------------------------------------------
1 | {% extends "base.html" %}
2 |
3 | {% load i18n %}
4 |
5 | {% block page %}
6 |
7 |
8 |
9 |
{% trans 'Forgotten page...' %}
10 |
Error 404
11 |
12 |
13 |
14 | {% endblock %}
15 |
--------------------------------------------------------------------------------
/src/templates/500.html:
--------------------------------------------------------------------------------
1 | {% extends "base.html" %}
2 |
3 | {% load i18n %}
4 |
5 | {% block page %}
6 |
7 |
8 |
9 |
{% trans 'We have broken...' %}
10 |
Error 500
11 |
12 |
13 |
14 | {% endblock %}
15 |
--------------------------------------------------------------------------------
/src/accounts/templates/accounts/email_password_reset.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 |
3 | {% trans "You are going reset password for" %} {{ site_name }}.
4 |
5 | {% block reset_link %}
6 | {{ protocol }}://{{ domain }}{% url 'accounts:password_reset_confirm' uidb64=uid token=token %}
7 | {% endblock %}
--------------------------------------------------------------------------------
/src/forum/templates/djforum/_topic_statuses.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 |
3 | {% if topic.heresy %}
4 | {% trans "Herecy" %}
5 | {% endif %}
6 |
7 | {% if topic.closed %}
8 | {% trans "Closed" %}
9 | {% endif %}
10 |
11 | {% if topic.sticky %}
12 | {% trans "Sticky" %}
13 | {% endif %}
--------------------------------------------------------------------------------
/src/news/static/news/css/style.css:
--------------------------------------------------------------------------------
1 | ul.news_list > li {
2 | background: url('../img/line.png') repeat-x left top;
3 | margin: 4px 10px;
4 | display: inline-block;
5 | }
6 | ul.news_list > li:first-child {
7 | background: none !important;
8 | }
9 |
10 | .user_thumb {
11 | margin: 4px;
12 | }
13 | .user_info {
14 | line-height: 32px;
15 | vertical-align: middle;
16 | }
17 |
--------------------------------------------------------------------------------
/fabfile/pip.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | import os
4 | from fabric.api import env, run
5 |
6 | from . utils import pip_reqs_path, inside_project, inside_virtualenv
7 |
8 |
9 | @inside_virtualenv
10 | @inside_project
11 | def pip_install(what=None, options='', restart=True):
12 | what = pip_reqs_path(what or env.conf.PIP_REQS_BASE)
13 | run('pip install %s -r %s' % (options, what))
14 |
--------------------------------------------------------------------------------
/src/static/leeflet_0.4.5/src/map/ext/Map.Popup.js:
--------------------------------------------------------------------------------
1 |
2 | L.Map.include({
3 | openPopup: function (popup) {
4 | this.closePopup();
5 |
6 | this._popup = popup;
7 |
8 | return this
9 | .addLayer(popup)
10 | .fire('popupopen', {popup: this._popup});
11 | },
12 |
13 | closePopup: function () {
14 | if (this._popup) {
15 | this._popup._close();
16 | }
17 | return this;
18 | }
19 | });
--------------------------------------------------------------------------------
/import_production.sh:
--------------------------------------------------------------------------------
1 | source ./.production
2 |
3 | ssh ${USER}@${HOST} "mysqldump -h ${DBHOST} -u ${DBUSER} -p${DBPASS} ${DBNAME} > ~/site1/dump.sql"
4 |
5 | rsync --verbose --archive --delete ${USER}@${HOST}:site1/src/public/media ./src/public/
6 | rsync --verbose --archive --delete ${USER}@${HOST}:site1/dump.sql ./tmp/
7 |
8 | python manage.py dbshell << EOF
9 | \. ./tmp/dump.sql
10 | EOF
11 |
12 | exit 0
13 |
--------------------------------------------------------------------------------
/src/UPDATE:
--------------------------------------------------------------------------------
1 | * Remove *.pyc files: `make clean`
2 |
3 | * Recreate virtual env.
4 |
5 | * Update settings:
6 | - DJANGO_DOCUMENTATION_* section.
7 |
8 | * $ ./manage.py migrate
9 |
10 | * Update search:
11 | - Update static pages data: `./manage.py crawl_static_pages`
12 | - Rebuild search index: `./manage.py rebuild_index`
13 | - Check search
14 |
15 | * `rel_project` now add to root, not './src'
--------------------------------------------------------------------------------
/src/static/leeflet_0.4.5/src/geo/crs/CRS.EPSG3395.js:
--------------------------------------------------------------------------------
1 |
2 | L.CRS.EPSG3395 = L.Util.extend({}, L.CRS, {
3 | code: 'EPSG:3395',
4 |
5 | projection: L.Projection.Mercator,
6 |
7 | transformation: (function () {
8 | var m = L.Projection.Mercator,
9 | r = m.R_MAJOR,
10 | r2 = m.R_MINOR;
11 |
12 | return new L.Transformation(0.5 / (Math.PI * r), 0.5, -0.5 / (Math.PI * r2), 0.5);
13 | }())
14 | });
15 |
--------------------------------------------------------------------------------
/src/static/syntaxhighlighter_3.0.83/compass/config.rb:
--------------------------------------------------------------------------------
1 | environment = :production
2 | project_type = :stand_alone
3 | http_path = "/"
4 | css_dir = "../styles"
5 | sass_dir = "."
6 | images_dir = "images"
7 | sass_options = {
8 | :line_numbers => false,
9 | :debug_info => false
10 | }
11 |
12 | # output_style = :compressed
13 | # output_style = :compact
14 | output_style = :expanded
15 |
--------------------------------------------------------------------------------
/src/templates/examples/index.html:
--------------------------------------------------------------------------------
1 | {% extends 'examples/base.html' %}
2 |
3 | {% load i18n %}
4 |
5 | {% block content %}
6 | {% for category in categories %}
7 | {% if forloop.counter > 1 %}
8 |
9 | {% include "_yandex.html" %}
10 |
11 | {% endif %}
12 |
13 | {% include 'examples/_category.html' %}
14 | {% endfor %}
15 | {% endblock %}
16 |
--------------------------------------------------------------------------------
/src/fixtures/initial_data1.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "pk": 2,
4 | "model": "sites.site",
5 | "fields": {
6 | "domain": "127.0.0.1:8000",
7 | "name": "local"
8 | }
9 | },
10 | {
11 | "pk": 1,
12 | "model": "sites.site",
13 | "fields": {
14 | "domain": "djbook.ru",
15 | "name": "DjangoBook v2.0"
16 | }
17 | }
18 | ]
--------------------------------------------------------------------------------
/src/news/search_indexes.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from haystack import indexes
4 | from .models import News
5 |
6 |
7 | class NewsIndex(indexes.SearchIndex, indexes.Indexable):
8 | text = indexes.CharField(document=True, use_template=True)
9 | title = indexes.CharField(model_attr='title')
10 | created = indexes.DateTimeField(model_attr='created')
11 |
12 | def get_model(self):
13 | return News
14 |
--------------------------------------------------------------------------------
/lib/oembed/tests/tests/__init__.py:
--------------------------------------------------------------------------------
1 | from oembed.tests.tests.consumer import *
2 | from oembed.tests.tests.models import *
3 | from oembed.tests.tests.parsers import *
4 | from oembed.tests.tests.providers import *
5 | from oembed.tests.tests.resources import *
6 | from oembed.tests.tests.sites import *
7 | from oembed.tests.tests.templatetags import *
8 | from oembed.tests.tests.utils import *
9 | from oembed.tests.tests.views import *
10 |
--------------------------------------------------------------------------------
/lib/tagging_autocomplete/views.py:
--------------------------------------------------------------------------------
1 | from django.http import HttpResponse
2 | from django.core import serializers
3 | from tagging.models import Tag
4 |
5 |
6 | def list_tags(request):
7 | try:
8 | tags = Tag.objects.filter(name__istartswith=request.GET['q']).values_list('name', flat=True)
9 | except MultiValueDictKeyError:
10 | pass
11 |
12 | return HttpResponse('\n'.join(tags), content_type='text/plain')
13 |
--------------------------------------------------------------------------------
/sentry/tests/middleware.py:
--------------------------------------------------------------------------------
1 | class BrokenRequestMiddleware(object):
2 | def process_request(self, request):
3 | raise ImportError('request')
4 |
5 | class BrokenResponseMiddleware(object):
6 | def process_response(self, request, response):
7 | raise ImportError('response')
8 |
9 | class BrokenViewMiddleware(object):
10 | def process_view(self, request, func, args, kwargs):
11 | raise ImportError('view')
--------------------------------------------------------------------------------
/lib/pagination/middleware.py:
--------------------------------------------------------------------------------
1 | class PaginationMiddleware(object):
2 | """
3 | Inserts a variable representing the current page onto the request object if
4 | it exists in either **GET** or **POST** portions of the request.
5 | """
6 | def process_request(self, request):
7 | try:
8 | request.page = int(request.GET['page'])
9 | except (KeyError, ValueError, TypeError):
10 | request.page = 1
--------------------------------------------------------------------------------
/src/accounts/templates/accounts/email_confirmation_message.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}{% blocktrans with current_site.name as site_name and user.email as email %}
2 | You just registred on {{ site_name }}.
3 |
4 | Confirm your email visting link {{ activate_url }} .
5 |
6 | If you do not know what happen, just ignore this email.
7 |
8 | With best regards, {{ site_name }} team.
9 | {% endblocktrans %}
--------------------------------------------------------------------------------
/src/templates/flatpages/default.html:
--------------------------------------------------------------------------------
1 | {% extends 'basepage.html' %}
2 |
3 | {% load i18n comments_tags %}
4 |
5 | {% block title %}{{ flatpage.title }} | {{ block.super }}{% endblock %}
6 |
7 | {% block content %}
8 | {{ flatpage.title }}
9 | {{ flatpage.content|safe }}
10 | {% if flatpage.enable_comments %}
11 |
12 | {% render_comment_list_with_form flatpage %}
13 | {% endif %}
14 | {% endblock %}
--------------------------------------------------------------------------------
/src/news/templatetags/news_tags.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from django import template
4 | from django.conf import settings
5 |
6 | from .. import models
7 |
8 | register = template.Library()
9 |
10 | NEWS_ON_PAGE = getattr(settings, 'NEWS_ON_PAGE', 1)
11 |
12 |
13 | @register.inclusion_tag('news/_last_news.html')
14 | def last_news():
15 | return {
16 | 'news': models.News.objects.approved()[:NEWS_ON_PAGE]
17 | }
18 |
--------------------------------------------------------------------------------
/src/static/leeflet_0.4.5/plugins/markercluster/MarkerCluster.css:
--------------------------------------------------------------------------------
1 | .leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow {
2 | -webkit-transition: -webkit-transform 0.25s ease-out, opacity 0.25s ease-in;
3 | -moz-transition: -moz-transform 0.25s ease-out, opacity 0.25s ease-in;
4 | -o-transition: -o-transform 0.25s ease-out, opacity 0.25s ease-in;
5 | transition: transform 0.25s ease-out, opacity 0.25s ease-in;
6 | }
7 |
--------------------------------------------------------------------------------
/src/examples/templatetags/example_tags.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from django import template
3 | from src.examples.models import Category
4 |
5 | register = template.Library()
6 |
7 |
8 | @register.inclusion_tag('examples/_examples_menu.html')
9 | def examples_menu():
10 | return {
11 | 'categories': Category.objects.all()
12 | }
13 |
14 |
15 | @register.filter
16 | def can_edit(obj, user):
17 | return obj.can_edit(user)
18 |
--------------------------------------------------------------------------------
/src/static/theme/font-awesome-4.0.3/less/bordered-pulled.less:
--------------------------------------------------------------------------------
1 | // Bordered & Pulled
2 | // -------------------------
3 |
4 | .@{fa-css-prefix}-border {
5 | padding: .2em .25em .15em;
6 | border: solid .08em @fa-border-color;
7 | border-radius: .1em;
8 | }
9 |
10 | .pull-right { float: right; }
11 | .pull-left { float: left; }
12 |
13 | .@{fa-css-prefix} {
14 | &.pull-left { margin-right: .3em; }
15 | &.pull-right { margin-left: .3em; }
16 | }
17 |
--------------------------------------------------------------------------------
/sentry/tests/models.py:
--------------------------------------------------------------------------------
1 | from django.db import models
2 | from sentry.models import GzippedDictField
3 |
4 | class TestModel(models.Model):
5 | data = GzippedDictField(blank=True, null=True)
6 |
7 | def __unicode__(self):
8 | return unicode(self.data)
9 |
10 | class DuplicateKeyModel(models.Model):
11 | foo = models.IntegerField(unique=True, default=1)
12 |
13 | def __unicode__(self):
14 | return unicode(self.foo)
15 |
--------------------------------------------------------------------------------
/src/header_messages/admin.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from django import forms
4 | from django.contrib import admin
5 | from django.db import models
6 |
7 | from .models import HeaderMessage
8 |
9 |
10 | class HeaderMessageAdmin(admin.ModelAdmin):
11 | list_display = ['message']
12 | formfield_overrides = {
13 | models.CharField: {'widget': forms.Textarea},
14 | }
15 |
16 | admin.site.register(HeaderMessage, HeaderMessageAdmin)
17 |
--------------------------------------------------------------------------------
/src/static/theme/font-awesome-4.0.3/less/rotated-flipped.less:
--------------------------------------------------------------------------------
1 | // Rotated & Flipped Icons
2 | // -------------------------
3 |
4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); }
5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); }
6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); }
7 |
8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); }
9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); }
10 |
--------------------------------------------------------------------------------
/src/static/theme/font-awesome-4.0.3/scss/_bordered-pulled.scss:
--------------------------------------------------------------------------------
1 | // Bordered & Pulled
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix}-border {
5 | padding: .2em .25em .15em;
6 | border: solid .08em $fa-border-color;
7 | border-radius: .1em;
8 | }
9 |
10 | .pull-right { float: right; }
11 | .pull-left { float: left; }
12 |
13 | .#{$fa-css-prefix} {
14 | &.pull-left { margin-right: .3em; }
15 | &.pull-right { margin-left: .3em; }
16 | }
17 |
--------------------------------------------------------------------------------
/src/static/theme/font-awesome-4.0.3/less/larger.less:
--------------------------------------------------------------------------------
1 | // Icon Sizes
2 | // -------------------------
3 |
4 | /* makes the font 33% larger relative to the icon container */
5 | .@{fa-css-prefix}-lg {
6 | font-size: (4em / 3);
7 | line-height: (3em / 4);
8 | vertical-align: -15%;
9 | }
10 | .@{fa-css-prefix}-2x { font-size: 2em; }
11 | .@{fa-css-prefix}-3x { font-size: 3em; }
12 | .@{fa-css-prefix}-4x { font-size: 4em; }
13 | .@{fa-css-prefix}-5x { font-size: 5em; }
14 |
--------------------------------------------------------------------------------
/src/header_messages/tests.py:
--------------------------------------------------------------------------------
1 | """
2 | This file demonstrates writing tests using the unittest module. These will pass
3 | when you run "manage.py test".
4 |
5 | Replace this with more appropriate tests for your application.
6 | """
7 |
8 | from django.test import TestCase
9 |
10 |
11 | class SimpleTest(TestCase):
12 | def test_basic_addition(self):
13 | """
14 | Tests that 1 + 1 always equals 2.
15 | """
16 | self.assertEqual(1 + 1, 2)
17 |
--------------------------------------------------------------------------------
/src/static/theme/font-awesome-4.0.3/scss/_larger.scss:
--------------------------------------------------------------------------------
1 | // Icon Sizes
2 | // -------------------------
3 |
4 | /* makes the font 33% larger relative to the icon container */
5 | .#{$fa-css-prefix}-lg {
6 | font-size: (4em / 3);
7 | line-height: (3em / 4);
8 | vertical-align: -15%;
9 | }
10 | .#{$fa-css-prefix}-2x { font-size: 2em; }
11 | .#{$fa-css-prefix}-3x { font-size: 3em; }
12 | .#{$fa-css-prefix}-4x { font-size: 4em; }
13 | .#{$fa-css-prefix}-5x { font-size: 5em; }
14 |
--------------------------------------------------------------------------------
/src/templates/examples/_examples_menu.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/accounts/templates/accounts/_announcements.html:
--------------------------------------------------------------------------------
1 | {% load i18n markup %}
2 | {% if announcements %}
3 |
4 | {% for obj in announcements %}
5 |
6 | {% if obj.link %}
7 |
8 | {% else %}
9 |
{{ obj }}
10 | {% endif %}
11 | {{ obj.content|markdown }}
12 |
13 | {% endfor %}
14 |
15 | {% endif %}
--------------------------------------------------------------------------------
/addon/wsgi.under_construction.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | import os
4 |
5 |
6 | def application(environ, start_response):
7 | status = '200 OK'
8 | tpl_name = os.path.join(
9 | os.path.dirname(__file__),
10 | 'under_construction.html')
11 | html = open(tpl_name).read()
12 | response_headers = [('Content-type', 'text/html'),
13 | ('Content-Length', str(len(html)))]
14 | start_response(status, response_headers)
15 | return [html]
16 |
--------------------------------------------------------------------------------
/lib/oembed/tests/tests/resources.py:
--------------------------------------------------------------------------------
1 | import oembed
2 |
3 | from oembed.tests.tests.base import BaseOEmbedTestCase
4 | from oembed.resources import OEmbedResource
5 |
6 |
7 | class ResourceTestCase(BaseOEmbedTestCase):
8 | def test_json_handling(self):
9 | resource = oembed.site.embed(self.category_url)
10 |
11 | json = resource.json
12 | another_resource = OEmbedResource.create_json(json)
13 |
14 | self.assertEqual(resource.get_data(), another_resource.get_data())
15 |
--------------------------------------------------------------------------------
/src/accounts/templates/accounts/_menu.html:
--------------------------------------------------------------------------------
1 | {% if user.is_authenticated %}
2 |
13 | {% endif %}
--------------------------------------------------------------------------------
/src/accounts/templates/accounts/email_new_user.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}{% blocktrans with current_site.name as site_name %}
2 | Thanks for registering on {{ site_name }}.
3 |
4 |
5 | Since you registered via social network, your automatically assigned email is {{ email }} and your password is {{ password }}.
6 | You can use it to login, if something happens with authentication via external services.
7 |
8 |
9 | With best regards, {{ site_name }} team.
10 | {% endblocktrans %}
--------------------------------------------------------------------------------
/src/static/theme/font-awesome-4.0.3/less/list.less:
--------------------------------------------------------------------------------
1 | // List Icons
2 | // -------------------------
3 |
4 | .@{fa-css-prefix}-ul {
5 | padding-left: 0;
6 | margin-left: @fa-li-width;
7 | list-style-type: none;
8 | > li { position: relative; }
9 | }
10 | .@{fa-css-prefix}-li {
11 | position: absolute;
12 | left: -@fa-li-width;
13 | width: @fa-li-width;
14 | top: (2em / 14);
15 | text-align: center;
16 | &.@{fa-css-prefix}-lg {
17 | left: -@fa-li-width + (4em / 14);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/static/theme/font-awesome-4.0.3/scss/_rotated-flipped.scss:
--------------------------------------------------------------------------------
1 | // Rotated & Flipped Icons
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); }
5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); }
6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); }
7 |
8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); }
9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); }
10 |
--------------------------------------------------------------------------------
/src/videos/templatetags/videos_tags.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from random import choice
4 |
5 | from django import template
6 |
7 | from .. import models
8 |
9 | register = template.Library()
10 |
11 |
12 | @register.inclusion_tag('videos/_last_videos.html', takes_context=True)
13 | def last_videos(context):
14 | ids = models.Video.objects.values_list('pk', flat=True)
15 | if ids:
16 | context['index_video'] = models.Video.objects.get(pk=choice(ids))
17 | return context
18 |
--------------------------------------------------------------------------------
/src/examples/urls.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from django.conf.urls import patterns, url
4 | from . import feeds
5 |
6 | urlpatterns = patterns('src.examples.views',
7 | url(r'^$', 'index', name='index'),
8 | url(r'^add/$', 'add', name='add'),
9 | url(r'^(?P\d+)/$', 'detail', name='detail'),
10 | url(r'^(?P\d+)/edit/$', 'edit', name='edit'),
11 | url(r'^c(?P\d+)/$', 'category', name='category'),
12 | url(r'^feed/$', feeds.LatestExamplesFeed(), name='rss'),
13 | )
14 |
--------------------------------------------------------------------------------
/src/static/theme/font-awesome-4.0.3/scss/_list.scss:
--------------------------------------------------------------------------------
1 | // List Icons
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix}-ul {
5 | padding-left: 0;
6 | margin-left: $fa-li-width;
7 | list-style-type: none;
8 | > li { position: relative; }
9 | }
10 | .#{$fa-css-prefix}-li {
11 | position: absolute;
12 | left: -$fa-li-width;
13 | width: $fa-li-width;
14 | top: (2em / 14);
15 | text-align: center;
16 | &.#{$fa-css-prefix}-lg {
17 | left: -$fa-li-width + (4em / 14);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/templates/links/_useful_links.html:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/src/static/theme/font-awesome-4.0.3/less/font-awesome.less:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome 4.0.3 by @davegandy - http://fontawesome.io - @fontawesome
3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
4 | */
5 |
6 | @import "variables";
7 | @import "mixins";
8 | @import "path";
9 | @import "core";
10 | @import "larger";
11 | @import "fixed-width";
12 | @import "list";
13 | @import "bordered-pulled";
14 | @import "spinning";
15 | @import "rotated-flipped";
16 | @import "stacked";
17 | @import "icons";
18 |
--------------------------------------------------------------------------------
/src/static/theme/font-awesome-4.0.3/scss/font-awesome.scss:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome 4.0.3 by @davegandy - http://fontawesome.io - @fontawesome
3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
4 | */
5 |
6 | @import "variables";
7 | @import "mixins";
8 | @import "path";
9 | @import "core";
10 | @import "larger";
11 | @import "fixed-width";
12 | @import "list";
13 | @import "bordered-pulled";
14 | @import "spinning";
15 | @import "rotated-flipped";
16 | @import "stacked";
17 | @import "icons";
18 |
--------------------------------------------------------------------------------
/src/templates/main/_toc.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 |
--------------------------------------------------------------------------------
/src/main/migrations_auth/0002_alter_permission_name_max_length.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from __future__ import unicode_literals
3 |
4 | from django.db import migrations, models
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | dependencies = [
10 | ('auth', '0001_initial'),
11 | ]
12 |
13 | operations = [
14 | migrations.AlterField(
15 | model_name='permission',
16 | name='name',
17 | field=models.CharField(max_length=255, verbose_name='name'),
18 | ),
19 | ]
20 |
--------------------------------------------------------------------------------
/src/static/leeflet_0.4.5/src/layer/vector/canvas/Circle.Canvas.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Circle canvas specific drawing parts.
3 | */
4 |
5 | L.Circle.include(!L.Path.CANVAS ? {} : {
6 | _drawPath: function () {
7 | var p = this._point;
8 | this._ctx.beginPath();
9 | this._ctx.arc(p.x, p.y, this._radius, 0, Math.PI * 2, false);
10 | },
11 |
12 | _containsPoint: function (p) {
13 | var center = this._point,
14 | w2 = this.options.stroke ? this.options.weight / 2 : 0;
15 |
16 | return (p.distanceTo(center) <= this._radius + w2);
17 | }
18 | });
19 |
--------------------------------------------------------------------------------
/src/comments/admin.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from django.contrib import admin
4 | from django import forms
5 |
6 | from . import models
7 |
8 |
9 | class CommentAdminForm(forms.ModelForm):
10 |
11 | class Meta:
12 | model = models.Comment
13 | fields = ['content']
14 |
15 |
16 | class CommentAdmin(admin.ModelAdmin):
17 | form = CommentAdminForm
18 | list_display = ['content', 'content_type', 'user', 'submit_date']
19 | search_fields = ('content',)
20 |
21 | admin.site.register(models.Comment, CommentAdmin)
22 |
--------------------------------------------------------------------------------
/src/main/admin.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from django.contrib import admin
4 |
5 | from . import models
6 | from . import forms
7 |
8 |
9 | class BookAdmin(admin.ModelAdmin):
10 | list_display = ['name', 'created']
11 | form = forms.BookAdminForm
12 |
13 | admin.site.register(models.Book, BookAdmin)
14 |
15 |
16 | class PageAdmin(admin.ModelAdmin):
17 | list_display = ['name', 'book', 'chapter', 'section']
18 | list_filter = ['book']
19 | search_fields = ('name', 'content')
20 |
21 | admin.site.register(models.Page, PageAdmin)
22 |
--------------------------------------------------------------------------------
/src/main/migrations_auth/0002_auto_20150308_1901.py:
--------------------------------------------------------------------------------
1 | from __future__ import unicode_literals
2 |
3 | from django.db import models, migrations
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('auth', '0001_initial'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='user',
15 | name='email',
16 | field=models.EmailField(unique=True, max_length=75, verbose_name='email address'),
17 | preserve_default=True,
18 | ),
19 | ]
--------------------------------------------------------------------------------
/src/main/migrations_auth/0006_require_contenttypes_0002.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from __future__ import unicode_literals
3 |
4 | from django.db import migrations
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | dependencies = [
10 | ('auth', '0005_alter_user_last_login_null'),
11 | ('contenttypes', '0002_remove_content_type_name'),
12 | ]
13 |
14 | operations = [
15 | # Ensure the contenttypes migration is applied before sending
16 | # post_migrate signals (which create ContentTypes).
17 | ]
18 |
--------------------------------------------------------------------------------
/sentry/routers.py:
--------------------------------------------------------------------------------
1 | from sentry import conf
2 |
3 | class SentryRouter(object):
4 | def db_for_write(self, model, **hints):
5 | if model._meta.app_label == 'sentry':
6 | return conf.DATABASE_USING
7 |
8 | def db_for_read(self, model, **hints):
9 | return self.db_for_write(model, **hints)
10 |
11 | def allow_syncdb(self, db, model):
12 | sentry_db = conf.DATABASE_USING
13 | if not sentry_db:
14 | return None
15 | if model._meta.app_label == 'sentry' and db != sentry_db:
16 | return False
--------------------------------------------------------------------------------
/src/static/theme/css/admin.css:
--------------------------------------------------------------------------------
1 | #header {
2 | background-color: #0c3907;
3 | }
4 |
5 | #header #branding h1 {
6 | margin: 0;
7 | padding: 5px 10px;
8 | text-indent: -9999px;
9 | background: transparent url(../images/logo.png) 10px 5px no-repeat;
10 | height: 51px;
11 | width: 243px;
12 | }
13 |
14 | div.breadcrumbs {
15 | display: block;
16 | padding: 10px 15px;
17 | border: 0;
18 | background-position: 0 -8px;
19 | border-bottom: 1px solid #ededed;
20 | }
21 |
22 | div.breadcrumbs a {
23 | display: inline;
24 | }
25 |
--------------------------------------------------------------------------------
/sentry/plugins/sentry_urls/templates/sentry/plugins/sentry_urls/widget.html:
--------------------------------------------------------------------------------
1 | {% load sentry_helpers %}
2 |
3 | {% with group.unique_urls|slice:"10" as unique_urls %}
4 | {% if unique_urls %}
5 | URLs
6 |
7 |
8 | {% for link, priority in unique_urls|with_priority:"times_seen" %}
9 | {{ link.times_seen }} {{ link.url }}
10 | {% endfor %}
11 |
12 | {% endif %}
13 | {% endwith %}
--------------------------------------------------------------------------------
/src/context_processors.py:
--------------------------------------------------------------------------------
1 | from django import get_version
2 | from django.conf import settings
3 | from django.contrib.sites.shortcuts import get_current_site
4 |
5 |
6 | def custom(request):
7 | context = {
8 | 'django_version': get_version(),
9 | 'settings': settings,
10 | 'site': get_current_site(request),
11 | 'securelayer': False,
12 | 'DJANGO_DOCUMENTATION_URL': settings.DJANGO_DOCUMENTATION_URL,
13 | 'DJANGO_DOCUMENTATION_SITEMAP_URL': settings.DJANGO_DOCUMENTATION_SITEMAP_URL
14 | }
15 | return context
16 |
--------------------------------------------------------------------------------
/src/templates/comments/list_with_form.html:
--------------------------------------------------------------------------------
1 | {% load i18n comments_tags %}
2 |
--------------------------------------------------------------------------------
/addon/xapian_install.sh:
--------------------------------------------------------------------------------
1 | wget http://oligarchy.co.uk/xapian/1.2.7/xapian-core-1.2.7.tar.gz
2 | tar xzf xapian-core-1.2.7.tar.gz
3 | cd xapian-core-1.2.7
4 | ./configure --prefix=${VIRTUAL_ENV} && make && make install
5 | cd -
6 |
7 | wget http://oligarchy.co.uk/xapian/1.2.7/xapian-bindings-1.2.7.tar.gz
8 | tar xzf xapian-bindings-1.2.7.tar.gz
9 | cd xapian-bindings-1.2.7
10 | ./configure --prefix=${VIRTUAL_ENV} --with-python \
11 | --without-php --without-ruby --without-tcl --without-csharp \
12 | --without-java --without-perl --without-lua && make && make install
13 | cd -
14 |
--------------------------------------------------------------------------------
/src/accounts/migrations/0003_fix_managers.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from __future__ import unicode_literals
3 |
4 | from django.db import models, migrations
5 | import src.accounts.models
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('accounts', '0002_userrepository'),
12 | ]
13 |
14 | operations = [
15 | migrations.AlterModelManagers(
16 | name='user',
17 | managers=[
18 | (b'objects', src.accounts.models.UserManager()),
19 | ],
20 | ),
21 | ]
22 |
--------------------------------------------------------------------------------
/src/main/migrations_auth/0005_alter_user_last_login_null.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from __future__ import unicode_literals
3 |
4 | from django.db import migrations, models
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | dependencies = [
10 | ('auth', '0004_alter_user_username_opts'),
11 | ]
12 |
13 | operations = [
14 | migrations.AlterField(
15 | model_name='user',
16 | name='last_login',
17 | field=models.DateTimeField(null=True, verbose_name='last login', blank=True),
18 | ),
19 | ]
20 |
--------------------------------------------------------------------------------
/src/static/leeflet_0.4.5/src/geo/crs/CRS.EPSG3857.js:
--------------------------------------------------------------------------------
1 |
2 | L.CRS.EPSG3857 = L.Util.extend({}, L.CRS, {
3 | code: 'EPSG:3857',
4 |
5 | projection: L.Projection.SphericalMercator,
6 | transformation: new L.Transformation(0.5 / Math.PI, 0.5, -0.5 / Math.PI, 0.5),
7 |
8 | project: function (latlng) { // (LatLng) -> Point
9 | var projectedPoint = this.projection.project(latlng),
10 | earthRadius = 6378137;
11 | return projectedPoint.multiplyBy(earthRadius);
12 | }
13 | });
14 |
15 | L.CRS.EPSG900913 = L.Util.extend({}, L.CRS.EPSG3857, {
16 | code: 'EPSG:900913'
17 | });
18 |
--------------------------------------------------------------------------------
/src/examples/migrations/0002_example_is_draft_for.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from __future__ import unicode_literals
3 |
4 | from django.db import migrations, models
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | dependencies = [
10 | ('examples', '0001_initial'),
11 | ]
12 |
13 | operations = [
14 | migrations.AddField(
15 | model_name='example',
16 | name='is_draft_for',
17 | field=models.ForeignKey(verbose_name='is draft for', blank=True, to='examples.Example', null=True),
18 | ),
19 | ]
20 |
--------------------------------------------------------------------------------
/src/news/views.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from django.shortcuts import get_object_or_404
4 | from django.views.generic import ListView
5 |
6 | from .. decorators import render_to
7 | from .models import News
8 |
9 |
10 | class NewsListView(ListView):
11 | queryset = News.objects.approved()
12 | template_name = 'news/index.html'
13 | paginate_by = 10
14 |
15 | index = NewsListView.as_view()
16 |
17 |
18 | @render_to('news/news.html')
19 | def news(request, pk):
20 | return {
21 | 'obj': get_object_or_404(News.objects.approved(), pk=pk)
22 | }
23 |
--------------------------------------------------------------------------------
/addon/dump.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | NAME="$1"
4 | CONF=".${NAME}.conf"
5 |
6 | test -f ${CONF} || exit 1
7 | source ${CONF}
8 |
9 | MYSQLPATH=/usr/local/bin
10 | DF="/home/rpopov/dumps/${NAME}/`date '+%Y%m%d'`.sql"
11 |
12 | mkdir -p "/home/rpopov/dumps/${NAME}"
13 |
14 | # make database dump
15 | $MYSQLPATH/mysqldump -h ${DBHOST} -u ${DBUSER} -p${DBPASS} ${DBNAME} > $DF
16 |
17 | # compress it
18 | /usr/bin/bzip2 $DF
19 |
20 | # check for old dumps, keep the last week only, the rest will be deleted
21 | find "/home/rpopov/dumps/${NAME}" -name '*.dump.bz2' -mtime +7 -delete
22 | exit 0
23 |
--------------------------------------------------------------------------------
/src/accounts/templates/accounts/password_reset_done.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% load i18n %}
4 |
5 | {% block title %}{% trans 'Reset password' %} | {{ block.super }}{% endblock %}
6 |
7 | {% block page %}
8 |
9 |
10 |
11 |
12 |
{% trans 'We sent you email that includes a password reset link.' %}
13 |
14 |
15 |
16 |
17 | {% endblock %}
18 |
--------------------------------------------------------------------------------
/src/doc_comments/urls.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from django.conf.urls import patterns, url
4 |
5 | urlpatterns = patterns('src.doc_comments.views',
6 | url(r'^add/$', 'add', name='add'),
7 | url(r'^close_comment/$', 'close_comment', name='close_comment'),
8 | url(r'^accept_comment/$', 'accept_comment', name='accept_comment'),
9 | url(r'^get_login_status/$', 'get_login_status', name='get_login_status'),
10 | url(r'^load_comments/$', 'load_comments', name='load_comments'),
11 | url(r'^load_comments_info/$', 'load_comments_info', name='load_comments_info')
12 | )
13 |
--------------------------------------------------------------------------------
/lib/oembed/exceptions.py:
--------------------------------------------------------------------------------
1 | class OEmbedException(Exception):
2 | pass
3 |
4 | class OEmbedInvalidResource(OEmbedException):
5 | pass
6 |
7 | class OEmbedMissingEndpoint(OEmbedException):
8 | pass
9 |
10 | class OEmbedBadRequest(OEmbedException):
11 | pass
12 |
13 | class OEmbedHTTPException(OEmbedException):
14 | pass
15 |
16 | class AlreadyRegistered(OEmbedException):
17 | """Raised when a model is already registered with a site."""
18 | pass
19 |
20 | class NotRegistered(OEmbedException):
21 | """Raised when a model is not registered with a site."""
22 | pass
23 |
--------------------------------------------------------------------------------
/src/static/leeflet_0.4.5/plugins/markercluster/MarkerCluster.Default.ie.css:
--------------------------------------------------------------------------------
1 | /* IE 6-8 fallback colors */
2 | .marker-cluster-small {
3 | background-color: rgb(181, 226, 140);
4 | }
5 | .marker-cluster-small div {
6 | background-color: rgb(110, 204, 57);
7 | }
8 |
9 | .marker-cluster-medium {
10 | background-color: rgb(241, 211, 87);
11 | }
12 | .marker-cluster-medium div {
13 | background-color: rgb(240, 194, 12);
14 | }
15 |
16 | .marker-cluster-large {
17 | background-color: rgb(253, 156, 115);
18 | }
19 | .marker-cluster-large div {
20 | background-color: rgb(241, 128, 23);
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/sentry/plugins/sentry_redmine/conf.py:
--------------------------------------------------------------------------------
1 | from django.conf import settings
2 |
3 | # Either API_KEY or USERNAME/PASSWORD should be specified for non-anonymous
4 | # XXX: In redmine as of Oct 15 2010 API KEY auth does not support creating issues
5 |
6 | REDMINE_API_KEY = getattr(settings, 'SENTRY_REDMINE_API_KEY', None)
7 | REDMINE_URL = getattr(settings, 'SENTRY_REDMINE_URL', None)
8 | REDMINE_PROJECT_SLUG = getattr(settings, 'SENTRY_REDMINE_PROJECT_SLUG', None)
9 |
10 | REDMINE_USERNAME = getattr(settings, 'SENTRY_REDMINE_USERNAME', None)
11 | REDMINE_PASSWORD = getattr(settings, 'SENTRY_REDMINE_PASSWORd', None)
12 |
--------------------------------------------------------------------------------
/src/static/theme/font-awesome-4.0.3/less/stacked.less:
--------------------------------------------------------------------------------
1 | // Stacked Icons
2 | // -------------------------
3 |
4 | .@{fa-css-prefix}-stack {
5 | position: relative;
6 | display: inline-block;
7 | width: 2em;
8 | height: 2em;
9 | line-height: 2em;
10 | vertical-align: middle;
11 | }
12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x {
13 | position: absolute;
14 | left: 0;
15 | width: 100%;
16 | text-align: center;
17 | }
18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; }
19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; }
20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; }
21 |
--------------------------------------------------------------------------------
/sentry/plugins/sentry_sites/templates/sentry/plugins/sentry_sites/widget.html:
--------------------------------------------------------------------------------
1 | {% load sentry_helpers %}
2 |
3 | {% with group.unique_sites|slice:"10" as unique_sites %}
4 | {% if unique_sites %}
5 | Sites
6 |
7 |
8 | {% for site, priority in unique_sites|with_priority:"times_seen" %}
9 | {{ site.times_seen }} {{ site.site }}
10 | {% endfor %}
11 |
12 | {% endif %}
13 | {% endwith %}
14 |
--------------------------------------------------------------------------------
/src/static/theme/font-awesome-4.0.3/scss/_stacked.scss:
--------------------------------------------------------------------------------
1 | // Stacked Icons
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix}-stack {
5 | position: relative;
6 | display: inline-block;
7 | width: 2em;
8 | height: 2em;
9 | line-height: 2em;
10 | vertical-align: middle;
11 | }
12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x {
13 | position: absolute;
14 | left: 0;
15 | width: 100%;
16 | text-align: center;
17 | }
18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; }
19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; }
20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; }
21 |
--------------------------------------------------------------------------------
/lib/oembed/tests/urls.py:
--------------------------------------------------------------------------------
1 | from django.conf.urls.defaults import *
2 | from django.contrib import admin
3 |
4 | admin.autodiscover()
5 |
6 | def null_view(*args, **kwargs):
7 | pass
8 |
9 | urlpatterns = patterns('',
10 | url(r'^admin/', include(admin.site.urls)),
11 | url(r'^oembed/', include('oembed.urls')),
12 | url(r'^testapp/blog/(?P\d+)/(?P\w+)/(?P\d+)/(?P[\w-]+)/$', null_view, name='test_blog_detail'),
13 | url(r'^testapp/rich/([a-z-]+)/$', null_view, name='test_rich_detail'),
14 | url(r'^testapp/category/(\d+)/$', null_view, name='test_category_detail'),
15 | )
16 |
--------------------------------------------------------------------------------
/src/static/leeflet_0.4.5/src/core/Handler.js:
--------------------------------------------------------------------------------
1 | /*
2 | * L.Handler classes are used internally to inject interaction features to classes like Map and Marker.
3 | */
4 |
5 | L.Handler = L.Class.extend({
6 | initialize: function (map) {
7 | this._map = map;
8 | },
9 |
10 | enable: function () {
11 | if (this._enabled) { return; }
12 |
13 | this._enabled = true;
14 | this.addHooks();
15 | },
16 |
17 | disable: function () {
18 | if (!this._enabled) { return; }
19 |
20 | this._enabled = false;
21 | this.removeHooks();
22 | },
23 |
24 | enabled: function () {
25 | return !!this._enabled;
26 | }
27 | });
28 |
--------------------------------------------------------------------------------
/src/templates/comments/list.html:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/src/templates/_addthis.html:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
--------------------------------------------------------------------------------
/src/main/migrations_auth/0003_alter_user_email_max_length.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from __future__ import unicode_literals
3 |
4 | from django.db import migrations, models
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | dependencies = [
10 | ('auth', '0002_alter_permission_name_max_length'),
11 | ('auth', '0002_auto_20150308_1901'),
12 | ]
13 |
14 | operations = [
15 | migrations.AlterField(
16 | model_name='user',
17 | name='email',
18 | field=models.EmailField(max_length=254, verbose_name='email address', blank=True),
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/sentry/templates/sentry/group/message_list.html:
--------------------------------------------------------------------------------
1 | {% extends "sentry/group/details.html" %}
2 |
3 | {% load paging_extras %}
4 |
5 | {% block inner %}
6 | Message List
7 | {% paginate message_list from request as message_list per_page 15 %}
8 |
9 | {{ message_list.paging }}
10 |
11 |
12 | {% for message in message_list.objects %}
13 | {% include "sentry/partial/_message.html" %}
14 | {% endfor %}
15 |
16 |
17 | {{ message_list.paging }}
18 |
19 | {% endblock %}
--------------------------------------------------------------------------------
/sentry/plugins/sentry_servers/templates/sentry/plugins/sentry_servers/widget.html:
--------------------------------------------------------------------------------
1 | {% load sentry_helpers %}
2 |
3 | {% with group.unique_servers|slice:"10" as unique_servers %}
4 | {% if unique_servers %}
5 | Servers
6 |
7 |
8 | {% for server, priority in unique_servers|with_priority:"times_seen" %}
9 | {{ server.times_seen }} {{ server.server_name }}
10 | {% endfor %}
11 |
12 | {% endif %}
13 | {% endwith %}
14 |
--------------------------------------------------------------------------------
/src/static/leeflet_0.4.5/src/map/handler/Map.DoubleClickZoom.js:
--------------------------------------------------------------------------------
1 | /*
2 | * L.Handler.DoubleClickZoom is used internally by L.Map to add double-click zooming.
3 | */
4 |
5 | L.Map.mergeOptions({
6 | doubleClickZoom: true
7 | });
8 |
9 | L.Map.DoubleClickZoom = L.Handler.extend({
10 | addHooks: function () {
11 | this._map.on('dblclick', this._onDoubleClick);
12 | },
13 |
14 | removeHooks: function () {
15 | this._map.off('dblclick', this._onDoubleClick);
16 | },
17 |
18 | _onDoubleClick: function (e) {
19 | this.setView(e.latlng, this._zoom + 1);
20 | }
21 | });
22 |
23 | L.Map.addInitHook('addHandler', 'doubleClickZoom', L.Map.DoubleClickZoom);
--------------------------------------------------------------------------------
/src/forum/templates/djforum/base.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 | {% load staticfiles i18n %}
3 |
4 | {% block title %}{% trans "Forum" %} | {{ block.super }}{% endblock %}
5 |
6 | {% block head %}
7 | {{ block.super }}
8 |
9 |
10 |
11 |
12 | {% endblock %}
13 |
14 | {% block page %}
15 |
16 | {% block content %}{% endblock %}
17 |
18 | {% endblock %}
19 |
--------------------------------------------------------------------------------
/src/links/admin.py:
--------------------------------------------------------------------------------
1 | from .models import UsefulLink, SourceCode, Archive
2 | from django.contrib import admin
3 | from ordered_model.admin import OrderedModelAdmin
4 |
5 |
6 | class UsefulLinkAdmin(OrderedModelAdmin):
7 | list_display = ('name', 'url', 'move_up_down_links')
8 |
9 |
10 | class SourceCodeAdmin(OrderedModelAdmin):
11 | list_display = ('name', 'url', 'move_up_down_links')
12 |
13 |
14 | class ArchiveAdmin(OrderedModelAdmin):
15 | list_display = ('name', 'url', 'move_up_down_links')
16 |
17 |
18 | admin.site.register(UsefulLink, UsefulLinkAdmin)
19 | admin.site.register(SourceCode, SourceCodeAdmin)
20 | admin.site.register(Archive, ArchiveAdmin)
21 |
--------------------------------------------------------------------------------
/sentry/plugins/sentry_urls/templates/sentry/plugins/sentry_urls/index.html:
--------------------------------------------------------------------------------
1 | {% extends "sentry/group/details.html" %}
2 |
3 | {% load paging_extras %}
4 |
5 | {% block inner %}
6 | URL List
7 | {% paginate group.unique_urls from request as url_list per_page 25 %}
8 |
9 | {{ url_list.paging }}
10 |
11 |
12 | {% for link in url_list.objects %}
13 | {{ link.times_seen }} {{ link.url }}
14 | {% endfor %}
15 |
16 |
17 | {{ url_list.paging }}
18 |
19 | {% endblock %}
--------------------------------------------------------------------------------
/src/static/leeflet_0.4.5/src/dom/transition/Transition.js:
--------------------------------------------------------------------------------
1 | L.Transition = L.Class.extend({
2 | includes: L.Mixin.Events,
3 |
4 | statics: {
5 | CUSTOM_PROPS_SETTERS: {
6 | position: L.DomUtil.setPosition
7 | //TODO transform custom attr
8 | },
9 |
10 | implemented: function () {
11 | return L.Transition.NATIVE || L.Transition.TIMER;
12 | }
13 | },
14 |
15 | options: {
16 | easing: 'ease',
17 | duration: 0.5
18 | },
19 |
20 | _setProperty: function (prop, value) {
21 | var setters = L.Transition.CUSTOM_PROPS_SETTERS;
22 | if (prop in setters) {
23 | setters[prop](this._el, value);
24 | } else {
25 | this._el.style[prop] = value;
26 | }
27 | }
28 | });
29 |
--------------------------------------------------------------------------------
/src/accounts/tests/factories.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from __future__ import absolute_import, unicode_literals
3 |
4 | import factory
5 |
6 | from src.accounts.models import User
7 |
8 |
9 | class UserFactory(factory.django.DjangoModelFactory):
10 |
11 | class Meta:
12 | model = User
13 |
14 | username = factory.Sequence(lambda i: 'username%s' % i)
15 | first_name = factory.Sequence(lambda i: 'first_name%s' % i)
16 | last_name = factory.Sequence(lambda i: 'last_name%s' % i)
17 | email = factory.LazyAttribute(lambda o: '%s@example.org' % o.username)
18 | is_valid_email = True
19 | password = factory.PostGenerationMethodCall('set_password', 'defaultpassword')
20 |
--------------------------------------------------------------------------------
/src/videos/forms.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from django import forms
4 | from django.utils.translation import ugettext_lazy as _
5 |
6 | import oembed
7 |
8 | from . import models
9 |
10 |
11 | class VideoAdminForm(forms.ModelForm):
12 |
13 | class Meta:
14 | model = models.Video
15 | fields = '__all__'
16 |
17 | def clean_video(self):
18 | video_link = self.cleaned_data.get('video')
19 |
20 | if video_link:
21 | try:
22 | oembed.site.embed(video_link)
23 | except oembed.exceptions.OEmbedException:
24 | raise forms.ValidationError(_(u'Incorrect video URL'))
25 |
26 | return video_link
27 |
--------------------------------------------------------------------------------
/sentry/client/log/__init__.py:
--------------------------------------------------------------------------------
1 | from sentry.client.base import SentryClient
2 |
3 | import logging
4 | import sys
5 |
6 | class LoggingSentryClient(SentryClient):
7 | logger_name = 'sentry'
8 | default_level = logging.ERROR
9 |
10 | def __init__(self, *args, **kwargs):
11 | super(LoggingSentryClient, self).__init__(*args, **kwargs)
12 | self.logger = logging.getLogger(self.logger_name)
13 |
14 | def send(self, **kwargs):
15 | exc_info = sys.exc_info()
16 | self.logger.log(kwargs.pop('level', None) or self.default_level,
17 | kwargs.pop('message', None) or exc_info[0],
18 | exc_info=exc_info, extra=kwargs)
19 |
--------------------------------------------------------------------------------
/src/utils/mail.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from django.template.loader import render_to_string
4 | from django.contrib.sites.models import Site
5 | from django.core.mail import EmailMessage
6 |
7 |
8 | def send_templated_email(to, subject, body_template, context,
9 | from_email=None, ct="html", fail_silently=False):
10 |
11 | if not isinstance(to, list):
12 | to = [to]
13 |
14 | context['domain'] = Site.objects.get_current().domain
15 | context['protocol'] = 'http'
16 | message = render_to_string(body_template, context)
17 |
18 | email = EmailMessage(subject, message, from_email, to)
19 | email.content_subtype = ct
20 | email.send(fail_silently)
21 |
--------------------------------------------------------------------------------
/sentry/plugins/sentry_sites/templates/sentry/plugins/sentry_sites/index.html:
--------------------------------------------------------------------------------
1 | {% extends "sentry/group/details.html" %}
2 |
3 | {% load paging_extras %}
4 |
5 | {% block inner %}
6 | Site List
7 | {% paginate group.unique_sites from request as site_list per_page 25 %}
8 |
9 | {{ site_list.paging }}
10 |
11 |
12 | {% for site in site_list.objects %}
13 | {{ site.times_seen }} {{ site.site }}
14 | {% endfor %}
15 |
16 |
17 | {{ site_list.paging }}
18 |
19 | {% endblock %}
20 |
--------------------------------------------------------------------------------
/src/accounts/templates/accounts/password_reset_complete.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% load i18n %}
4 |
5 | {% block title %}{% trans 'Reset password' %} | {{ block.super }}{% endblock %}
6 |
7 | {% block page %}
8 |
9 |
10 |
11 |
12 |
{% trans 'Password reset complete' %}
13 | {% trans "Your password has been set. You may go ahead and log in now." %}
14 |
{% trans 'Log in' %}
15 |
16 |
17 |
18 |
19 | {% endblock %}
20 |
--------------------------------------------------------------------------------
/src/main/urls.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from django.conf.urls import patterns, url
4 |
5 | urlpatterns = patterns('src.main.views',
6 | url(r'^$', 'index', name='index'),
7 | url(r'^index/$', 'first_page', name='first_page'),
8 | url(r'^index/(?P\w+)\.html/$', 'book_redirect'),
9 | url(r'^search/$', 'search', name='search'),
10 | url(r'^feedback/$', 'feedback', name='feedback'),
11 | url(r'^thanks/$', 'thanks', name='thanks'),
12 | url(r'^markdown_preview/$', 'markdown_preview', name='markdown_preview'),
13 | url(r'^test_error_email/', 'test_error_email'),
14 | url(r'^lang/(?P[a-z]{2})/$', 'lang', name='lang'),
15 | url(r'^(?P\w+)\.html', 'page', name='page')
16 | )
17 |
--------------------------------------------------------------------------------
/src/static/syntaxhighlighter_3.0.83/tests/cases/008_first_line.html:
--------------------------------------------------------------------------------
1 |
2 | partial class Foo
3 | {
4 | function test()
5 | {
6 | yield return;
7 | }
8 | }
9 |
10 |
11 |
30 |
--------------------------------------------------------------------------------
/src/accounts/backends.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from __future__ import absolute_import, unicode_literals
3 |
4 | from django.contrib.auth.backends import ModelBackend
5 |
6 | from src.accounts.models import User
7 |
8 |
9 | class CustomUserBackend(ModelBackend):
10 |
11 | def authenticate(self, username=None, password=None):
12 | try:
13 | user = User.objects.get(email=username)
14 | if user.check_password(password):
15 | return user
16 | except User.DoesNotExist:
17 | return None
18 |
19 | def get_user(self, user_id):
20 | try:
21 | return User.objects.get(pk=user_id)
22 | except User.DoesNotExist:
23 | return None
24 |
--------------------------------------------------------------------------------
/src/static/leeflet_0.4.5/src/layer/vector/CircleMarker.js:
--------------------------------------------------------------------------------
1 | /*
2 | * L.CircleMarker is a circle overlay with a permanent pixel radius.
3 | */
4 |
5 | L.CircleMarker = L.Circle.extend({
6 | options: {
7 | radius: 10,
8 | weight: 2
9 | },
10 |
11 | initialize: function (latlng, options) {
12 | L.Circle.prototype.initialize.call(this, latlng, null, options);
13 | this._radius = this.options.radius;
14 | },
15 |
16 | projectLatlngs: function () {
17 | this._point = this._map.latLngToLayerPoint(this._latlng);
18 | },
19 |
20 | setRadius: function (radius) {
21 | this._radius = radius;
22 | return this.redraw();
23 | }
24 | });
25 |
26 | L.circleMarker = function (latlng, options) {
27 | return new L.CircleMarker(latlng, options);
28 | };
29 |
--------------------------------------------------------------------------------
/sentry/tests/urls.py:
--------------------------------------------------------------------------------
1 | from django.conf.urls.defaults import *
2 | from django.contrib import admin
3 |
4 | admin.autodiscover()
5 |
6 | urlpatterns = patterns('',
7 | url(r'^admin/', include(admin.site.urls)),
8 | url(r'^trigger-500$', 'sentry.tests.views.raise_exc', name='sentry-raise-exc'),
9 | url(r'^trigger-500-decorated$', 'sentry.tests.views.decorated_raise_exc', name='sentry-raise-exc-decor'),
10 | url(r'^trigger-500-django$', 'sentry.tests.views.django_exc', name='sentry-django-exc'),
11 | url(r'^trigger-500-template$', 'sentry.tests.views.template_exc', name='sentry-template-exc'),
12 | url(r'^trigger-500-log-request$', 'sentry.tests.views.logging_request_exc', name='sentry-log-request-exc'),
13 | url(r'', include('sentry.urls')),
14 | )
--------------------------------------------------------------------------------
/src/links/templatetags/links_tags.py:
--------------------------------------------------------------------------------
1 | from django import template
2 | from src.links.models import UsefulLink, SourceCode, Archive
3 |
4 | register = template.Library()
5 |
6 |
7 | @register.inclusion_tag('links/_useful_links.html', takes_context=True)
8 | def useful_links(context):
9 | context['useful_links'] = UsefulLink.objects.all()[:4]
10 | return context
11 |
12 |
13 | @register.inclusion_tag('links/_source_codes.html', takes_context=True)
14 | def source_codes(context):
15 | context['source_codes'] = SourceCode.objects.all()[:5]
16 | return context
17 |
18 |
19 | @register.inclusion_tag('links/_archive.html', takes_context=True)
20 | def archive(context):
21 | context['archive_links'] = Archive.objects.all()[:5]
22 | return context
23 |
--------------------------------------------------------------------------------
/src/templates/_markitup.html:
--------------------------------------------------------------------------------
1 | {% load staticfiles %}
2 |
3 |
7 |
8 |
9 |
10 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/static/leeflet_0.4.5/src/geo/crs/CRS.js:
--------------------------------------------------------------------------------
1 |
2 | L.CRS = {
3 | latLngToPoint: function (latlng, zoom) { // (LatLng, Number) -> Point
4 | var projectedPoint = this.projection.project(latlng),
5 | scale = this.scale(zoom);
6 |
7 | return this.transformation._transform(projectedPoint, scale);
8 | },
9 |
10 | pointToLatLng: function (point, zoom) { // (Point, Number[, Boolean]) -> LatLng
11 | var scale = this.scale(zoom),
12 | untransformedPoint = this.transformation.untransform(point, scale);
13 |
14 | return this.projection.unproject(untransformedPoint);
15 | },
16 |
17 | project: function (latlng) {
18 | return this.projection.project(latlng);
19 | },
20 |
21 | scale: function (zoom) {
22 | return 256 * Math.pow(2, zoom);
23 | }
24 | };
25 |
--------------------------------------------------------------------------------
/src/static/leeflet_0.4.5/src/layer/vector/canvas/Polyline.Canvas.js:
--------------------------------------------------------------------------------
1 |
2 | L.Polyline.include(!L.Path.CANVAS ? {} : {
3 | _containsPoint: function (p, closed) {
4 | var i, j, k, len, len2, dist, part,
5 | w = this.options.weight / 2;
6 |
7 | if (L.Browser.touch) {
8 | w += 10; // polyline click tolerance on touch devices
9 | }
10 |
11 | for (i = 0, len = this._parts.length; i < len; i++) {
12 | part = this._parts[i];
13 | for (j = 0, len2 = part.length, k = len2 - 1; j < len2; k = j++) {
14 | if (!closed && (j === 0)) {
15 | continue;
16 | }
17 |
18 | dist = L.LineUtil.pointToSegmentDistance(p, part[k], part[j]);
19 |
20 | if (dist <= w) {
21 | return true;
22 | }
23 | }
24 | }
25 | return false;
26 | }
27 | });
28 |
--------------------------------------------------------------------------------
/src/templates/videos/_last_videos.html:
--------------------------------------------------------------------------------
1 |
9 | {% comment %}
10 |
11 | {% for video in index_video %}
12 |
13 |
{{ video.video_preview_code|safe }}
14 |
15 |
16 | {% endfor %}
17 |
18 | {% endcomment %}
--------------------------------------------------------------------------------
/src/utils/forms.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from django.forms.forms import pretty_name
4 |
5 |
6 | class PlaceholderMixin(object):
7 |
8 | def __init__(self, *args, **kwargs):
9 | super(PlaceholderMixin, self).__init__(*args, **kwargs)
10 | for name, field in self.fields.items():
11 | if not 'placeholder' in field.widget.attrs:
12 | field.widget.attrs['placeholder'] = field.label or pretty_name(name)
13 |
14 |
15 | class AjaxForm(object):
16 |
17 | def get_errors(self):
18 | from django.utils.encoding import force_unicode
19 | output = {}
20 | for key, value in self.errors.items():
21 | output[key] = '/n'.join([force_unicode(i) for i in value])
22 | return output
23 |
--------------------------------------------------------------------------------
/lib/bootstrapform/templates/bootstrapform/form.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {% if form.non_field_errors %}
4 |
5 |
×
6 | {% for non_field_error in form.non_field_errors %}
7 | {{ non_field_error }}
8 | {% endfor %}
9 |
10 | {% endif %}
11 |
12 | {% for field in form.hidden_fields %}
13 | {{ field }}
14 | {% endfor %}
15 |
16 | {% for field in form.visible_fields %}
17 | {% include 'bootstrapform/field.html' %}
18 | {% endfor %}
19 |
20 |
21 |
--------------------------------------------------------------------------------
/sentry/plugins/sentry_servers/templates/sentry/plugins/sentry_servers/index.html:
--------------------------------------------------------------------------------
1 | {% extends "sentry/group/details.html" %}
2 |
3 | {% load paging_extras %}
4 |
5 | {% block inner %}
6 | Server List
7 | {% paginate group.unique_servers from request as server_list per_page 25 %}
8 |
9 | {{ server_list.paging }}
10 |
11 |
12 | {% for server in server_list.objects %}
13 | {{ server.times_seen }} {{ server.server_name }}
14 | {% endfor %}
15 |
16 |
17 | {{ server_list.paging }}
18 |
19 | {% endblock %}
20 |
--------------------------------------------------------------------------------
/src/doc_comments/admin.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from django.contrib import admin
4 | from . import models
5 |
6 |
7 | class CommentAdmin(admin.ModelAdmin):
8 | list_display = ['created', 'comment', 'url', 'author', 'status']
9 | list_filter = ['status']
10 | actions = ['close']
11 |
12 | def url(self, obj):
13 | return '%s ' % (obj.get_absolute_url(), obj.page_title)
14 | url.allow_tags = True
15 |
16 | def comment(self, obj):
17 | return obj.get_content()
18 | comment.allow_tags = True
19 |
20 | def close(self, request, queryset):
21 | queryset.update(status=models.Comment.CLOSED)
22 | close.short_description = "Close comment"
23 |
24 | admin.site.register(models.Comment, CommentAdmin)
25 |
--------------------------------------------------------------------------------
/src/static/theme/font-awesome-4.0.3/less/path.less:
--------------------------------------------------------------------------------
1 | /* FONT PATH
2 | * -------------------------- */
3 |
4 | @font-face {
5 | font-family: 'FontAwesome';
6 | src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}');
7 | src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'),
8 | url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'),
9 | url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'),
10 | url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg');
11 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts
12 | font-weight: normal;
13 | font-style: normal;
14 | }
15 |
--------------------------------------------------------------------------------
/src/forum/templates/djforum/_rating.html:
--------------------------------------------------------------------------------
1 | {% load forum_tags i18n %}
2 |
3 | |
4 |
5 | {% if user.is_authenticated %}
6 | {% if model == 'Post' %}
7 | {% url 'forum:vote_post' obj.pk as vote_url %}
8 | {% endif %}
9 |
10 | {% if model == 'Topic' %}
11 | {% url 'forum:vote_topic' obj.pk as vote_url %}
12 | {% endif %}
13 |
14 |
16 | {{ obj.rating }}
17 |
18 | {% else %}
19 | {{ obj.rating }}
20 | {% endif %}
21 |
--------------------------------------------------------------------------------
/src/news/feeds.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from . import models
4 | from django.contrib.syndication.views import Feed
5 | from django.utils.translation import ugettext_lazy as _
6 | from src.main.templatetags.components import filter_markdown
7 | from django.core.urlresolvers import reverse_lazy
8 |
9 |
10 | class LatestNewsFeed(Feed):
11 | title = _("Russian DjangoBook")
12 | link = reverse_lazy('news:index')
13 | description = _("The freshest news about Russian version of DjangoBook")
14 |
15 | def items(self):
16 | return models.News.objects.approved().order_by('-created')[:10]
17 |
18 | def item_title(self, item):
19 | return item.title
20 |
21 | def item_description(self, item):
22 | return filter_markdown(item.content)
23 |
--------------------------------------------------------------------------------
/src/static/leeflet_0.4.5/src/geo/projection/Projection.SphericalMercator.js:
--------------------------------------------------------------------------------
1 |
2 | L.Projection.SphericalMercator = {
3 | MAX_LATITUDE: 85.0511287798,
4 |
5 | project: function (latlng) { // (LatLng) -> Point
6 | var d = L.LatLng.DEG_TO_RAD,
7 | max = this.MAX_LATITUDE,
8 | lat = Math.max(Math.min(max, latlng.lat), -max),
9 | x = latlng.lng * d,
10 | y = lat * d;
11 | y = Math.log(Math.tan((Math.PI / 4) + (y / 2)));
12 |
13 | return new L.Point(x, y);
14 | },
15 |
16 | unproject: function (point) { // (Point, Boolean) -> LatLng
17 | var d = L.LatLng.RAD_TO_DEG,
18 | lng = point.x * d,
19 | lat = (2 * Math.atan(Math.exp(point.y)) - (Math.PI / 2)) * d;
20 |
21 | // TODO refactor LatLng wrapping
22 | return new L.LatLng(lat, lng, true);
23 | }
24 | };
25 |
--------------------------------------------------------------------------------
/src/templates/docbook_translator/parser.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
14 | {% for item in texts %}
15 |
16 | {{ item.type }}
17 | {{ item.path }}
18 |
19 |
20 | {% endfor %}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/lib/tagging_autocomplete/models.py:
--------------------------------------------------------------------------------
1 | from tagging.fields import TagField
2 | from tagging_autocomplete.widgets import TagAutocomplete
3 | from django.contrib.admin.widgets import AdminTextInputWidget
4 |
5 | # The following code is based on models.py file from django-tinymce by Joost Cassee
6 |
7 |
8 | class TagAutocompleteField(TagField):
9 | """
10 | TagField with autocomplete widget
11 | """
12 | def formfield(self, **kwargs):
13 | defaults = {'widget': TagAutocomplete}
14 | defaults.update(kwargs)
15 |
16 | # As an ugly hack, we override the admin widget
17 | if defaults['widget'] == AdminTextInputWidget:
18 | defaults['widget'] = TagAutocomplete
19 |
20 | return super(TagAutocompleteField, self).formfield(**defaults)
21 |
--------------------------------------------------------------------------------
/src/examples/feeds.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from . import models
4 | from django.contrib.syndication.views import Feed
5 | from django.utils.translation import ugettext_lazy as _
6 | from src.main.templatetags.components import filter_markdown
7 | from django.core.urlresolvers import reverse_lazy
8 |
9 |
10 | class LatestExamplesFeed(Feed):
11 | title = _("Russian DjangoBook Examples")
12 | link = reverse_lazy('examples:index')
13 | description = _("Newly examples from Russian DjangoBook")
14 |
15 | def items(self):
16 | return models.Example.objects.order_by('-created')[:10]
17 |
18 | def item_title(self, item):
19 | return unicode(item)
20 |
21 | def item_description(self, item):
22 | return filter_markdown(item.content, 100)
23 |
--------------------------------------------------------------------------------
/src/header_messages/models.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from django.db import models
4 | from django.utils.translation import ugettext_lazy as _
5 |
6 |
7 | class HeaderMessage(models.Model):
8 | message = models.CharField(_(u'Phrase'), max_length=2048)
9 |
10 | class Meta:
11 | verbose_name = _(u'Phrase')
12 | verbose_name_plural = _(u'Phrases')
13 |
14 | def __unicode__(self):
15 | if len(self.message) > 50:
16 | return self.message[:50] + "..."
17 | else:
18 | return self.message
19 |
20 | @staticmethod
21 | def random_message():
22 | try:
23 | return HeaderMessage.objects.order_by('?')[:1].get().message
24 | except HeaderMessage.DoesNotExist:
25 | return ""
26 |
27 |
--------------------------------------------------------------------------------
/src/static/theme/font-awesome-4.0.3/scss/_path.scss:
--------------------------------------------------------------------------------
1 | /* FONT PATH
2 | * -------------------------- */
3 |
4 | @font-face {
5 | font-family: 'FontAwesome';
6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}');
7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'),
8 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'),
9 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'),
10 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg');
11 | //src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts
12 | font-weight: normal;
13 | font-style: normal;
14 | }
15 |
--------------------------------------------------------------------------------
/lib/oembed/__init__.py:
--------------------------------------------------------------------------------
1 | # .--.
2 | # /( @ > ,-. DJANGOEMBED
3 | # / ' .'--._/ /
4 | # : , , .'
5 | # '. (___.'_/
6 | # ((-((-''
7 | VERSION = (0, 1, 1)
8 |
9 | from oembed.sites import site
10 |
11 |
12 | def autodiscover():
13 | """
14 | Automatically build the provider index.
15 | """
16 | import imp
17 | from django.conf import settings
18 |
19 | for app in settings.INSTALLED_APPS:
20 | try:
21 | app_path = __import__(app, {}, {}, [app.split('.')[-1]]).__path__
22 | except AttributeError:
23 | continue
24 |
25 | try:
26 | imp.find_module('oembed_providers', app_path)
27 | except ImportError:
28 | continue
29 |
30 | __import__("%s.oembed_providers" % app)
31 |
--------------------------------------------------------------------------------
/src/claims/migrations/0002_auto_20160803_1431.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from __future__ import unicode_literals
3 |
4 | from django.db import migrations, models
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | dependencies = [
10 | ('claims', '0001_initial'),
11 | ]
12 |
13 | operations = [
14 | migrations.AlterField(
15 | model_name='claims',
16 | name='email',
17 | field=models.EmailField(max_length=254, verbose_name="Reader's E-mail"),
18 | ),
19 | migrations.AlterField(
20 | model_name='claims',
21 | name='status',
22 | field=models.IntegerField(verbose_name='Status of the Claim', choices=[(1, 'New'), (2, 'Assigned'), (3, 'Fixed'), (4, 'Invalid')]),
23 | ),
24 | ]
25 |
--------------------------------------------------------------------------------
/src/header_messages/migrations/0001_initial.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from __future__ import unicode_literals
3 |
4 | from django.db import models, migrations
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | dependencies = [
10 | ]
11 |
12 | operations = [
13 | migrations.CreateModel(
14 | name='HeaderMessage',
15 | fields=[
16 | ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
17 | ('message', models.CharField(max_length=2048, verbose_name='Phrase')),
18 | ],
19 | options={
20 | 'verbose_name': 'Phrase',
21 | 'verbose_name_plural': 'Phrases',
22 | },
23 | bases=(models.Model,),
24 | ),
25 | ]
26 |
--------------------------------------------------------------------------------
/src/static/theme/font-awesome-4.0.3/less/mixins.less:
--------------------------------------------------------------------------------
1 | // Mixins
2 | // --------------------------
3 |
4 | .fa-icon-rotate(@degrees, @rotation) {
5 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation);
6 | -webkit-transform: rotate(@degrees);
7 | -moz-transform: rotate(@degrees);
8 | -ms-transform: rotate(@degrees);
9 | -o-transform: rotate(@degrees);
10 | transform: rotate(@degrees);
11 | }
12 |
13 | .fa-icon-flip(@horiz, @vert, @rotation) {
14 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation, mirror=1);
15 | -webkit-transform: scale(@horiz, @vert);
16 | -moz-transform: scale(@horiz, @vert);
17 | -ms-transform: scale(@horiz, @vert);
18 | -o-transform: scale(@horiz, @vert);
19 | transform: scale(@horiz, @vert);
20 | }
21 |
--------------------------------------------------------------------------------
/src/static/theme/font-awesome-4.0.3/scss/_mixins.scss:
--------------------------------------------------------------------------------
1 | // Mixins
2 | // --------------------------
3 |
4 | @mixin fa-icon-rotate($degrees, $rotation) {
5 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=$rotation);
6 | -webkit-transform: rotate($degrees);
7 | -moz-transform: rotate($degrees);
8 | -ms-transform: rotate($degrees);
9 | -o-transform: rotate($degrees);
10 | transform: rotate($degrees);
11 | }
12 |
13 | @mixin fa-icon-flip($horiz, $vert, $rotation) {
14 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=$rotation);
15 | -webkit-transform: scale($horiz, $vert);
16 | -moz-transform: scale($horiz, $vert);
17 | -ms-transform: scale($horiz, $vert);
18 | -o-transform: scale($horiz, $vert);
19 | transform: scale($horiz, $vert);
20 | }
21 |
--------------------------------------------------------------------------------
/src/videos/views.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from .import models
4 | from django.conf import settings
5 | from django.shortcuts import get_object_or_404
6 | from tagging.models import TaggedItem, Tag
7 | from src.utils.views import object_list
8 |
9 | VIDEOS_ON_PAGE = getattr(settings, 'VIDEOS_ON_PAGE', 8)
10 |
11 |
12 | def index(request):
13 | qs = models.Video.objects.all()
14 | tag_name = request.GET.get('tag', None)
15 | tag = None
16 | if tag_name:
17 | tag = get_object_or_404(Tag, name=tag_name)
18 | qs = TaggedItem.objects.get_by_model(qs, tag)
19 | extra_context = {
20 | 'tag': tag
21 | }
22 | return object_list(request, qs, VIDEOS_ON_PAGE,
23 | template_name='videos/index.html',
24 | extra_context=extra_context)
25 |
--------------------------------------------------------------------------------
/addon/pil_install.sh:
--------------------------------------------------------------------------------
1 | DIR="jpeg-8c"
2 | FILE="jpegsrc.v8c.tar.gz"
3 | URL="http://www.ijg.org/files/${FILE}"
4 | test -f ${FILE} || wget --continue ${URL}
5 | test -d ${DIR} || tar xzf ${FILE}
6 | cd ${DIR}
7 | ./configure --prefix=${VIRTUAL_ENV} && make && make install
8 | cd -
9 |
10 | DIR="zlib-1.2.7"
11 | FILE="${DIR}.tar.gz"
12 | URL="http://zlib.net/${FILE}"
13 | test -f ${FILE} || wget --continue ${URL}
14 | test -d ${DIR} || tar xzf ${FILE}
15 | cd ${DIR}
16 | ./configure --prefix=${VIRTUAL_ENV} && make && make install
17 | cd -
18 |
19 | DIR="freetype-2.4.10"
20 | FILE="${DIR}.tar.gz"
21 | URL="http://download.savannah.gnu.org/releases/freetype/${FILE}"
22 | test -f ${FILE} || wget --continue ${URL}
23 | test -d ${DIR} || tar xzf ${FILE}
24 | cd ${DIR}
25 | ./configure --prefix=${VIRTUAL_ENV} && make && make install
26 | cd -
27 |
--------------------------------------------------------------------------------
/src/examples/search_indexes.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from haystack import indexes
4 | from .models import Example
5 |
6 |
7 | class ExampleIndex(indexes.SearchIndex, indexes.Indexable):
8 | text = indexes.CharField(document=True, use_template=True)
9 | title = indexes.CharField(model_attr='title')
10 | created = indexes.DateTimeField(model_attr='created')
11 | author = indexes.CharField(model_attr='author')
12 |
13 | def get_model(self):
14 | return Example
15 |
16 | def prepare(self, obj):
17 | # Fix Xapian error about terms longer then 245
18 | self.prepared_data = super(ExampleIndex, self).prepare(obj)
19 | terms = self.prepared_data['text'].split(' ')
20 | self.prepared_data['text'] = u' '.join(term[:230] for term in terms)
21 | return self.prepared_data
22 |
--------------------------------------------------------------------------------
/sentry/tests/views.py:
--------------------------------------------------------------------------------
1 | from django.http import HttpResponse
2 | from django.shortcuts import get_object_or_404, render_to_response
3 |
4 | import logging
5 | import sys
6 |
7 | def django_exc(request):
8 | return get_object_or_404(Exception, pk=1)
9 |
10 | def raise_exc(request):
11 | raise Exception(request.GET.get('message', 'view exception'))
12 |
13 | def decorated_raise_exc(request):
14 | return raise_exc(request)
15 |
16 | def template_exc(request):
17 | return render_to_response('sentry-tests/error.html')
18 |
19 | def logging_request_exc(request):
20 | logger = logging.getLogger('sentry.test')
21 | try:
22 | raise Exception(request.GET.get('message', 'view exception'))
23 | except Exception, e:
24 | logger.error(e, exc_info=sys.exc_info(), extra={'request': request})
25 | return HttpResponse('')
--------------------------------------------------------------------------------
/src/comments/templatetags/__init__.py:
--------------------------------------------------------------------------------
1 | # Universal Subtitles, universalsubtitles.org
2 | #
3 | # Copyright (C) 2010 Participatory Culture Foundation
4 | #
5 | # This program is free software: you can redistribute it and/or modify
6 | # it under the terms of the GNU Affero General Public License as
7 | # published by the Free Software Foundation, either version 3 of the
8 | # License, or (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU Affero General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU Affero General Public License
16 | # along with this program. If not, see
17 | # http://www.gnu.org/licenses/agpl-3.0.html.
--------------------------------------------------------------------------------
/src/forum/templates/djforum/my_topics.html:
--------------------------------------------------------------------------------
1 | {% extends "djforum/base.html" %}
2 |
3 | {% load i18n staticfiles pagination_tags forum_tags %}
4 |
5 | {% block title %}{% trans "My topics" %} | {{ block.super }}{% endblock %}
6 |
7 | {% block content %}
8 |
25 | {% endblock %}
26 |
--------------------------------------------------------------------------------
/fabfile/hosts.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from fabric.api import env
4 | from fab_deploy import *
5 | from src import local_settings as settings
6 |
7 |
8 | @define_host(settings.SERVER_URL)
9 | def production():
10 | env.shell = settings.SHELL
11 | return dict(
12 | WSGI=settings.PROD_WSGI,
13 | HOST_USER=settings.PROD_HOST_USER,
14 | HOST_NAME=settings.PROD_HOST_NAME,
15 | ENV_DIR=settings.PROD_ENV_DIR,
16 | PROJECT_DIR=settings.PROD_HOST_DIR,
17 | PIP_REQS_PATH=settings.PIP_REQS_PATH,
18 | PIP_REQS_BASE=settings.PIP_REQS_BASE,
19 | DB_HOST=settings.PROD_DB_HOST,
20 | DB_NAME=settings.PROD_DB_NAME,
21 | DB_USER=settings.PROD_DB_USER,
22 | DB_PASS=settings.PROD_DB_PASS,
23 | #MIGRATE_DUMP=settings.PRE_MIGRATE_DUMP,
24 | CONFIG='prod_settings.py',
25 | )
26 |
--------------------------------------------------------------------------------
/src/static/leeflet_0.4.5/src/map/ext/Map.Control.js:
--------------------------------------------------------------------------------
1 | L.Map.include({
2 | addControl: function (control) {
3 | control.addTo(this);
4 | return this;
5 | },
6 |
7 | removeControl: function (control) {
8 | control.removeFrom(this);
9 | return this;
10 | },
11 |
12 | _initControlPos: function () {
13 | var corners = this._controlCorners = {},
14 | l = 'leaflet-',
15 | container = this._controlContainer =
16 | L.DomUtil.create('div', l + 'control-container', this._container);
17 |
18 | function createCorner(vSide, hSide) {
19 | var className = l + vSide + ' ' + l + hSide;
20 |
21 | corners[vSide + hSide] =
22 | L.DomUtil.create('div', className, container);
23 | }
24 |
25 | createCorner('top', 'left');
26 | createCorner('top', 'right');
27 | createCorner('bottom', 'left');
28 | createCorner('bottom', 'right');
29 | }
30 | });
31 |
--------------------------------------------------------------------------------
/po_compile.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Скрипт предназначен для компиляции переводов.
4 |
5 | PROJECTS="src"
6 | APPS="main accounts claims code_review comments djangobb_forum doc_comments examples forum news videos links"
7 |
8 | export PYTHONPATH=$PYTHONPATH:`pwd`
9 | export DJANGO_SETTINGS_MODULE=src.settings
10 |
11 | if test $# -gt 0; then
12 | APPS=$@
13 | fi
14 |
15 | for project in ${PROJECTS}; do
16 | cd ${project}
17 | django-admin.py compilemessages
18 | cd ..
19 | for app in ${APPS}; do
20 | if test -d ${project}/${app}; then
21 | cd ${project}/${app}
22 | echo "Compile messages for application: ${project}.${app}"
23 | django-admin.py compilemessages
24 | cd -
25 | else
26 | echo "Unknown application ${app}. Skipping..."
27 | fi
28 | done
29 | done
30 |
31 | exit 0
32 |
--------------------------------------------------------------------------------
/src/templates/main/feedback.html:
--------------------------------------------------------------------------------
1 | {% extends 'basepage.html' %}
2 |
3 | {% load i18n bootstrap %}
4 |
5 | {% block title %}{% trans 'Feedback' %} | {{ block.super }}{% endblock %}
6 |
7 | {% block content %}
8 |
9 |
{% trans "You can send message to us" %}
10 |
11 |
12 | {% trans "We are glad to hear your questions, comments or suggestions!" %}
13 |
14 |
15 |
24 |
25 | {% endblock %}
26 |
--------------------------------------------------------------------------------
/src/accounts/templates/accounts/create.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% load i18n bootstrap %}
4 |
5 | {% block title %}{% trans 'Register' %} | {{ block.super }}{% endblock %}
6 |
7 | {% block page %}
8 |
9 |
10 |
11 |
{% trans 'Register' %}
12 |
21 |
22 |
23 |
24 | {% endblock %}
--------------------------------------------------------------------------------
/src/static/leeflet_0.4.5/src/layer/marker/DivIcon.js:
--------------------------------------------------------------------------------
1 | L.DivIcon = L.Icon.extend({
2 | options: {
3 | iconSize: new L.Point(12, 12), // also can be set through CSS
4 | /*
5 | iconAnchor: (Point)
6 | popupAnchor: (Point)
7 | html: (String)
8 | bgPos: (Point)
9 | */
10 | className: 'leaflet-div-icon'
11 | },
12 |
13 | createIcon: function () {
14 | var div = document.createElement('div'),
15 | options = this.options;
16 |
17 | if (options.html) {
18 | div.innerHTML = options.html;
19 | }
20 |
21 | if (options.bgPos) {
22 | div.style.backgroundPosition =
23 | (-options.bgPos.x) + 'px ' + (-options.bgPos.y) + 'px';
24 | }
25 |
26 | this._setIconStyles(div, 'icon');
27 | return div;
28 | },
29 |
30 | createShadow: function () {
31 | return null;
32 | }
33 | });
34 |
35 | L.divIcon = function (options) {
36 | return new L.DivIcon(options);
37 | };
38 |
--------------------------------------------------------------------------------
/src/static/syntaxhighlighter_3.0.83/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Hello SyntaxHighlighter
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | Hello SyntaxHighlighter
15 |
16 | function helloSyntaxHighlighter()
17 | {
18 | return "hi!";
19 | }
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/lib/tagging_autocomplete/widgets.py:
--------------------------------------------------------------------------------
1 | from django.forms.widgets import Input
2 | from django.core.urlresolvers import reverse
3 | from django.utils.safestring import mark_safe
4 |
5 |
6 | class TagAutocomplete(Input):
7 | input_type = 'text'
8 |
9 | def render(self, name, value, attrs=None):
10 | json_view = reverse('tagging_autocomplete-list')
11 | html = super(TagAutocomplete, self).render(name, value, attrs)
12 | js = u'' % (attrs['id'], json_view)
13 | return mark_safe("\n".join([html, js]))
14 |
15 | class Media:
16 | css = {
17 | 'all': ('jquery-autocomplete/jquery.autocomplete.css',)
18 | }
19 | js = (
20 | 'js/force_jquery.js',
21 | 'jquery-autocomplete/jquery.autocomplete.js',
22 | )
23 |
--------------------------------------------------------------------------------
/src/static/syntaxhighlighter_3.0.83/tests/cases/012_server_side.html:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
36 |
--------------------------------------------------------------------------------
/src/accounts/templates/accounts/password_reset.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% load i18n bootstrap %}
4 |
5 | {% block title %}{% trans 'Reset password' %} | {{ block.super }}{% endblock %}
6 |
7 | {% block page %}
8 |
9 |
10 |
11 |
{% trans 'Forgot password? Please enter your email' %}
12 |
21 |
22 |
23 |
24 | {% endblock %}
--------------------------------------------------------------------------------
/src/static/leeflet_0.4.5/src/layer/vector/Rectangle.js:
--------------------------------------------------------------------------------
1 | /*
2 | * L.Rectangle extends Polygon and creates a rectangle when passed a LatLngBounds
3 | */
4 |
5 | L.Rectangle = L.Polygon.extend({
6 | initialize: function (latLngBounds, options) {
7 | L.Polygon.prototype.initialize.call(this, this._boundsToLatLngs(latLngBounds), options);
8 | },
9 |
10 | setBounds: function (latLngBounds) {
11 | this.setLatLngs(this._boundsToLatLngs(latLngBounds));
12 | },
13 |
14 | _boundsToLatLngs: function (latLngBounds) {
15 | latLngBounds = L.latLngBounds(latLngBounds);
16 | return [
17 | latLngBounds.getSouthWest(),
18 | latLngBounds.getNorthWest(),
19 | latLngBounds.getNorthEast(),
20 | latLngBounds.getSouthEast(),
21 | latLngBounds.getSouthWest()
22 | ];
23 | }
24 | });
25 |
26 | L.rectangle = function (latLngBounds, options) {
27 | return new L.Rectangle(latLngBounds, options);
28 | };
29 |
--------------------------------------------------------------------------------
/src/static/theme/font-awesome-4.0.3/less/spinning.less:
--------------------------------------------------------------------------------
1 | // Spinning Icons
2 | // --------------------------
3 |
4 | .@{fa-css-prefix}-spin {
5 | -webkit-animation: spin 2s infinite linear;
6 | -moz-animation: spin 2s infinite linear;
7 | -o-animation: spin 2s infinite linear;
8 | animation: spin 2s infinite linear;
9 | }
10 |
11 | @-moz-keyframes spin {
12 | 0% { -moz-transform: rotate(0deg); }
13 | 100% { -moz-transform: rotate(359deg); }
14 | }
15 | @-webkit-keyframes spin {
16 | 0% { -webkit-transform: rotate(0deg); }
17 | 100% { -webkit-transform: rotate(359deg); }
18 | }
19 | @-o-keyframes spin {
20 | 0% { -o-transform: rotate(0deg); }
21 | 100% { -o-transform: rotate(359deg); }
22 | }
23 | @-ms-keyframes spin {
24 | 0% { -ms-transform: rotate(0deg); }
25 | 100% { -ms-transform: rotate(359deg); }
26 | }
27 | @keyframes spin {
28 | 0% { transform: rotate(0deg); }
29 | 100% { transform: rotate(359deg); }
30 | }
31 |
--------------------------------------------------------------------------------
/src/static/theme/font-awesome-4.0.3/scss/_spinning.scss:
--------------------------------------------------------------------------------
1 | // Spinning Icons
2 | // --------------------------
3 |
4 | .#{$fa-css-prefix}-spin {
5 | -webkit-animation: spin 2s infinite linear;
6 | -moz-animation: spin 2s infinite linear;
7 | -o-animation: spin 2s infinite linear;
8 | animation: spin 2s infinite linear;
9 | }
10 |
11 | @-moz-keyframes spin {
12 | 0% { -moz-transform: rotate(0deg); }
13 | 100% { -moz-transform: rotate(359deg); }
14 | }
15 | @-webkit-keyframes spin {
16 | 0% { -webkit-transform: rotate(0deg); }
17 | 100% { -webkit-transform: rotate(359deg); }
18 | }
19 | @-o-keyframes spin {
20 | 0% { -o-transform: rotate(0deg); }
21 | 100% { -o-transform: rotate(359deg); }
22 | }
23 | @-ms-keyframes spin {
24 | 0% { -ms-transform: rotate(0deg); }
25 | 100% { -ms-transform: rotate(359deg); }
26 | }
27 | @keyframes spin {
28 | 0% { transform: rotate(0deg); }
29 | 100% { transform: rotate(359deg); }
30 | }
31 |
--------------------------------------------------------------------------------
/sentry/plugins/sentry_urls/models.py:
--------------------------------------------------------------------------------
1 | from django.shortcuts import render_to_response
2 | from django.template.loader import render_to_string
3 |
4 | from sentry.plugins import GroupActionProvider
5 |
6 | class ServerUrlsPanel(GroupActionProvider):
7 | """Adds additional support for showing information about urls including:
8 |
9 | * A panel which shows all urls a message was seen on.
10 | * A sidebar module which shows the urls most actively seen on.
11 | """
12 |
13 | title = 'URLs'
14 |
15 | def panels(self, request, panel_list, group):
16 | panel_list.append((self.title, self.__class__.get_url(group.pk)))
17 | return panel_list
18 |
19 | def view(self, request, group):
20 | return render_to_response('sentry/plugins/sentry_urls/index.html', locals())
21 |
22 | def widget(self, request, group):
23 | return render_to_string('sentry/plugins/sentry_urls/widget.html', locals())
--------------------------------------------------------------------------------
/src/static/leeflet_0.4.5/src/layer/vector/canvas/Polygon.Canvas.js:
--------------------------------------------------------------------------------
1 |
2 | L.Polygon.include(!L.Path.CANVAS ? {} : {
3 | _containsPoint: function (p) {
4 | var inside = false,
5 | part, p1, p2,
6 | i, j, k,
7 | len, len2;
8 |
9 | // TODO optimization: check if within bounds first
10 |
11 | if (L.Polyline.prototype._containsPoint.call(this, p, true)) {
12 | // click on polygon border
13 | return true;
14 | }
15 |
16 | // ray casting algorithm for detecting if point is in polygon
17 |
18 | for (i = 0, len = this._parts.length; i < len; i++) {
19 | part = this._parts[i];
20 |
21 | for (j = 0, len2 = part.length, k = len2 - 1; j < len2; k = j++) {
22 | p1 = part[j];
23 | p2 = part[k];
24 |
25 | if (((p1.y > p.y) !== (p2.y > p.y)) &&
26 | (p.x < (p2.x - p1.x) * (p.y - p1.y) / (p2.y - p1.y) + p1.x)) {
27 | inside = !inside;
28 | }
29 | }
30 | }
31 |
32 | return inside;
33 | }
34 | });
35 |
--------------------------------------------------------------------------------
/src/static/syntaxhighlighter_3.0.83/scripts/shBrushPlain.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | };
25 |
26 | Brush.prototype = new SyntaxHighlighter.Highlighter();
27 | Brush.aliases = ['text', 'plain'];
28 |
29 | SyntaxHighlighter.brushes.Plain = Brush;
30 |
31 | // CommonJS
32 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
33 | })();
34 |
--------------------------------------------------------------------------------
/lib/pagination/locale/de/LC_MESSAGES/django.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3 | # This file is distributed under the same license as the PACKAGE package.
4 | # FIRST AUTHOR , YEAR.
5 | #
6 | #, fuzzy
7 | msgid ""
8 | msgstr ""
9 | "Project-Id-Version: PACKAGE VERSION\n"
10 | "Report-Msgid-Bugs-To: \n"
11 | "POT-Creation-Date: 2008-10-24 00:41-0700\n"
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 | "Last-Translator: FULL NAME \n"
14 | "Language-Team: LANGUAGE \n"
15 | "MIME-Version: 1.0\n"
16 | "Content-Type: text/plain; charset=UTF-8\n"
17 | "Content-Transfer-Encoding: 8bit\n"
18 |
19 | #: templates/pagination/pagination.html:5
20 | #: templates/pagination/pagination.html:7
21 | msgid "previous"
22 | msgstr "zurück"
23 |
24 | #: templates/pagination/pagination.html:21
25 | #: templates/pagination/pagination.html:23
26 | msgid "next"
27 | msgstr "weiter"
28 |
--------------------------------------------------------------------------------
/src/static/syntaxhighlighter_3.0.83/tests/cases/009_class_name.html:
--------------------------------------------------------------------------------
1 |
2 | public Image getImage(URL url, String name) {
3 | try {
4 | /*
5 | Regular multiline comment.
6 | */
7 | return getImage(new URL(url, name));
8 | } catch (MalformedURLException e) {
9 | return null;
10 | }
11 | }
12 |
13 |
14 |
33 |
--------------------------------------------------------------------------------
/src/static/syntaxhighlighter_3.0.83/tests/cases/013_html_script.html:
--------------------------------------------------------------------------------
1 |
2 | <hello>
3 | <%
4 | package free.cafekiwi.gotapi;
5 | %>
6 | </hello>
7 |
8 |
11 | <%= print(); %>
12 |
13 |
14 |
35 |
--------------------------------------------------------------------------------
/sentry/plugins/sentry_sites/models.py:
--------------------------------------------------------------------------------
1 | from django.shortcuts import render_to_response
2 | from django.template.loader import render_to_string
3 |
4 | from sentry.plugins import GroupActionProvider
5 |
6 | class SiteGroupPanel(GroupActionProvider):
7 | """Adds additional support for showing information about sites including:
8 |
9 | * A panel which shows all sites a message was seen on.
10 | * A sidebar module which shows the sites most actively seen on.
11 | """
12 |
13 | title = 'Sites'
14 |
15 | def panels(self, request, panel_list, group):
16 | panel_list.append((self.title, self.__class__.get_url(group.pk)))
17 | return panel_list
18 |
19 | def view(self, request, group):
20 | return render_to_response('sentry/plugins/sentry_sites/index.html', locals())
21 |
22 | def widget(self, request, group):
23 | return render_to_string('sentry/plugins/sentry_sites/widget.html', locals())
--------------------------------------------------------------------------------
/src/accounts/templates/accounts/_achievements.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 |
3 | {% if theme == 'forum' %}
4 | {% for obj in user_achivements %}
5 |
13 | {% endfor %}
14 | {% else %}
15 | {% for obj in achivements %}
16 |
24 | {% endfor %}
25 | {% endif %}
--------------------------------------------------------------------------------
/lib/pagination/locale/fr/LC_MESSAGES/django.po:
--------------------------------------------------------------------------------
1 | # django-pagination French translation.
2 | # Copyright (C) 2008, Julien Demoor
3 | # This file is distributed under the same license as the django-pagination package.
4 | # Julien Demoor , 2008
5 | #
6 | msgid ""
7 | msgstr ""
8 | "Project-Id-Version: PACKAGE VERSION\n"
9 | "Report-Msgid-Bugs-To: \n"
10 | "POT-Creation-Date: 2008-10-24 00:41-0700\n"
11 | "PO-Revision-Date: 2008-10-19 10:19+0200\n"
12 | "Last-Translator: Julien Demoor \n"
13 | "Language-Team: LANGUAGE \n"
14 | "MIME-Version: 1.0\n"
15 | "Content-Type: text/plain; charset=UTF-8\n"
16 | "Content-Transfer-Encoding: 8bit\n"
17 |
18 | #: templates/pagination/pagination.html:5
19 | #: templates/pagination/pagination.html:7
20 | msgid "previous"
21 | msgstr "précédente"
22 |
23 | #: templates/pagination/pagination.html:21
24 | #: templates/pagination/pagination.html:23
25 | msgid "next"
26 | msgstr "suivante"
27 |
--------------------------------------------------------------------------------
/sentry/plugins/sentry_servers/models.py:
--------------------------------------------------------------------------------
1 | from django.shortcuts import render_to_response
2 | from django.template.loader import render_to_string
3 |
4 | from sentry.plugins import GroupActionProvider
5 |
6 | class ServerGroupPanel(GroupActionProvider):
7 | """Adds additional support for showing information about servers including:
8 |
9 | * A panel which shows all servers a message was seen on.
10 | * A sidebar module which shows the servers most actively seen on.
11 | """
12 |
13 | title = 'Servers'
14 |
15 | def panels(self, request, panel_list, group):
16 | panel_list.append((self.title, self.__class__.get_url(group.pk)))
17 | return panel_list
18 |
19 | def view(self, request, group):
20 | return render_to_response('sentry/plugins/sentry_servers/index.html', locals())
21 |
22 | def widget(self, request, group):
23 | return render_to_string('sentry/plugins/sentry_servers/widget.html', locals())
--------------------------------------------------------------------------------
/src/static/leeflet_0.4.5/src/layer/vector/Path.Popup.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Popup extension to L.Path (polylines, polygons, circles), adding bindPopup method.
3 | */
4 |
5 | L.Path.include({
6 |
7 | bindPopup: function (content, options) {
8 |
9 | if (!this._popup || this._popup.options !== options) {
10 | this._popup = new L.Popup(options, this);
11 | }
12 |
13 | this._popup.setContent(content);
14 |
15 | if (!this._openPopupAdded) {
16 | this.on('click', this._openPopup, this);
17 | this._openPopupAdded = true;
18 | }
19 |
20 | return this;
21 | },
22 |
23 | openPopup: function (latlng) {
24 |
25 | if (this._popup) {
26 | latlng = latlng || this._latlng ||
27 | this._latlngs[Math.floor(this._latlngs.length / 2)];
28 |
29 | this._openPopup({latlng: latlng});
30 | }
31 |
32 | return this;
33 | },
34 |
35 | _openPopup: function (e) {
36 | this._popup.setLatLng(e.latlng);
37 | this._map.openPopup(this._popup);
38 | }
39 | });
40 |
--------------------------------------------------------------------------------
/lib/pagination/locale/pl/LC_MESSAGES/django.po:
--------------------------------------------------------------------------------
1 | # Polish translation of django-pagination.
2 | # Copyright (C) 2008, django-pagination team
3 | # This file is distributed under the same license as the django-pagination package.
4 | # Jarek Zgoda , 2008.
5 | #
6 | #, fuzzy
7 | msgid ""
8 | msgstr ""
9 | "Project-Id-Version: 1.0\n"
10 | "Report-Msgid-Bugs-To: \n"
11 | "POT-Creation-Date: 2008-10-24 00:41-0700\n"
12 | "PO-Revision-Date: 2008-10-20 20:52+0200\n"
13 | "Last-Translator: Jarek Zgoda \n"
14 | "Language-Team: PL \n"
15 | "MIME-Version: 1.0\n"
16 | "Content-Type: text/plain; charset=UTF-8\n"
17 | "Content-Transfer-Encoding: 8bit\n"
18 |
19 | #: templates/pagination/pagination.html:5
20 | #: templates/pagination/pagination.html:7
21 | msgid "previous"
22 | msgstr "poprzednia"
23 |
24 | #: templates/pagination/pagination.html:21
25 | #: templates/pagination/pagination.html:23
26 | msgid "next"
27 | msgstr "następna"
28 |
--------------------------------------------------------------------------------
/import.sh:
--------------------------------------------------------------------------------
1 | function help() {
2 | echo -en "\nUsage: `basename $0` [ [ ...]]\n\n"
3 | echo -en "where is:\n"
4 | echo -en "\t* production\n\t* testing\n\n"
5 | echo -en "where is:\n"
6 | echo -en "\t* static -- import static files;\n"
7 | echo -en "\t* database -- import database content;\n"
8 | echo -en "\n"
9 | }
10 |
11 | if [ "$#" == "0" ] || [ "$1" == "help" ] || [ "$1" == "-h" ]; then
12 | help; exit 0
13 | fi
14 |
15 | TARGET=$1
16 | FAB="fab ${TARGET} importing"
17 | DELIM=":"
18 |
19 | for param in $@; do
20 | case ${param} in
21 | testing)
22 | echo "TESTING";;
23 | production)
24 | echo "PRODUCTION";;
25 | static)
26 | FAB="${FAB}${DELIM}rsync=y"; DELIM=",";;
27 | database)
28 | FAB="${FAB}${DELIM}database=y"; DELIM=",";;
29 | *)
30 | help; exit 1;;
31 | esac
32 | done
33 |
34 | ${FAB}
35 |
--------------------------------------------------------------------------------
/reqs/base.txt:
--------------------------------------------------------------------------------
1 | # Список зависимостей для работы проекта.
2 | setuptools==12.0.5
3 | Django>=1.8.7,<1.9
4 | django-autoslug-field==0.2.3
5 | django-extensions==1.2.2
6 | django-haystack==2.3.1
7 | django-model-utils==1.0.0
8 | django-pagedown==0.0.5
9 | python-social-auth==0.2.6
10 | django-salmonella==0.5.1
11 | django-tagging==0.3.4
12 | django-ordered-model==0.4.1
13 | feedparser==5.1.3
14 | Markdown>=2.3
15 | mysql-python
16 | oauth2>=1.5.167,<1.6
17 | python-dateutil==1.5
18 | python_openid==2.2.5
19 | pytils==0.2.3
20 | pygal==1.5.1
21 | Pillow==2.9.0
22 | sqlparse==0.1.14
23 | pytz
24 | sorl-thumbnail==12.2
25 | beautifulsoup==3.2.1
26 | -e git+http://github.com/clintecker/django-google-analytics.git/#egg=django-google_analytics
27 | -e git+https://github.com/RaD/haystack-static-pages.git/#egg=haystack-static-pages
28 | # -e git+https://github.com/notanumber/xapian-haystack.git/#egg=xapian-haystack
29 | -e git+https://github.com/viorels/xapian-haystack.git/#egg=xapian-haystack
30 |
--------------------------------------------------------------------------------
/src/static/leeflet_0.4.5/plugins/markercluster/MarkerCluster.Default.css:
--------------------------------------------------------------------------------
1 | .marker-cluster-small {
2 | background-color: rgba(181, 226, 140, 0.6);
3 | }
4 | .marker-cluster-small div {
5 | background-color: rgba(110, 204, 57, 0.6);
6 | }
7 |
8 | .marker-cluster-medium {
9 | background-color: rgba(241, 211, 87, 0.6);
10 | }
11 | .marker-cluster-medium div {
12 | background-color: rgba(240, 194, 12, 0.6);
13 | }
14 |
15 | .marker-cluster-large {
16 | background-color: rgba(253, 156, 115, 0.6);
17 | }
18 | .marker-cluster-large div {
19 | background-color: rgba(241, 128, 23, 0.6);
20 | }
21 |
22 | .marker-cluster {
23 | background-clip: padding-box;
24 | border-radius: 20px;
25 | }
26 | .marker-cluster div {
27 | width: 30px;
28 | height: 30px;
29 | margin-left: 5px;
30 | margin-top: 5px;
31 |
32 | text-align: center;
33 | border-radius: 15px;
34 | font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
35 | }
36 | .marker-cluster span {
37 | line-height: 30px;
38 | }
--------------------------------------------------------------------------------
/src/local_settings.py.dev.template:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | LOCAL_SETTINGS = True
4 | from settings import *
5 |
6 | DEBUG = True
7 | TEMPLATE_DEBUG = True
8 |
9 | ADMINS = (
10 | )
11 |
12 | DATABASES = {
13 | 'default': dict(
14 | ENGINE='django.db.backends.sqlite3',
15 | NAME=rel_project('db.sqlite'),
16 | )
17 | }
18 |
19 | EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
20 |
21 | HAYSTACK_CONNECTIONS = {
22 | 'default': {
23 | 'ENGINE': 'haystack.backends.simple_backend.SimpleEngine',
24 | },
25 | }
26 |
27 | # make symlink from /django_documentation/_build/html/ to /djbookru/docs/rel
28 | # e.g. ln -s ~/workspace/django_documentation/_build/html/ ~/workspace/djbookru/docs/rel1.8
29 | STATICFILES_DIRS += (
30 | rel_project('docs'),
31 | )
32 | DJANGO_DOCUMENTATION_URL = '/static/rel%s/index.html' % DJANGO_DOCUMENTATION_VERSION
33 | DJANGO_DOCUMENTATION_SITEMAP_URL = '/static/rel%s/sitemap.xml' % DJANGO_DOCUMENTATION_VERSION
34 |
--------------------------------------------------------------------------------
/src/main/migrations_auth/0004_alter_user_username_opts.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from __future__ import unicode_literals
3 |
4 | import django.core.validators
5 | from django.db import migrations, models
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('auth', '0003_alter_user_email_max_length'),
12 | ]
13 |
14 | # No database changes; modifies validators and error_messages (#13147).
15 | operations = [
16 | migrations.AlterField(
17 | model_name='user',
18 | name='username',
19 | field=models.CharField(error_messages={'unique': 'A user with that username already exists.'}, max_length=30, validators=[django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.', 'invalid')], help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.', unique=True, verbose_name='username'),
20 | ),
21 | ]
22 |
--------------------------------------------------------------------------------
/src/templates/admin/examples/change_form.html:
--------------------------------------------------------------------------------
1 | {% extends "admin/change_form.html" %}
2 |
3 |
4 | {% load i18n admin_modify admin_static %}
5 |
6 |
7 | {% block object-tools %}
8 | {{ block.super }}
9 | {% if change %}
10 | {% if not original.approved %}
11 |
12 | {% trans "Pay attention! This post is not approved and can be from users. It can contain XSS in content, so use 'View on site' carefully." %}
13 |
14 | {% endif %}
15 | {% if original.is_draft_for %}
16 | {% url "admin:examples_example_change" original.is_draft_for.id as other_post_url %}
17 |
18 | {% blocktrans %}This post is edited version of other post .{% endblocktrans %}
19 |
20 | {% endif %}
21 | {% endif %}
22 | {% endblock %}
--------------------------------------------------------------------------------
/src/static/theme/js/fancybox/source/helpers/jquery.fancybox-thumbs.css:
--------------------------------------------------------------------------------
1 | #fancybox-thumbs {
2 | position: fixed;
3 | left: 0;
4 | width: 100%;
5 | overflow: hidden;
6 | z-index: 8050;
7 | }
8 |
9 | #fancybox-thumbs.bottom {
10 | bottom: 2px;
11 | }
12 |
13 | #fancybox-thumbs.top {
14 | top: 2px;
15 | }
16 |
17 | #fancybox-thumbs ul {
18 | position: relative;
19 | list-style: none;
20 | margin: 0;
21 | padding: 0;
22 | }
23 |
24 | #fancybox-thumbs ul li {
25 | float: left;
26 | padding: 1px;
27 | opacity: 0.5;
28 | }
29 |
30 | #fancybox-thumbs ul li.active {
31 | opacity: 0.75;
32 | padding: 0;
33 | border: 1px solid #fff;
34 | }
35 |
36 | #fancybox-thumbs ul li:hover {
37 | opacity: 1;
38 | }
39 |
40 | #fancybox-thumbs ul li a {
41 | display: block;
42 | position: relative;
43 | overflow: hidden;
44 | border: 1px solid #222;
45 | background: #111;
46 | outline: none;
47 | }
48 |
49 | #fancybox-thumbs ul li img {
50 | display: block;
51 | position: relative;
52 | border: 0;
53 | padding: 0;
54 | }
--------------------------------------------------------------------------------
/src/static/leeflet_0.4.5/src/geometry/Transformation.js:
--------------------------------------------------------------------------------
1 | /*
2 | * L.Transformation is an utility class to perform simple point transformations through a 2d-matrix.
3 | */
4 |
5 | L.Transformation = L.Class.extend({
6 | initialize: function (/*Number*/ a, /*Number*/ b, /*Number*/ c, /*Number*/ d) {
7 | this._a = a;
8 | this._b = b;
9 | this._c = c;
10 | this._d = d;
11 | },
12 |
13 | transform: function (point, scale) {
14 | return this._transform(point.clone(), scale);
15 | },
16 |
17 | // destructive transform (faster)
18 | _transform: function (/*Point*/ point, /*Number*/ scale) /*-> Point*/ {
19 | scale = scale || 1;
20 | point.x = scale * (this._a * point.x + this._b);
21 | point.y = scale * (this._c * point.y + this._d);
22 | return point;
23 | },
24 |
25 | untransform: function (/*Point*/ point, /*Number*/ scale) /*-> Point*/ {
26 | scale = scale || 1;
27 | return new L.Point(
28 | (point.x / scale - this._b) / this._a,
29 | (point.y / scale - this._d) / this._c);
30 | }
31 | });
32 |
--------------------------------------------------------------------------------
/lib/oembed/admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 | from oembed.models import StoredProvider, StoredOEmbed
3 |
4 |
5 | class StoredProviderAdmin(admin.ModelAdmin):
6 | list_display = ('wildcard_regex', 'endpoint_url', 'active', 'provides')
7 | list_filter = ('active', 'provides')
8 |
9 | actions = ['activate', 'deactivate']
10 |
11 | def activate(self, request, queryset):
12 | for item in queryset:
13 | item.active = True
14 | item.save()
15 | activate.short_description = "Activate selected Stored Providers"
16 |
17 | def deactivate(self, request, queryset):
18 | for item in queryset:
19 | item.active = False
20 | item.save()
21 | deactivate.short_description = "Deactivate selected Stored Providers"
22 |
23 |
24 | class StoredOEmbedAdmin(admin.ModelAdmin):
25 | list_display = ('match', 'date_added')
26 |
27 |
28 | #admin.site.register(StoredProvider, StoredProviderAdmin)
29 | #admin.site.register(StoredOEmbed, StoredOEmbedAdmin)
30 |
--------------------------------------------------------------------------------
/addon/under_construction.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | djbook.ru: Миграция на Django 1.4.1
5 |
6 |
7 |
8 |
9 |
10 | В настоящее время сайт переводится под управление Django 1.4.1.
11 |
12 |
13 | Будьте терпеливы, мы надеемся запустить когда-нибудь систему ;)
14 |
15 |
16 | Документация по-прежнему доступна. Документация на Django 1.4 .
17 |
18 |
19 |
20 |
22 |
23 |
24 |
25 | Команда DJBOOK.RU
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/src/forum/admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 | from .models import Category, Forum, Topic, Post
3 |
4 |
5 | class CategoryAdmin(admin.ModelAdmin):
6 | list_display = ['name', 'position']
7 | list_editable = ['position']
8 |
9 |
10 | class ForumAdmin(admin.ModelAdmin):
11 | list_display = ['name', 'category', 'position']
12 | list_editable = ['position']
13 | search_fields = ('name',)
14 |
15 |
16 | class TopicAdmin(admin.ModelAdmin):
17 | list_filter = ['sticky', 'closed', 'heresy', 'send_response']
18 | list_display = ['name', 'forum', 'created', 'updated', 'user', 'views', 'rating', 'sticky', 'send_response']
19 | search_fields = ('name',)
20 |
21 |
22 | class PostAdmin(admin.ModelAdmin):
23 | list_display = ['__unicode__', 'topic', 'user', 'rating', 'created', 'updated', 'updated_by']
24 | search_fields = ('topic__name', 'body')
25 |
26 | admin.site.register(Post, PostAdmin)
27 | admin.site.register(Topic, TopicAdmin)
28 | admin.site.register(Category, CategoryAdmin)
29 | admin.site.register(Forum, ForumAdmin)
30 |
--------------------------------------------------------------------------------
/src/forum/search_indexes.py:
--------------------------------------------------------------------------------
1 | # encoding: utf-8
2 |
3 | from haystack import indexes
4 | from .models import Topic
5 |
6 |
7 | class TopicIndex(indexes.SearchIndex, indexes.Indexable):
8 | text = indexes.CharField(document=True, use_template=True)
9 | author = indexes.CharField(model_attr='user')
10 | created = indexes.DateTimeField(model_attr='created')
11 | name = indexes.CharField(model_attr='name')
12 | category = indexes.CharField(model_attr='forum__category__name')
13 | forum = indexes.IntegerField(model_attr='forum__pk')
14 |
15 | def get_model(self):
16 | return Topic
17 |
18 | def index_queryset(self, using=None):
19 | return self.get_model().objects.filter(forum__category__groups=None)
20 |
21 | def prepare(self, obj):
22 | # Fix Xapian error about terms longer then 245
23 | self.prepared_data = super(TopicIndex, self).prepare(obj)
24 | terms = self.prepared_data['text'].split(' ')
25 | self.prepared_data['text'] = u' '.join(term[:230] for term in terms)
26 | return self.prepared_data
--------------------------------------------------------------------------------
/src/news/admin.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from django.contrib import admin
4 | from django.db.models import TextField
5 | from django.forms import ModelForm
6 |
7 | from pagedown.widgets import AdminPagedownWidget
8 | from src.news import models
9 |
10 |
11 | class NewsForm(ModelForm):
12 |
13 | class Meta:
14 | model = models.News
15 | fields = '__all__'
16 |
17 |
18 | class NewsAdmin(admin.ModelAdmin):
19 | list_display = ['title', 'approved', 'created']
20 | search_fields = ('title',)
21 | form = NewsForm
22 |
23 | def save_model(self, request, obj, form, change):
24 | if not change:
25 | obj.author = request.user
26 | obj.save()
27 |
28 | formfield_overrides = {
29 | TextField: {'widget': AdminPagedownWidget},
30 | }
31 |
32 |
33 | class ResourceRSSAdmin(admin.ModelAdmin):
34 | list_display = ['title', 'link', 'is_active', 'approved_by_default', 'sync_date']
35 |
36 | admin.site.register(models.News, NewsAdmin)
37 | admin.site.register(models.ResourceRSS, ResourceRSSAdmin)
38 |
--------------------------------------------------------------------------------
/src/accounts/templatetags/accounts_tags.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from __future__ import absolute_import, unicode_literals
3 |
4 | from django import template
5 |
6 | from src.accounts.models import Announcement, Achievement
7 |
8 | register = template.Library()
9 |
10 |
11 | @register.inclusion_tag('accounts/_menu.html', takes_context=True)
12 | def profile_menu(context, current=None):
13 | return {
14 | 'user': context['user'],
15 | 'current': current
16 | }
17 |
18 |
19 | @register.inclusion_tag('accounts/_announcements.html', takes_context=True)
20 | def announcements(context):
21 | return {
22 | 'announcements': Announcement.objects.filter(is_active=True)
23 | }
24 |
25 |
26 | @register.inclusion_tag('accounts/_achievements.html', takes_context=True)
27 | def achievements(context, user, theme=None):
28 | return {
29 | 'theme': theme,
30 | 'user_achivements': Achievement.objects.filter(userachievement__user=user),
31 | 'user_obj': user,
32 | 'achivements': Achievement.objects.all()
33 | }
34 |
--------------------------------------------------------------------------------
/src/forum/static/forum/js/rating.js:
--------------------------------------------------------------------------------
1 | jQuery(function($) {
2 | function drawRating($item) {
3 | $item.find('.rating').text($item.data('rating'));
4 |
5 | if ($item.data('has-vote')) {
6 | $item.find('a').prop('class', 'fa fa-thumbs-up');
7 | } else {
8 | $item.find('a').prop('class', 'fa fa-thumbs-o-up');
9 | }
10 | }
11 |
12 | $('.js-rating').each(function() {
13 | var $this = $(this),
14 | has_vote = $this.data('has-vote') === 'True';
15 |
16 | drawRating($this);
17 |
18 | $this.find('a').click(function() {
19 | var $a = $(this),
20 | $item = $a.parent();
21 |
22 | $.post($a.attr('href'), function(resp) {
23 | if (resp.error) {
24 |
25 | } else {
26 | $item.data('rating', resp.rating);
27 | $item.data('has-vote', resp.voted);
28 | drawRating($item);
29 | }
30 | });
31 | return false;
32 | });
33 | });
34 | });
--------------------------------------------------------------------------------
/src/static/syntaxhighlighter_3.0.83/tests/cases/003_script_tag.html:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
24 |
43 |
--------------------------------------------------------------------------------
/src/static/syntaxhighlighter_3.0.83/tests/cases/001_basic.html:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * multiline comment
4 | */
5 |
6 | text
7 |
8 | // single line comment
9 |
10 | text
11 |
12 | "string" text 'string' text "string"
13 | "string with \" escape" text 'string with \' escape' text "string with \" escape"
14 |
15 | var code = '\
16 | function helloWorld()\
17 | {\
18 | // this is great!\
19 | for(var i = 0; i <= 1; i++)\
20 | alert("yay");\
21 | }\
22 | ';
23 |
24 |
25 |
43 |
--------------------------------------------------------------------------------
/lib/decodehtmlentities:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | # decodehtmlentities: Decode using the htmlentitiesdecode module
4 | # Copyright (C) 2010 Niels Serup
5 |
6 | # This program is free software: you can redistribute it and/or modify
7 | # it under the terms of the Do What The Fuck You Want To Public
8 | # License as published by Sam Hocevar, either version 2 of the
9 | # License, or (at your option) any later version.
10 | #
11 | # This program is distributed in the hope that it will be useful, but
12 | # WITHOUT ANY WARRANTY; without even the implied warranty of
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Do
14 | # What The Fuck You Want To Public License for more details.
15 | #
16 | # You should have received a copy of the Do What The Fuck You Want To
17 | # Public License along with this program. If not, see
18 | # .
19 |
20 | # Version:..... 0.1.0
21 | # Maintainer:.. Niels Serup
22 |
23 |
24 | # This is a Python program.
25 | import sys
26 | from htmlentitiesdecode import decode
27 |
28 | print decode(' '.join(sys.argv[1:]))
29 |
--------------------------------------------------------------------------------
4 | {% with comments_count=obj|get_comment_count %} 5 | {{ comments_count }} {% blocktrans count counter=comments_count %}comment{% plural %}comments{% endblocktrans %} 6 | {% endwith %} 7 | | {% trans 'Make a comment' %} 8 |
9 | 10 | {% render_comment_list obj %} 11 | {% render_comment_form obj %} 12 |