amerkurev / django-docker-template

Dockerized Django with Postgres, Gunicorn, and Traefik or Caddy (with auto renew Let's Encrypt)
https://django-docker.dev
MIT License
188 stars 35 forks source link

Hashing for safe create command #21

Closed nbovee closed 4 months ago

nbovee commented 4 months ago

A fix for #20;

current:

/usr/src/website # python manage.py dumpdata auth.user
[{
  "model": "auth.user",
  "pk": 1,
  "fields": {
    "password": "admin",
    "last_login": null, 
    "is_superuser": true,
    "username": "admin",
    "first_name": "",
    "last_name": "",
    "email": "admin@example.com",
    "is_staff": true,
    "is_active": true,
    "date_joined": "2024-06-03T21:27:21.811Z",
    "groups": [],
    "user_permissions": []
  }
}]

this PR:

/usr/src/website # python manage.py dumpdata auth.user
[{
  "model": "auth.user",
  "pk": 1,
  "fields": {
    "password": "pbkdf2_sha256$600000$rU94cxPQuV2V4Vl2kForP4$W6ryPcY16+wp7z3QRe3gAibChUgv2/DV0dXWSQokhZ8=",
    "last_login": 2024-06-03T21:48:14.076Z, 
    "is_superuser": true,
    "username": "admin",
    "first_name": "",
    "last_name": "",
    "email": "admin@example.com",
    "is_staff": true,
    "is_active": true,
    "date_joined": "2024-06-03T21:47:32.986Z",
    "groups": [],
    "user_permissions": []
  }
}]
nbovee commented 4 months ago

My apologies for not catching this before the first PR, I only saw something was up when upgrading my dev site.

amerkurev commented 4 months ago

@nbovee thanks a lot for your work!