Skip to content
This repository has been archived by the owner on Jan 18, 2020. It is now read-only.

Update QueryForm to handle username/email-based sharing #76

Merged
merged 10 commits into from
Aug 15, 2013
Merged

Conversation

naegelyd
Copy link
Collaborator

Adds necessary fields and methods to QueryForm to enable username/email based sharing of Query models. This pull requests also includes tests to completely cover the QueryForm save() and clean_usernames_or_emails() methods. Additionally, the clean_json() has been appropriately split into clean_context_json() and clean_view json() to match the actual field names. clean_json() was useless.

@coveralls
Copy link

Coverage Status

Coverage increased (+0%) when pulling d0f85c7 on issue-56 into ffbd9b4 on 2.1.

# then give up since we only support email and username
# lookups.
try:
user = User.objects.get(username=label)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A tad more optimal.. User.objects.only('email').get(username=label)

@coveralls
Copy link

Coverage Status

Coverage increased (+0%) when pulling 1e4a5f7 on issue-56 into ffbd9b4 on 2.1.

bruth added a commit that referenced this pull request Aug 15, 2013
Update QueryForm to handle username/email-based sharing
@bruth bruth merged commit 03c3254 into 2.1 Aug 15, 2013
@bruth bruth deleted the issue-56 branch August 15, 2013 14:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants