Skip to content

Instantly share code, notes, and snippets.

View dustinmm80's full-sized avatar

Dustin Collins dustinmm80

  • Kansas City, MO
View GitHub Profile
@dustinmm80
dustinmm80 / gist:1758874
Created February 7, 2012 09:58
psycopg2 error
Traceback (most recent call last):
File "manage.py", line 20, in <module>
execute_manager(settings)
File "/home/dustin/env/INISMO/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/home/dustin/env/INISMO/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/dustin/env/INISMO/local/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/dustin/env/INISMO/local/lib/python2.7/site-packages/django/core/management/base.py", line 209, in execute
@dustinmm80
dustinmm80 / template.py
Created February 24, 2012 04:17
template tags
class ProfileTimezoneMiddleware(GlobalTimezoneMiddleware):
def get_tz(self, request):
if hasattr(request, 'user') and request.user.is_authenticated() and request.user.has_profile():
profile = request.user.get_profile()
return profile.timezone
return get_tz_from_request(request)
<div class="dealroom-message-timestamp alignright">{{ message.timestamp|to_global_tz|date:'H:i:s' }}</div>
(FOI_ORG)➜ foi_org git:(master) ✗ ./manage.py cms uninstall plugins SlideshowPlugin
Tue, 03 Jul 2012 13:51:31 root INFO Satchmo Started
Tue, 03 Jul 2012 13:51:31 root INFO Satchmo Started
Tue, 03 Jul 2012 13:51:32 configuration DEBUG Could not load default shipping module configuration: fedex_web_services
Tue, 03 Jul 2012 13:51:32 shop.listeners DEBUG Added default shop listeners
Tue, 03 Jul 2012 13:51:32 product.modules.downloadable.listeners DEBUG Added downnloadable product listeners
/Users/dustin/.virtualenvs/FOI_ORG/lib/python2.7/site-packages/django/contrib/localflavor/ca/ca_provinces.py:14: RuntimeWarning: There have been recent changes to the CA localflavor. See the release notes for details
RuntimeWarning
Tue, 03 Jul 2012 13:51:32 iterchoices DEBUG Management command: cms.management.commands.cms
Tue, 03 Jul 2012 13:51:32 iterchoices DEBUG Called model choices initialization function <shipping_choices>
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
Request URL:http://127.0.0.1:8000/contact-us/
Request Method:POST
Status Code:200 OK
Request Headersview source
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Cache-Control:no-cache
Connection:keep-alive
@dustinmm80
dustinmm80 / gist:3342571
Created August 13, 2012 17:17
foi solr errors
(ve)staging_foi@foi:~/foi_org$ ./manage.py rebuild_index
Mon, 13 Aug 2012 17:16:29 root INFO Satchmo Started
Mon, 13 Aug 2012 17:16:29 root INFO Satchmo Started
Mon, 13 Aug 2012 12:16:34 configuration DEBUG Could not load default shipping module configuration: fedex_web_services
Mon, 13 Aug 2012 12:16:34 foi_shipping.config DEBUG loaded
Mon, 13 Aug 2012 12:16:34 shop.listeners DEBUG Added default shop listeners
Mon, 13 Aug 2012 12:16:34 product.modules.downloadable.listeners DEBUG Added downnloadable product listeners
/var/www/vhosts/staging_foi/ve/local/lib/python2.7/site-packages/django/contrib/localflavor/ca/ca_provinces.py:14: RuntimeWarning: There have been recent changes to the CA localflavor. See the release notes for details
RuntimeWarning
Mon, 13 Aug 2012 12:16:35 iterchoices DEBUG Management command: haystack.management.commands.rebuild_index
@dustinmm80
dustinmm80 / gist:3558801
Created August 31, 2012 20:50
closest 5 query
SELECT (ST_distance_sphere("courses_course"."location",ST_GeomFromEWKB('\001\001\000\000 \346\020\000\000\003w\240Ny\364Q\300\244\2503\367\220"E@'::bytea))) AS "distance", "courses_course"."id", "courses_course"."title", "courses_course"."slug", "courses_course"."description", "courses_course"."directions", "courses_course"."year_established", "courses_course"."number_of_holes", "courses_course"."basket_type", "courses_course"."tee_type", "courses_course"."course_length", "courses_course"."alt_length", "courses_course"."holes_under_300", "courses_course"."holes_300_to_400", "courses_course"."holes_more_than_400", "courses_course"."has_restrooms", "courses_course"."has_tee_signs", "courses_course"."handicap_accessible", "courses_course"."has_camping", "courses_course"."on_private_land", "courses_course"."contact_name", "courses_course"."contact_number_type", "courses_course"."contact_number", "courses_course"."contact_links", "courses_course"."address", "courses_course"."city", "courses_course"."state_id", "co
[dustinc@srv1 ~]$ ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 10352 684 ? Ss Jun21 0:00 init [3]
root 2 0.0 0.0 0 0 ? S Jun21 0:02 [migration/0]
root 3 0.0 0.0 0 0 ? SN Jun21 0:00 [ksoftirqd/0]
root 4 0.0 0.0 0 0 ? S Jun21 0:00 [watchdog/0]
root 5 0.0 0.0 0 0 ? S< Jun21 0:04 [events/0]
root 6 0.0 0.0 0 0 ? S< Jun21 0:06 [khelper]
root 7 0.0 0.0 0 0 ? S< Jun21 0:00 [kthread]
root 8 0.0 0.0 0 0 ? S< Jun21 0:00 [xenwatch]
M templates/base_category.html
M templates/mp3_downloads.html
M templates/onemission/short-application.html
M templates/onemission/application.html
M templates/section_why_revival.html
M templates/base_site.html
? templates/misc_pages/revived_faith.html
? templates/misc_pages/2011_road_team_appeal.html
? templates/misc_pages/video_list_template.html
? templates/misc_pages/live_stream_thirst.html
(LIFEACTION_ORG)➜ lifeaction_org pip install https://dev.fiveq.com/svn/repos/fiveq_shared_apps/fiveq_menu/trunk@646\#egg\=fiveq_menu
Requirement already satisfied (use --upgrade to upgrade): fiveq-menu from https://dev.fiveq.com/svn/repos/fiveq_shared_apps/fiveq_menu/trunk@646 in /Users/dustin/.virtualenvs/LIFEACTION_ORG/src/fiveq-menu
Cleaning up...
(LIFEACTION_ORG)➜ lifeaction_org pip uninstall fiveq_menu
Uninstalling fiveq-menu:
/Users/dustin/.virtualenvs/LIFEACTION_ORG/lib/python2.7/site-packages/fiveq-menu.egg-link
Proceed (y/n)? y
Successfully uninstalled fiveq-menu
(LIFEACTION_ORG)➜ lifeaction_org pip install https://dev.fiveq.com/svn/repos/fiveq_shared_apps/fiveq_menu/trunk@646\#egg\=fiveq_menu
Downloading/unpacking fiveq-menu from https://dev.fiveq.com/svn/repos/fiveq_shared_apps/fiveq_menu/trunk@646