mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-26 02:54:20 +00:00
Some mailing list fixs
This commit is contained in:
parent
9e5159152a
commit
ce9e17ea24
@ -5,7 +5,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% trans %}This page list all existing mailing lists{% endtrans %}</h1>
|
||||
<h1>{% trans %}This page lists all existing mailing lists{% endtrans %}</h1>
|
||||
{% if has_objects %}
|
||||
<table>
|
||||
<tr>
|
||||
|
@ -62,7 +62,7 @@
|
||||
{% if profile.mailing_subscriptions.exists() and (profile.id == user.id or user.is_root or self.user.is_in_group(settings.SITH_GROUP_COM_ADMIN_ID)) %}
|
||||
<h4>{% trans %}Subscribed mailing lists{% endtrans %}</h4>
|
||||
{% for sub in profile.mailing_subscriptions.all() %}
|
||||
<p>{{ sub.mailing.email }} <a href="{{ url('club:mailing_subscription_delete', mailing_subscription_id=sub.id) }}">{% trans %}Unsuscribe{% endtrans %}</a></p>
|
||||
<p>{{ sub.mailing.email }} <a href="{{ url('club:mailing_subscription_delete', mailing_subscription_id=sub.id) }}">{% trans %}Unsubscribe{% endtrans %}</a></p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
@ -1353,7 +1353,7 @@ def migrate_mailings():
|
||||
club = club.first()
|
||||
if mailing['nom']:
|
||||
mailing['nom'] = '.' + mailing['nom']
|
||||
Mailing(id=mailing['id_mailing'], club=club, email=str(club.unix_name + mailing['nom'] + '@utbm.fr')).save()
|
||||
Mailing(id=mailing['id_mailing'], club=club, email=to_unicode(club.unix_name + mailing['nom'] + '@utbm.fr')).save()
|
||||
print("-------------------")
|
||||
|
||||
cur.execute("""
|
||||
@ -1369,7 +1369,7 @@ def migrate_mailings():
|
||||
user = User.objects.get(id=mailing_sub['id_user'])
|
||||
MailingSubscription(mailing=mailing, user=user, email=user.email).save()
|
||||
elif mailing_sub['email']:
|
||||
MailingSubscription(mailing=mailing, email=mailing_sub['email']).save()
|
||||
MailingSubscription(mailing=mailing, email=to_unicode(mailing_sub['email'])).save()
|
||||
|
||||
|
||||
def main():
|
||||
|
Loading…
Reference in New Issue
Block a user