Created
August 12, 2015 17:50
-
-
Save blaix/b22edf39fed743e13dbf to your computer and use it in GitHub Desktop.
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
# If this is the interface: | |
SiteNavigation(site).as_dict() | |
# that means we have to have a site object to build a site nav object. | |
# That's fine within the Site object. | |
# My point was that if (someday in the future) we need to build a nav object but we only have a site id, | |
# instead of doing this: | |
SiteNavigation(Site.objects.get(site_id)).as_dict() | |
# we could extend the interface to support this: | |
SiteNavigation.for_site_id(site_id).as_dict() | |
# We don't need this for what we're talking about. | |
# I was only making a case that it's ok to accept the object instead of the id since it suits our needs for now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment