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
what_i_want = dict( | |
name = performer.name, | |
slug = slug, | |
sound_description = performer.short_bio, | |
history = performer.long_bio, | |
eventful_id = performer.id, | |
primary_category_id = PERFORMER_CATEGORY, | |
website = website, | |
) |
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_text = indexes.CharField(model_attr='bio') | |
+ body_text = indexes.CharField(model_attr='blurb') | |
+ body_text = indexes.CharField(model_attr='body') | |
+ body_text = indexes.CharField(model_attr='caption') | |
+ body_text = indexes.CharField(model_attr='description') | |
+ body_text = indexes.CharField(model_attr='description') | |
+ body_text = indexes.CharField(model_attr='description') | |
+ body_text = indexes.CharField(model_attr='long_description') | |
+ body_text = indexes.CharField(model_attr='question') | |
+ body_text = indexes.CharField(model_attr='story') |
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
# Change this to match your user. | |
username = 'daniel' | |
from tastypie.models import ApiKey | |
from django.contrib.auth.models import User | |
my_user = User.objects.get(username=username) | |
key, created = ApiKey.objects.get_or_create(user=my_user) | |
# Now use key.key for the digest password. |
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 _build_coherent_name(field, parent): | |
return parent and '.'.join((parent, field)) or field | |
def _verify_fields_recursive(expected, data, parent=None): | |
analysis = {} | |
for field, field_info in expected.items(): | |
coherent_name = _build_coherent_name(field, parent) | |
status = field in data and 'found' or 'missing', |
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
>>> thing = type('name', (object,), {'hello':'hello world'})() | |
>>> thing.hello | |
'hello world' | |
class name(object): | |
hello = 'hello world' |
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
diff --git a/medley/abcs/extensions_admin.py b/medley/abcs/extensions_admin.py | |
index 90f3db9..2e9a7d4 100644 | |
--- a/medley/abcs/extensions_admin.py | |
+++ b/medley/abcs/extensions_admin.py | |
@@ -216,6 +216,7 @@ class MedleyBaseModelAdminForm(BaseModelForm): | |
def clean_primary_category(self): | |
primary_category = self.cleaned_data.get('primary_category') | |
+ return primary_category | |
if primary_category: |
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 jellydoughnut | |
git checkout prod_schema | |
unset CMG_LOCAL_VIRTUALENV_VERSION | |
source three_venv.sh | |
#activate your VE | |
load_prod_schema | |
#for storyville | |
git checkout crap_fixture | |
django-admin.py loaddata category_taxonomy.json |
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
diff --git a/medley/medley_ads/tests/test_bulkadload.py b/medley/medley_ads/tests/test_bulkadload.py | |
index dc2ccb5..5272ea6 100644 | |
--- a/medley/medley_ads/tests/test_bulkadload.py | |
+++ b/medley/medley_ads/tests/test_bulkadload.py | |
@@ -2,6 +2,7 @@ | |
Tests for the bulk_ad_load view and new adt_tag | |
""" | |
import httplib2 | |
+from datetime import datetime, timedelta | |
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
sudo pvs | |
sudo lvscan | |
#if the volgrp is not avail do this | |
sudo lvchange -a y <volgroup> | |
sudo mount /dev/ubuntu/root /mnt |
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
<!-- Begin Cox Digital Solutions tag for "Leaderboard" Ad Space (728x90) ID #1000007413807 --> | |
<script type="text/javascript"> | |
sr_adspace_id = 1000007413807; | |
sr_adspace_width = 728; | |
sr_adspace_height = 90; | |
sr_ad_new_window = true; | |
sr_adspace_type = "graphic"; | |
sr_k1 = ""; | |
sr_k2 = ""; |