This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| parts = request.path.split('/') | |
| try: | |
| active_menu = parts[1] | |
| except IndexError: | |
| active_menu = '' | |
| try: | |
| active_section = parts[2] | |
| except IndexError: | |
| active_section = '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {% load tree_tag %} | |
| {% tree object_list with level as level %} | |
| <ul{% ifequal tree.level 1 %} class="root"{% endifequal %}> | |
| {% node %} | |
| <li>{{ tree.node.title }}{% subtree %}</li> | |
| {% endnode %} | |
| </ul> | |
| {% endtree %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| task("install", lambda {: | |
| # code | |
| :}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Article extends Publication | |
| initialize: (@title, @content) -> | |
| render: -> | |
| @$(".title").html @title | |
| @$(".content").html @content |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Django==1.3.0 | |
| django-celery==2.2.4 | |
| celery==2.2.7 | |
| anyjson==0.3.1 | |
| kombu==1.2.0 | |
| amqplib==1.0.0 | |
| python-dateutil==1.5 | |
| django-picklefield==0.1.9 | |
| django_compressor==1.1.2 | |
| django-appconf==0.4.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from django.utils import simplejson as json | |
| class JSONRequestMixin(object): | |
| def get_request_data(self): | |
| return json.loads(self.request.body) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # codec: blocks | |
| describe('articles.views.ArticleView'): | |
| context('when user has permissions'): | |
| it('should add new article'): | |
| # some code | |
| it('should delete existing article'): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from flask import Flask | |
| from flask_gears import Gears | |
| app = Flask(__name__) | |
| gears = Gears() | |
| gears.init_app(app) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func(one, two, | |
| three, four) | |
| # or | |
| func( | |
| one, two, | |
| three, four) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Mailer.send( | |
| sender = '[email protected]', | |
| recipients = ['[email protected]', '[email protected]'], | |
| context_data = {'site': site}, | |
| template_name = 'mailer/messages/message') | |
| ModelMailer.send( | |
| object = message, | |
| request = request, |