From 016f912ef7284f28f60c3a754176dcd8b2da55e3 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Wed, 15 Jun 2016 15:49:28 +0000 Subject: [PATCH] Changed some field names from address to email. - Legacy-Id: 11385 --- ietf/ietfauth/tests.py | 4 ++-- ietf/ietfauth/views.py | 8 ++++---- ietf/mailinglists/admin.py | 6 +++--- .../commands/import_mailman_listinfo.py | 4 ++-- .../0002_list_subscribed_whitelisted.py | 6 +++--- ietf/mailinglists/resources.py | 4 ++-- ietf/templates/ietfauth/whitelist_form.html | 8 ++++---- media/photo/nopictureavailable.jpg | Bin 0 -> 1618 bytes media/photo/profile-default.jpg | Bin 0 -> 1397 bytes 9 files changed, 20 insertions(+), 20 deletions(-) create mode 100644 media/photo/nopictureavailable.jpg create mode 100644 media/photo/profile-default.jpg diff --git a/ietf/ietfauth/tests.py b/ietf/ietfauth/tests.py index 35c57a13a..d38972e16 100644 --- a/ietf/ietfauth/tests.py +++ b/ietf/ietfauth/tests.py @@ -155,7 +155,7 @@ class IetfAuthTests(TestCase): self.assertEqual(r.status_code, 200) self.assertIn("Add a whitelist entry", unicontent(r)) - r = self.client.post(urlreverse(ietf.ietfauth.views.add_account_whitelist), {"address": email}) + r = self.client.post(urlreverse(ietf.ietfauth.views.add_account_whitelist), {"email": email}) self.assertEqual(r.status_code, 200) self.assertIn("Whitelist entry creation successful", unicontent(r)) @@ -172,7 +172,7 @@ class IetfAuthTests(TestCase): saved_delay = settings.LIST_ACCOUNT_DELAY settings.LIST_ACCOUNT_DELAY = 1 email = "subscribed@example.com" - s = Subscribed(address=email) + s = Subscribed(email=email) s.save() time.sleep(1.1) self.register_and_verify(email) diff --git a/ietf/ietfauth/views.py b/ietf/ietfauth/views.py index 3d3cf2088..f3707b9bb 100644 --- a/ietf/ietfauth/views.py +++ b/ietf/ietfauth/views.py @@ -92,8 +92,8 @@ def create_account(request): form = RegistrationForm(request.POST) if form.is_valid(): to_email = form.cleaned_data['email'] # This will be lowercase if form.is_valid() - existing = Subscribed.objects.filter(address=to_email).first() - ok_to_create = ( Whitelisted.objects.filter(address=to_email).exists() + existing = Subscribed.objects.filter(email=to_email).first() + ok_to_create = ( Whitelisted.objects.filter(email=to_email).exists() or existing and (existing.time + TimeDelta(seconds=settings.LIST_ACCOUNT_DELAY)) < DateTime.now() ) if ok_to_create: auth = django.core.signing.dumps(to_email, salt="create_account") @@ -377,8 +377,8 @@ def add_account_whitelist(request): if request.method == 'POST': form = WhitelistForm(request.POST) if form.is_valid(): - address = form.cleaned_data['address'] - entry = Whitelisted(address=address, by=request.user.person) + email = form.cleaned_data['email'] + entry = Whitelisted(email=email, by=request.user.person) entry.save() success = True else: diff --git a/ietf/mailinglists/admin.py b/ietf/mailinglists/admin.py index 01c85822d..aaa086823 100644 --- a/ietf/mailinglists/admin.py +++ b/ietf/mailinglists/admin.py @@ -12,12 +12,12 @@ admin.site.register(List, ListAdmin) class SubscribedAdmin(admin.ModelAdmin): - list_display = ('id', 'time', 'address') + list_display = ('id', 'time', 'email') raw_id_fields = ('lists',) - search_fields = ('address',) + search_fields = ('email',) admin.site.register(Subscribed, SubscribedAdmin) class WhitelistedAdmin(admin.ModelAdmin): - list_display = ('id', 'time', 'address', 'by') + list_display = ('id', 'time', 'email', 'by') admin.site.register(Whitelisted, WhitelistedAdmin) diff --git a/ietf/mailinglists/management/commands/import_mailman_listinfo.py b/ietf/mailinglists/management/commands/import_mailman_listinfo.py index 30a70aadf..4f9d15770 100644 --- a/ietf/mailinglists/management/commands/import_mailman_listinfo.py +++ b/ietf/mailinglists/management/commands/import_mailman_listinfo.py @@ -53,9 +53,9 @@ class Command(BaseCommand): list, created = List.objects.get_or_create(name=mlist.real_name, description=mlist.description, advertised=mlist.advertised) # The following calls return lowercased addresses members = mlist.getRegularMemberKeys() + mlist.getDigestMemberKeys() - known = [ s.address for s in Subscribed.objects.filter(lists__name=name) ] + known = [ s.email for s in Subscribed.objects.filter(lists__name=name) ] for addr in members: if not addr in known: self.note(" Adding subscribed: %s" % (addr)) - new, created = Subscribed.objects.get_or_create(address=addr) + new, created = Subscribed.objects.get_or_create(email=addr) new.lists.add(list) diff --git a/ietf/mailinglists/migrations/0002_list_subscribed_whitelisted.py b/ietf/mailinglists/migrations/0002_list_subscribed_whitelisted.py index f1d44890b..63bb3d939 100644 --- a/ietf/mailinglists/migrations/0002_list_subscribed_whitelisted.py +++ b/ietf/mailinglists/migrations/0002_list_subscribed_whitelisted.py @@ -8,7 +8,7 @@ import django.core.validators class Migration(migrations.Migration): dependencies = [ - ('person', '0014_auto_20160613_0751'), + ('person', '0013_add_plain_name_aliases'), ('mailinglists', '0001_initial'), ] @@ -30,7 +30,7 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('time', models.DateTimeField(auto_now_add=True)), - ('address', models.CharField(max_length=64, validators=[django.core.validators.EmailValidator()])), + ('email', models.CharField(max_length=64, validators=[django.core.validators.EmailValidator()])), ('lists', models.ManyToManyField(to='mailinglists.List')), ], options={ @@ -42,7 +42,7 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('time', models.DateTimeField(auto_now_add=True)), - ('address', models.CharField(max_length=64, validators=[django.core.validators.EmailValidator()])), + ('email', models.CharField(max_length=64, verbose_name=b'Email address', validators=[django.core.validators.EmailValidator()])), ('by', models.ForeignKey(to='person.Person')), ], options={ diff --git a/ietf/mailinglists/resources.py b/ietf/mailinglists/resources.py index b73995473..49f1786b5 100644 --- a/ietf/mailinglists/resources.py +++ b/ietf/mailinglists/resources.py @@ -22,7 +22,7 @@ class WhitelistedResource(ModelResource): filtering = { "id": ALL, "time": ALL, - "address": ALL, + "email": ALL, "by": ALL_WITH_RELATIONS, } api.mailinglists.register(WhitelistedResource()) @@ -51,7 +51,7 @@ class SubscribedResource(ModelResource): filtering = { "id": ALL, "time": ALL, - "address": ALL, + "email": ALL, "lists": ALL_WITH_RELATIONS, } api.mailinglists.register(SubscribedResource()) diff --git a/ietf/templates/ietfauth/whitelist_form.html b/ietf/templates/ietfauth/whitelist_form.html index 9bccd27c6..0a6a680ce 100644 --- a/ietf/templates/ietfauth/whitelist_form.html +++ b/ietf/templates/ietfauth/whitelist_form.html @@ -46,8 +46,8 @@ Google for the person's name within the ietf site: "Jane Doe site:ietf.org". If found, and the email address matches an address used in drafts or discussions, things are fine, and it's OK to add the address to the whitelist using this form, - and ask the person to please try the account creation form again. + and ask the person to please try the + account creation form again.
  • @@ -74,8 +74,8 @@

    If the answer to this question shows clue, then add the address to the whitelist - using this form, and ask the person to please try the account creation form again. + using this form, and ask the person to please try the + account creation form again.

  • diff --git a/media/photo/nopictureavailable.jpg b/media/photo/nopictureavailable.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0895f9f57c74c6199a8eed323d71fe1caae52c9e GIT binary patch literal 1618 zcmeH|+dmTu0LM3)k;R%}$~pEytF;rIK#{T{wAzdTR(6Uqv@3IG5=8S8}c`bFZuk(c|` z37l)*0KhioXnT84ti3(dGco>jbnGbrz`CG-5FDjP&_s16MH=lH!^a-VId>PWyjQu@ z=THr+BV%?J5l6=&rVM#R@#nD{Psgk+J2z`Q96Zx3mMb;;pR{K}jlZf+qgdwG6!uO{ zK#ftX?-Wnom0Er|(y~0dqj~Ps=QLrJ;8yDAN09;$?@_%Uy+jiTuDEBa4d*1~7SWEG z6jO7nwdHDjaS)T>I#(HlhvNAMf%EpgsUdG)&2BLo+Z`cV(6jpCtsn0y(u#mz?hrM7-%sLZuf(pZ);jyrh8$_!!!CwW8+(-yM}C7WZF= zRJ+CS>v@ZRhFAVETiu)>2-{+idZKcKq`o`jrs>S(#*nYoIlT6F;?h&jEzp3S)3_~5cZI+uzN!Z@b1aVzdKe9vS zp5*@a!vSk+$Zg$u9f1|ALx~a+{?;0Iartn?NNNg3y74&0NlZ>;9Qm}A#uHNMrrV`| zUoWF*^;2jWHIBAoE@!KG##v2PCq{P>n_+hKFO@*^_rauE-nfgBw$+5b3z)x=W$U0vN7n?|9 zZokX;;JezMI27=_v&FSIYv{$8`GBa&D6-*v3EJ zOvRCT9kda%?xW*gfMJR#qFffNYaiKobFgca{ER$G9wYYz%akBTs@}5~%o6mILI%Y# zLfwG*RB+19_Q)mr8K$#=QLNT(aAGfF0T%{e+ovQSVTYT{qBrs-V21gvV-S@H{f~Df zL2NT0V4kE|M&!0dAb2k&l15Z>P&`U-0duX!wbMXTYFc#XQ| z30u|N*4pH1l8i(Oc~uwJ;|JFv(c+75;IOA3qaS)%o;L^+d2Mh`y9wxNS$h# z?tzpzr76Cf__iW`vH`!4zB#cp)1SoTnr1$*LRLMQ7o2;II{u>p5Lu7`tY)MUJVUqQ z0RR~Q7Gvvu0r;uZLZR=V=D^fd{(2^A2py^jjCW{&8()!)FE06#D%d1{JvP|QwXj+; zY|r9f@Hd}iV#4az7686bOo)NGF$DB2}c8==|f?7-9&`9RxkOH`QrTlKbV z`4>C<)mn^VLF%_PTA;)elM04T`-rx~h4-~E#qPt|#gH%)8no*Fq5r@UKi@Jb9qAz3 erH0!=i&Q7I<(v2jXU|_>0l+%AWA537X8#0-_TYm6 literal 0 HcmV?d00001 diff --git a/media/photo/profile-default.jpg b/media/photo/profile-default.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d6b03e100415a0fa9effad25c793f33957929e2d GIT binary patch literal 1397 zcmex=>ukC3pCfH06P05XITq?4J21E^7eo0A(TN+S4wfI*Oh zA%!7@nNf*>Nsy6Qkn#T!25GQUnSsuQ0}gg37NE<3k~RVijLbkcb24+YLKHAEFfjuq z*##916FG#0B^(2Tr#w_DY!neSG7m~hE-G2LQQ6pe;^vD$-6F__LQDsV3L;qr6}`p4 z!wfW8kXewyp5ekpK}JCV!P>Ier_+?rbWdKHE7*~#p#0QyQ}e|`{OR`!-(>uFVYbSi z_fx^?Y8{@R=lZJ8ddOYb8nkom^=1i&%Z=CXH95KFgg%)Tdd($qGTX%sg3C5qe%w(L z^&rfD#+(`RU43>?GDyA zi-2ZxuAlNP?sD`i&5v(aF-m8r{5D5cMQ!(_%4O9t>yW>v~RuU`$cX| zNhwBKzKfkX{3pv!OW(o8g~bI(ur4nu_;qdjzj@35xu$7*Joy+ZYLL*YKNsA;djUZg*#PcpextM7Qv@%!X?FPsG&04%Owb|~v@3`+>FnaqFt^rGa3S*v`bS?p)t z{lm7riGOx>%y+h}OD2^t@Ge=qSl7}bZX>^I`LVWW-yJWWU1nVBbGXC)w%mV)?1p>W zc($GRqun4aTeC*o`+(G}lQT>@{t26#-`{$tTCA`6?BO4I$6IqZ-YWRJO-d``yOG)3 z!ry+@cPb`%eVHgAD99E+Gm^W_@Vs~NHnu2zy{pG6X8zT@`=dv8`CHz-zupCXGdwV3 zK2uCx-jTBF2V(qPjcZq=F>md^Q+xY(2G_?}>8pJgJJx=>l|Su;cBY!#ouKW3?`0SC z9WrZ?pTAX5!f5^i+ygEl6=8`h6x3~;%6paa#b<1l3ZL;WO#I4 zc3bO`e3mj1nLt6t=$+;wfvIh>f^OH?15J<5GP!zWuK%7Dof+SF{+*FAPg}g-RVtd+rSaJ=Std8L zR)nwIB=cNZd**v