## Command line operation #### Virtual Environment * `cd <directory>` where virtural environemnt and django app folder are located, then activate by ``` source <virtual environment directory>/bin/activate ``` #### When static file is changed * at local, static file is stored at `<project directory>/<app name directory>/static/` * in production, static file is stored at `<project directory>/static/` * in order to update static file and reflect local changes, ```javascript python manage.py collectstatic ``` * django file changes require restart gunicorn at cloud ``` sudo systemctl restart gunicorn ``` #### New field created in models.py this is a test. this is a test ```javascript // back to top button $(document).ready(function () { $(window).scroll(function () { if ($(this).scrollTop() > 100) { $('.scroll-top').fadeIn(); } else { $('.scroll-top').fadeOut(); } }); $('.scroll-top').click(function () { $("html, body").animate({ scrollTop: 0 }, 500); return false; }); }); ```
<< Back to Blog Posts
Back to Home