Skip to content

Instantly share code, notes, and snippets.

View kkellydesign's full-sized avatar

Kasey Kelly kkellydesign

View GitHub Profile
@kkellydesign
kkellydesign / keybase.md
Created April 19, 2019 12:32
keybase.md

Keybase proof

I hereby claim:

  • I am kkellydesign on github.
  • I am kaseykelly (https://keybase.io/kaseykelly) on keybase.
  • I have a public key ASBeqP5HUgiaaHa9uri9NaVghnyqKFWGhoTD4MfkAKrv5Ao

To claim this, I am signing this object:

@kkellydesign
kkellydesign / SVG with a mask.svg
Created December 3, 2015 21:38
SVG with a mask.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kkellydesign
kkellydesign / views.py
Last active October 27, 2015 19:59
views.py
def by_location(request, location_slug):
doctors_list = Doctor.objects.filter(location__slug=location_slug)
location = Location.objects.get(slug=location_slug)
return render_to_response("doctors/location.html",
{"doctors_list": doctors_list},
{"location": location},
context_instance=RequestContext(request)
)
@kkellydesign
kkellydesign / gist:59b608cbddff739f84b0
Last active August 29, 2015 14:10
postgres problems
This is the offending error at the moment. I'm getting this on runserver:
(marriageinstitute)MacBook-Air:marriageinstitute Kasey$ python manage.py runserver
Error: dlopen(/Users/Kasey/.virtualenvs/marriageinstitute/lib/python2.7/site-packages/psycopg2/_psycopg.so, 2): Library not loaded: /usr/local/lib/libpq.5.4.dylib
Referenced from: /Users/Kasey/.virtualenvs/marriageinstitute/lib/python2.7/site-packages/psycopg2/_psycopg.so
Reason: image not found
Here's what I've tried. I googled "Library not loaded: /usr/local/lib/libpq.5.4.dylib" and found this. I did all these steps, but I'm still getting the error:
http://stackoverflow.com/questions/13410686/postgres-could-not-connect-to-server
@kkellydesign
kkellydesign / gist:b7d27f80d576153fd875
Last active August 29, 2015 14:05
django-treenav problem

Hi guys – if this isn't a bug and I've missed something, I apologize. I can't figure out what I might be doing wrong though. I'm running Django 1.4.12

I have the following menu defined in django-treenav:

treenav

I'm trying to display the primary navigation and secondary navigation full tree, drop-down style. (Primary navigation will only be one-level in practice, but for robustness, I'm trying to build it out for flexibility.) Here are the template tags I'm using:

{% show_treenav 'primary-navigation' full_tree='True' %}

{% show_treenav 'secondary-navigation' full_tree='True' %}

ERROR: Environment 'duraamen' does not exist. Create it with 'mkvirtualenv duraamen'.
Kaseys-MacBook-Air:duraamen Kasey$ mkvirtualenv duraamen
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
working_set.require(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
Kaseys-MacBook-Air:duraamen Kasey$ pip install -r requirements.txt
Traceback (most recent call last):
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
working_set.require(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
@kkellydesign
kkellydesign / gist:2292949
Created April 3, 2012 15:32
Trendabl venv terminal
^C(trendabl)Kaseys-MacBook-Air:trendabl Kasey$ createdb trendabl
(trendabl)Kaseys-MacBook-Air:trendabl Kasey$ ?
-bash: ?: command not found
(trendabl)Kaseys-MacBook-Air:trendabl Kasey$ python manage.py syncdb
Syncing...
Traceback (most recent call last):
File "manage.py", line 14, in <module>
execute_manager(settings)
File "/Users/Kasey/.virtualenvs/trendabl/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()