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
| def get_apps(): | |
| types = ContentType.objects.all() | |
| allowed_types = [] | |
| for ct in types: | |
| m = ct.model_class() | |
| if m.__module__ in ALLOWED_APPS: | |
| choice = '%s.%s' % (m.__module__, m.__name__) | |
| allowed_types.append(choice) |
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
| {% for artist in object.tombstone.artists %} | |
| {{ artist.display_name|safe }} | |
| {% empty %} | |
| Various Artists | |
| {% endfor %} | |
| {{ object.title|safe }} | |
| {{ object.custom_author_name|default:""|safe }} |
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
| body { | |
| margin: 0; | |
| } | |
| a:hover, a:visited { | |
| text-decoration: none; | |
| color: #ef4135; | |
| } | |
| #header-container .lead { |
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.conf.urls.defaults import patterns, url | |
| from django.contrib.auth.models import User | |
| from autocomplete_utils.views import autocomplete | |
| urlpatterns = patterns( | |
| '', | |
| url(r'^_ac/users-ac/$', autocomplete, |
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
| @keyframes colorPulse { | |
| 0% {color: red;} | |
| 50% {color: blue;} | |
| 100% {color: green;} | |
| } | |
| @-webkit-keyframes colorPulse { | |
| 0% {color: red;} | |
| 50% {color: blue;} | |
| 100% {color: green;} |
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
| # | |
| # Scheduler | |
| # | |
| DJANGO_SCHEDULER_SEARCH_FIELDS = { | |
| 'default': { | |
| '*': ('title',) | |
| } | |
| } |
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 | |
| @runs_once | |
| def export(*tables): | |
| download_path = prompt('Where should I save the DB dump? [default: .]') | |
| # use defaul database | |
| db = DATABASES['default'] | |
| run('rm -f /tmp/production-*.sql*') |
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
| InnoDB: Check that you do not already have another mysqld process | |
| InnoDB: using the same InnoDB data or log files. | |
| InnoDB: Unable to lock ./ibdata1, error: 35 | |
| InnoDB: Check that you do not already have another mysqld process | |
| InnoDB: using the same InnoDB data or log files. | |
| InnoDB: Unable to lock ./ibdata1, error: 35 | |
| InnoDB: Check that you do not already have another mysqld process | |
| InnoDB: using the same InnoDB data or log files. | |
| InnoDB: Unable to lock ./ibdata1, error: 35 | |
| InnoDB: Check that you do not already have another mysqld process |
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
| pmf.LockingHeader = Backbone.View.extend({ | |
| initialize: function() { | |
| _.bindAll(this, 'on_page_scroll'); | |
| $(window).scroll(this.on_page_scroll); | |
| }, | |
| on_page_scroll: function() { | |
| var t = document.getElementById('nav-boundary').getBoundingClientRect().top; | |
| var nav = this.$el.find('#horizontal-nav'); | |
| if(t < 0) { |
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
| import logging | |
| from datetime import datetime | |
| from django.core.management.base import NoArgsCommand | |
| logging.basicConfig(level=logging.INFO) | |
| log = logging.getLogger('testlogger') | |
| class Command(NoArgsCommand): |