1 | import os
|
---|
2 | import datetime
|
---|
3 | import random
|
---|
4 | from django.contrib.sessions.models import Session
|
---|
5 |
|
---|
6 | data = "a"
|
---|
7 | for i in range(4000):
|
---|
8 | data += "a"
|
---|
9 |
|
---|
10 | key = int(''.join(map(str, [random.randint(1,6) for i in range(10)])))
|
---|
11 | Session.objects.create(session_key=key, session_data=data[:4000], expire_date=datetime.datetime.now())
|
---|
12 | key = int(''.join(map(str, [random.randint(1,6) for i in range(10)])))
|
---|
13 | Session.objects.create(session_key=key, session_data=data[:4001], expire_date=datetime.datetime.now())
|
---|
14 |
|
---|