New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for dictionary type association proxies #247

Merged
merged 5 commits into from Mar 13, 2014

Conversation

Projects
None yet
2 participants
@Svenito
Contributor

Svenito commented Sep 23, 2013

Related to issue #244

Sven Steinbauer added some commits Sep 23, 2013

Sven Steinbauer
Adds support for AssociationDict type for POST
The issue is that AssociationDict type does not have an `append` method
@@ -1631,6 +1661,8 @@ class Product(self.Base):
tag_names = prox('tags', 'name',
creator=lambda tag_name: Tag(name=tag_name))

This comment has been minimized.

@jfinkels

jfinkels Dec 1, 2013

Owner

Remove superfluous newlines.

@@ -1601,6 +1623,14 @@ class Image(self.Base):
products = prox('chosen_product_images', 'product',
creator=creator1)
meta_store = rel('Metadata',
cascade="all",

This comment has been minimized.

@jfinkels

jfinkels Dec 1, 2013

Owner

Use single quotes for string literals.

# For brevity, create this association proxy creator functions here.
creator1 = lambda product: ChosenProductImage(product=product)
creator2 = lambda image: ChosenProductImage(image=image)
creator3 = lambda key, value: Metadata(key, value)

This comment has been minimized.

@jfinkels

jfinkels Dec 1, 2013

Owner

Remove superfluous newline.

@@ -1591,9 +1593,29 @@ def setUp(self):
ForeignKey('product.id'),
primary_key=True))
# Metadata is a key-value pair, used to test for association
# proxies that use AssociationDict types
# this is the associtiation table for Image->metadata

This comment has been minimized.

@jfinkels

jfinkels Dec 1, 2013

Owner

Typo: "association".

Sven Steinbauer added some commits Dec 2, 2013

@jfinkels jfinkels merged commit 07ebbc6 into jfinkels:master Mar 13, 2014

1 check passed

default The Travis CI build passed
Details
@jfinkels

This comment has been minimized.

Owner

jfinkels commented Mar 13, 2014

Merged, thanks.

@Svenito Svenito deleted the Svenito:assoc-proxy branch Mar 13, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment