Skip to content
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

Widget formatting for foreign key relations doesn't work #12

Closed
geeknam opened this issue Jan 17, 2013 · 0 comments
Closed

Widget formatting for foreign key relations doesn't work #12

geeknam opened this issue Jan 17, 2013 · 0 comments

Comments

@geeknam
Copy link
Contributor

geeknam commented Jan 17, 2013

Assuming Author model has birthday field. The following widget formatting wouldn't work.

        class BookResource(resources.ModelResource):

            class Meta:
                model = Book
                fields = ('author__birthday',)
                widgets = {
                    'author__birthday': {'format': '%Y-%m-%d'},
                    # However this works
                    'birthday':  {'format': '%Y-%m-%d'},
                }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants