diff --git a/gobotany/plantshare/emailconfirmation_models.py b/gobotany/plantshare/emailconfirmation_models.py index 7523762c3..1013e6618 100644 --- a/gobotany/plantshare/emailconfirmation_models.py +++ b/gobotany/plantshare/emailconfirmation_models.py @@ -51,6 +51,9 @@ def get_users_for(self, email): return [address.user for address in EmailAddress.objects.filter( verified=True, email=email)] + class Meta: + app_label = 'emailconfirmation' + class EmailAddress(models.Model): @@ -78,6 +81,7 @@ def __unicode__(self): return u"%s (%s)" % (self.email, self.user) class Meta: + app_label = 'emailconfirmation' verbose_name = _("email address") verbose_name_plural = _("email addresses") unique_together = ( @@ -106,8 +110,7 @@ def send_confirmation(self, email_address): current_site = Site.objects.get_current() # check for the url with the dotted view path try: - path = reverse("emailconfirmation.views.confirm_email", - args=[confirmation_key]) + path = reverse('ps-confirm-email', args=[confirmation_key]) except NoReverseMatch: # or get path with named urlconf instead path = reverse( @@ -147,6 +150,9 @@ def delete_expired_confirmations(self): if confirmation.key_expired(): confirmation.delete() + class Meta: + app_label = 'emailconfirmation' + class EmailConfirmation(models.Model): @@ -166,5 +172,6 @@ def __unicode__(self): return u"confirmation for %s" % self.email_address class Meta: + app_label = 'emailconfirmation' verbose_name = _("email confirmation") verbose_name_plural = _("email confirmations") diff --git a/gobotany/plantshare/forms.py b/gobotany/plantshare/forms.py index 2aa6f7baf..f9b1acae3 100644 --- a/gobotany/plantshare/forms.py +++ b/gobotany/plantshare/forms.py @@ -1,6 +1,7 @@ from django import forms from django.core.urlresolvers import reverse_lazy -from emailconfirmation_models import EmailAddress + +from gobotany.plantshare.emailconfirmation_models import EmailAddress from gobotany.plantshare.models import (Checklist, ChecklistEntry, Location, ScreenedImage, SIGHTING_DEFAULT_VISIBILITY,