Backend. Users.

Create a new folder fixtures and users.json file in it.

Define a new global variable with the path to the users.json in settings.py

Make a command in account/management/commands/load_users.py

Load json and print users from administratiors key.

Create an admin account.

Admin interface (account/admin.py)

{
    "administratiors": [
        {
           "username": "admin",
           "password": "admin"
        }
    ],
    "male": [
        {
            "gender": "male",
            "publicname": "man1",
            "is_online": "false",
            "account": "0",
            "birthday": "1977-01-01"
        }, 
        {
            "gender": "male",
            "publicname": "man2",
            "is_online": "false",
            "account": "0",
            "birthday": "1977-01-01"
        }, 
        {
            "gender": "male",
            "publicname": "man3",
            "is_online": "false",
            "account": "0",
            "birthday": "1977-01-01"
        }
    ],
    "female": [
        {
            "gender": "female",
            "publicname": "woman1",
            "is_online": "false",
            "account": "0",
            "birthday": "1977-01-01"
        }, 
        {
            "gender": "female",
            "publicname": "woman2",
            "is_online": "false",
            "account": "0",
            "birthday": "1977-01-01"
        }, 
        {
            "gender": "female",
            "publicname": "woman3",
            "is_online": "false",
            "account": "0",
            "birthday": "1977-01-01"
        }        
    ]
}
FIXTURES_PATH = os.path.join(BASE_DIR, '../fixtures', 'users.json')
admin
Потратить 2 кредита и начать обучение!
Задать вопрос, прокомментировать.