Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

changed user to owner

  • Loading branch information...
commit 37b34c0deb3ff7a3d989d2e357e39802b92f8440 1 parent c8d18d9
@brosner brosner authored
View
2  contacts_import/backends/persistance.py
@@ -23,7 +23,7 @@ def default_status(self):
def persist_contact(self, contact, status, credentials):
obj, created = TransientContact.objects.get_or_create(
- user = credentials["user"],
+ owner = credentials["user"],
email = contact["email"],
defaults = {"name": contact["name"]}
)
View
2  contacts_import/models.py
@@ -7,7 +7,7 @@
class TransientContact(models.Model):
# The user who created this contact
- user = models.ForeignKey(User, related_name="contacts")
+ owner = models.ForeignKey(User, related_name="imported_contacts")
name = models.CharField(max_length=100, blank=True)
email = models.EmailField()
View
4 contacts_import/views.py
@@ -76,12 +76,12 @@ def import_contacts(request, template_name="contacts_import/import_contacts.html
return HttpResponseRedirect("%s?page=%s" % (request.path, page_num-1))
elif "finish" in request.POST:
if not selected:
- TransientContact.objects.filter(user=request.user).delete()
+ TransientContact.objects.filter(owner=request.user).delete()
return HttpResponseRedirect(reverse("import_contacts"))
# give control over to the callback which is required to
# return a HttpResponse
response = callback(request, selected)
- TransientContact.objects.filter(user=request.user).delete()
+ TransientContact.objects.filter(owner=request.user).delete()
return response
else:
form = VcardImportForm()
Please sign in to comment.
Something went wrong with that request. Please try again.