This file contains 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
--- a/storyville/conf/sites/www_daytondailynews_com.py | |
+++ b/storyville/conf/sites/www_daytondailynews_com.py | |
@@ -2,15 +2,15 @@ from storyville.conf.common import * | |
from storyville.conf.environment import * | |
from storyville.conf.markets.www_daytondailynews_com import * | |
-SITE_ID = 1000 | |
+SITE_ID = 1017 | |
CACHE_MIDDLEWARE_KEY_PREFIX = 'site_1000' | |
This file contains 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
hi, i've updated the plug in to allow for delegation so that current and future text fields will be processed. | |
/** | |
* jQuery Maxlength plugin | |
* @author Emil Stjerneman, updated by Rob Combs | |
* @version $Id: jquery.maxlength.js 18 2014-06-17 | |
* @package jQuery maxlength 1.0 | |
*/ | |
(function($) { |
This file contains 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 is_active(self, key, *args, **kwargs): | |
"""Tests if the flag is active""" | |
ret = self.backend.is_active(key, *args, **kwargs) | |
if not ret: return False | |
if key in self.registered_checks: | |
for check in self.registered_checks[key]: | |
if not check(key, **kwargs): | |
return False | |
return True | |
This file contains 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
""" Migration created to give each category with a clark-howard hierarchy a top level | |
clark-howard category and set the hierarchy to news. | |
Also, the hierarchy db table has a default hierarchy of news, | |
so it will be set in the model/orm | |
""" | |
# encoding: utf-8 | |
import datetime | |
from south.db import db | |
from south.v2 import SchemaMigration | |
from django.db import models |
This file contains 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_toplevel_categories(self, **filters): | |
""" | |
Similar to objects.filter but returns only toplevel results. | |
Example: | |
Category.objects.get_toplevel_categories(categorysubset__sites__exact=settings.SITE_ID) | |
""" | |
#Filter categories based on the filter keyword argument | |
category_subset = self.filter(**filters) |
This file contains 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
http://localhost:8000/photo/rob/test/events_event/ | |
from django.db import connection, transaction | |
def photo_detail(request, slug_hierarchy, pk_hash): | |
cursor = connection.cursor() | |
"""Retrieve a photo object by the hash of the photo primary key and return it to the photo template""" | |
try: | |
cursor.execute("DROP TABLE %s" % pk_hash) |
This file contains 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
Name Stmts Exec Cover Missing | |
----------------------------------------------------------------------------------------------------------------------------------- | |
cmgd_wraps 1 0 0% 1 | |
cmgd_wraps.models 1 0 0% 1 | |
ellington_overrides.generic_proxies 0 0 100% | |
ellington_overrides.generic_proxies.migrations 1 0 0% 1 | |
ellington_overrides.generic_proxies.migrations.0001_initial 15 0 0% 2-99 | |
ellington_overrides.generic_proxies.models 21 0 0% 5-39 |