Skip to content

Commit

Permalink
Merge pull request #20 from YashSahsani/feat/add-init-data
Browse files Browse the repository at this point in the history
feat: add init data
  • Loading branch information
Hetvi2010 authored Jun 30, 2024
2 parents b5127f2 + 67394c4 commit 8d9d64b
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 4 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,13 @@ $ python manage.py migrate
$ python manage.py runserver
```

### For Admin
### For Adding initial data
```bash
$ python manage.py createsuperuser
Email:- [email protected]
Password:- Admin@123
$ python manage.py loaddata data.json

Admin-Email:- [email protected]
Admin-Password:- Admin@123

TestUser-Email:- [email protected]
TestUser-Password:- Test@123
```
44 changes: 44 additions & 0 deletions data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[
{
"model": "Auth.User",
"pk": 1,
"fields": {
"first_name": "admin",
"email": "[email protected]",
"last_name": "admin",
"password": "pbkdf2_sha256$600000$0FjuZXUItXGWbeWFurh8u3$dQsM8ptw+Pad5B0I6cstdfDKM9g6Q2ig4CJaMRkZaVY=",
"is_superuser": true,
"is_staff": true,
"is_active": true
}
},
{
"model": "Auth.User",
"pk": 2,
"fields": {
"first_name": "test",
"email": "[email protected]",
"last_name": "user",
"password": "pbkdf2_sha256$600000$sH4aon10SebzQ0LdhwAj8T$b8UEWHglxnZYEziQMRukhf56QExfKpgH4/ecOlWE0a0=",
"is_superuser": false,
"is_staff": true,
"is_active": true
}
},
{
"model":"GreenCartEcom.navCategories",
"pk":1,
"fields":{
"title":"Sales"
}


},
{
"model":"GreenCartEcom.navCategories",
"pk":2,
"fields":{
"title":"Vegetables"
}
}
]
Binary file not shown.

0 comments on commit 8d9d64b

Please sign in to comment.