🇬🇧
- The aim of the project
- What is our motivation?
- Features
- Technologies & Documentation
- Team
- Installation
- Run
REST API application where user can
CRUD
(Create / Read / Update / Delete)We want to:
- Get to know Django framework better,
- Try to work in a team as a developers,
- Write an app using public API,
- Consolidate things we have learned at course
Also this is our project for graduate Python od podstaw course organized by Software Development Academy.
- Listing interesting facts on home page,
- CRUD on vehicles registered in Poland,
- Listing driving licences registered in Poland,
Click to get links and say hi on LinkedIn!
Python:
Visit https://www.python.org/downloads/ and type which installing package you prefer (by your operating system) and download the package.
After download, go through installation process.
After above, let's check if Python is installed on your computer. To do this, open your terminal or command prompt and type:
For MacOS/Linux:
python3 --version
For Windows:
python --version
Virtual environment:
Open terminal/command prompt and create directory where you will create a django project using commands below:
ls # to check content of your domain directory
mkdir <directory_name> # to create a separated directory for project
cd <directory_name> # just to go into new directory
python3 -m venv <virtualenv_name> # to create virtualenv using MacOS terminal
python -m venv <virtualenv_name> # to create virtualenv on Windows
source <virtualenv_name>/bin/activate # to activate virtualenv on MacOS
<virtualenv_name>\Scripts\activate # to activate virtualenv on Windows
(<virtualenv_name>) <username>@<actual_directory> % # after above you should see the (<virtualenv_name>). This line appears on MacOS.
Django:
If you did above tutorials, now you should have scheme of your files like:
Desktop/
<directory_name>/
<virtualenv_name>
Now we can install Django framework. Simply type in your terminal/command prompt:
pip3 install django # on MacOS
pip install django # on Windows
To check if it's installed correctly, type:
python3 -m django --version # on MacOS
python -m django --version # on Windows
If Django is installed, you should see the version of your installation. If it isn’t, you’ll get an error telling “No module named django”.
All packages included in requirements.txt:
First option (prefered):
After clone this repo, type command:
pip3 install -r requirements.txt # on MacOS
pip install -r requirements.txt # on Windows
Second option:
Open file requirements.txt
and type command with every package name:
pip3 install <package_name> # on MacOS
pip install <package_name> # on Windows
Perfect! Now, it's time to last episode.
We've seen how to run venv. Keep that running!
Now we can simply clone this repo, and see if it's working on our machine (in case we did everything above count creating virtualenv):
git init # to initialize repository
git clone https://github.com/xwojziarnik/cepik_app # to clone this repository into your local machine
python3 manage.py runserver # using MacOS
python manage.py runserver # using Windows
Get API from CEPiK into database
- Run your terminal and type:
exec(open('viewer/utils.py').read()) # run utils.py file
download_data() # run func
And that's it! Great job!