.
This commit is contained in:
+2
-2
@@ -1,7 +1,6 @@
|
|||||||
from dal import autocomplete
|
from dal import autocomplete
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.contrib.contenttypes.models import ContentType
|
from django.contrib.contenttypes.models import ContentType
|
||||||
from django.db.models.expressions import Random
|
|
||||||
from django.forms.models import model_to_dict
|
from django.forms.models import model_to_dict
|
||||||
from django.shortcuts import render, get_object_or_404, redirect
|
from django.shortcuts import render, get_object_or_404, redirect
|
||||||
|
|
||||||
@@ -53,6 +52,7 @@ from django.conf import settings
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import os
|
import os
|
||||||
import string
|
import string
|
||||||
|
import random
|
||||||
|
|
||||||
#from rad.views import get_question_and_content_type
|
#from rad.views import get_question_and_content_type
|
||||||
|
|
||||||
@@ -854,7 +854,7 @@ def create_cid_users(request):
|
|||||||
new_cid = max(CidUser.objects.all().order_by("-cid")[0].cid+1, 50000)
|
new_cid = max(CidUser.objects.all().order_by("-cid")[0].cid+1, 50000)
|
||||||
|
|
||||||
for n in range(number):
|
for n in range(number):
|
||||||
passcode = Random.choice(string.aschii_uppercase)
|
passcode = random.choice(string.aschii_uppercase)
|
||||||
c = CidUser(cid=new_cid, passcode=passcode)
|
c = CidUser(cid=new_cid, passcode=passcode)
|
||||||
c.save()
|
c.save()
|
||||||
new_cid = new_cid + 1
|
new_cid = new_cid + 1
|
||||||
Reference in New Issue
Block a user