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
# This is a very crud example of using the Repository Pattern with SQLAlchemy. It allows me to completely ignore interactions with | |
# the database. This is only pulled in whenever I require to persist or retrieve an object from the database. The domain/business | |
# logic is entirely separated from persistence and I can have true unit tests for those. | |
# The tests for persistence are then limited to very specific cases of persistence and retrieving instances, and I can do those | |
# independent of the business logic. They also tend to be less tests since I only need to test them once. | |
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
iff --git a/django/template/__init__.py b/django/template/__init__.py | |
index 8c89c67..576e7b1 100644 | |
--- a/django/template/__init__.py | |
+++ b/django/template/__init__.py | |
@@ -839,6 +839,14 @@ class VariableNode(Node): | |
def __repr__(self): | |
return "<Variable Node: %s>" % self.filter_expression | |
+ def clean_pks(self, output): | |
+ # avoid localization of pk or ids |
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
""" | |
Simple module to ease form handling with ``Deform``. The provided | |
``FormGenerator`` class handles repetitive tasks like validation, | |
xhr requests, and recovering from exceptions thrown by the model. | |
### Begin example scenario: Adding a new user | |
from myschemas import UserSchema | |
from formgenerator import ( |
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
## widget | |
import httplib2 | |
from urllib import urlencode | |
import colander | |
from colander import null | |
from colander import Invalid | |
from deform.widget import CheckedInputWidget |