Skip to content

Commit

Permalink
add collectstatic command in script
Browse files Browse the repository at this point in the history
  • Loading branch information
shyanukant committed Oct 14, 2023
1 parent fb5b5ed commit 6d8375b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions init_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/

echo "Starting SSH ..."
service ssh start
python manage.py collectstatic --noinput

# Start Gunicorn
exec gunicorn squib.wsgi:application --workers=4 --bind 0.0.0.0:8000
4 changes: 2 additions & 2 deletions profiles/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ def followers_changed(sender, instance, action, pk_set, **kwargs):
if request :
# add a success message
if action == "post_add":
print(f"{instance} gained {len(pk_set)} new follower (s)")
# print(f"{instance} gained {len(pk_set)} new follower (s)")
messages.success(request, f"You gained {len(pk_set)} new follower(s)")
elif action == "post_remove":
print(f"{instance} loss {len(pk_set)} new follower (s)")
# print(f"{instance} loss {len(pk_set)} new follower (s)")
# add a warning message
messages.warning(request, f"You lost {len(pk_set)} follower(s)")

0 comments on commit 6d8375b

Please sign in to comment.