Skip to content

Commit

Permalink
debugging script
Browse files Browse the repository at this point in the history
  • Loading branch information
raftmsohani committed Jul 18, 2023
1 parent 35e6523 commit 97b118a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions tdrs-backend/gunicorn_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ fi

#
echo "Applying database migrations"
python manage.py < temp_debug_script.py
python manage.py makemigrations
python manage.py migrate
python manage.py populate_stts
Expand Down
5 changes: 5 additions & 0 deletions tdrs-backend/tdpservice/users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ class AccountApprovalStatusChoices(models.TextChoices):
class User(AbstractUser):
"""Define user fields and methods."""

class Meta:
"""Define meta user model attributes."""

ordering = ['pk']

id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)

stt = models.ForeignKey(
Expand Down
12 changes: 12 additions & 0 deletions tdrs-backend/temp_debug_script.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import logging
from django.conf import settings
from django.contrib.auth.models import User

logger = logging.getLogger()


logger.info('_____ start debugging _____')
logger.info('_____ settings.DATABASES:: ' + str(settings.DATABASES))
user_ = User.objects.all()
logger.info('_____ user_:: ' + str(user_))
logger.info('_____ end debugging _____')

0 comments on commit 97b118a

Please sign in to comment.