agree create 3

This commit is contained in:
H.T. Kruitbosch 2018-05-04 17:28:07 +02:00
parent 1cd3795b87
commit 7ac1085ae2
2 changed files with 4 additions and 3 deletions

View File

@ -28,7 +28,7 @@
{% bootstrap_form form %} {% bootstrap_form form %}
<button class="btn btn-default" type="submit">Toestemming geven</button> <button class="btn btn-default" type="submit">Toestemming geven</button>
<br/><br/> <br/><br/>
<a href="javascript:window.close();">Geen toestemming geven</a> <a href="/">Geen toestemming geven</a>
</form> </form>
<br/> <br/>
{% endif %} {% endif %}

View File

@ -27,8 +27,9 @@ def gdpr_ask_agreement(request):
if not request.user.is_superuser: if not request.user.is_superuser:
raise PermissionError() raise PermissionError()
for user in User.objects.filter(username__in=('p207263', 'p233780', 'p253591', 'p269380'), for user in User.objects.filter(
is_active=True).all(): # username__in=('p207263', 'p233780', 'p253591', 'p269380'),
is_active=True).all():
token = get_random_string(length=32) token = get_random_string(length=32)
pending = PendingGDPRAgree(user=user, token=token) pending = PendingGDPRAgree(user=user, token=token)
pending.save() pending.save()