Django 101
Category : Python Tag : 101series shellscript
Sept. 30, 2020, 7:01 p.m.

Short Description :
2020-11-24 01:54:58.439316+00:00
source : 2020-11-24 01:54:58.447178+00:00

## 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

Related Posts

Django 101
Sep 30 2020
2020-11-24 01:54:58.439316+00:00
How to deploy Dash/Python to Heroku
Nov 24 2020
Quick tips on how to deploy plotly dash by python to Heroku server. Also explore CICD from github
How to store geo data in geodjango and render by d3.js
Dec 7 2020
test
Google Colab : File Loading
Mar 1 2021
Couple of ways to load files to google colab
Django Search Box
Jun 6 2021
test



© DATAK 2024