diff --git a/src/accounts/templates/accounts/user-profile.html b/src/accounts/templates/accounts/user-profile.html index 8668f39..c25620f 100644 --- a/src/accounts/templates/accounts/user-profile.html +++ b/src/accounts/templates/accounts/user-profile.html @@ -26,25 +26,25 @@
diff --git a/src/colab/deprecated/signup.py b/src/colab/deprecated/signup.py index e670cdd..a9d4124 100644 --- a/src/colab/deprecated/signup.py +++ b/src/colab/deprecated/signup.py @@ -15,7 +15,7 @@ def send_verification_email(request, user): to = user.email email_data = { - 'hash': user.profile.verification_hash, + 'hash': user.verification_hash, 'server_name': request.get_host(), } diff --git a/src/colab/deprecated/views/userprofile.py b/src/colab/deprecated/views/userprofile.py deleted file mode 100644 index 2525d47..0000000 --- a/src/colab/deprecated/views/userprofile.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 -""" -userprofile.py - -Created by Sergio Campos on 2012-01-10. -""" - -from django.contrib.auth.models import User -from django.forms.models import model_to_dict -from django.contrib.auth.decorators import login_required -from django.shortcuts import render, get_object_or_404, redirect - -from colab.deprecated import solrutils -from accounts.forms import UserCreationForm, UserUpdateForm -from super_archives.models import Message, UserProfile, EmailAddress - - - -@login_required -def update(request, username): - profile = get_object_or_404(UserProfile, user__username=username) - form = UserUpdateForm(initial=model_to_dict(profile)) - - if request.method == "GET": - return read(request, profile.user, editable=True, form=form) - - form = UserUpdateForm(request.POST) - if not form.is_valid(): - return read(request, profile.user, editable=True, form=form) - - profile.institution = form.cleaned_data.get('institution') - profile.role = form.cleaned_data.get('role') - profile.twitter = form.cleaned_data.get('twitter') - profile.facebook = form.cleaned_data.get('facebook') - profile.google_talk = form.cleaned_data.get('google_talk') - profile.webpage = form.cleaned_data.get('webpage') - profile.save() - - return redirect('user_profile', profile.user.username) diff --git a/src/super_archives/models.py b/src/super_archives/models.py index a3f8971..f9bae6c 100644 --- a/src/super_archives/models.py +++ b/src/super_archives/models.py @@ -40,14 +40,6 @@ class EmailAddress(models.Model): return self.user.get_full_name() elif self.real_name: return self.real_name - - def get_profile_link(self): - if self.user: - # TODO: stop using username in url - return reverse('user_profile', args=[self.user.username]) - else: - return reverse('colab.deprecated.views.userprofile.by_emailhash', - args=[self.md5]) def __unicode__(self): return '"%s" <%s>' % (self.get_full_name(), self.address) -- libgit2 0.21.2