Permalink
Browse files

changed user to owner

  • Loading branch information...
brosner committed Apr 15, 2010
1 parent c8d18d9 commit 37b34c0deb3ff7a3d989d2e357e39802b92f8440
Showing with 4 additions and 4 deletions.
  1. +1 −1 contacts_import/backends/persistance.py
  2. +1 −1 contacts_import/models.py
  3. +2 −2 contacts_import/views.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"]}
)
@@ -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
@@ -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()

0 comments on commit 37b34c0

Please sign in to comment.