Djangolog is a blogging application built using the django framework in Python
- User login
- Creating articles
- Editing existing articles
- Comments on articles
- Contact me form
Make sure python3 and git is installed.
- From the main working directory, run the below commands
python manage.py makemigrations python manage.py migrate
- Set the username and password in settings.py file for sending mails
- To start the server, run
python manage.py runserver
- Create a superuser to log in to django-admin
python manage.py createsuperuser
From official website
py --version
python --version
py -m venv blog_app
.\blog_app\Scripts\activate
.\blog_app\Scripts\deactivate
py -m pip install package_name
py -m pip install django
django --version
py -m django --version
python manage.py startapp your_app_name
Then make an entry for the app in the INSTALLED_APPS section in settings.py Include URL's of your new app using include() in url.py (main app)
There are 4 policy levels to choose from. From most secure to most insecure:
-
Restricted: No Powershell scripts can be run. This is the default setting.
-
AllSigned: Scripts can be run, but all must have a digital signature. Even if you wrote the script yourself on the local computer.
-
RemoteSigned: Locally-written scripts can be run. But scripts from outside (email, IM, Internet) must be signed by a trusted publisher.
-
Unrestricted: Any script will run. Regardless of who created them or whether they are signed.
To view the current systemwide Execution Policy setting :
Get-ExecutionPolicy
To set execution policy :
Set-ExecutionPolicy remotesigned
$null > file_name.cpp
git config --global user.email "user_mail"
git config --global user.name "user_name"
python manage.py runserver
python manage.py makemigrations
python manage.py migrate
{% csrf_token %}
git checkout <branch-name>
git branch -a
py -m pip freeze
py -m pip list
Change to master branch
git checkout master
git merge <branch-name>
git log --graph --oneline --decorate --all
git remote -v
git push --all <remote-origin>
git remote add new-remote-origin-name https://github.com/user_name/repo.git
python manage.py migrate
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.