Skip to content

Instantly share code, notes, and snippets.


Elizabeth Leddy eleddy

View GitHub Profile
from django.db import models
from import USStateField, PhoneNumberField
def save_area(instance, file_name):
return "photos/%s/%s/%s" % (instance.area.state,, file_name)
# WAT is this? if this is about using nice urls then use url routing instead
def save_problem(instance, file_name):
return "photos/%s/%s/%s/%s" % (instance.problem.parent.state,,, file_name)