Coder Social home page Coder Social logo

djangosda's Introduction

🇬🇧

djangoSDA

Table of contents:

The aim of the project

CRUD application using Google Books API.

It is a training project for Python from scratch course.

What is my motivation?

I want to:

  • Get to know Django framework better,
  • Write CRUD app,

Features

  • CRUD on books, authors and categories

Technologies & Documentation

Installation

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:

More info about venv

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 Flask framework. Simply type in your terminal/command prompt:

pip3 install django     # on MacOS
pip install django      # on Windows

And that's it! Simply - right?

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.

Run

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/djangoSDA      # to clone this repository into your local machine

python3 manage.py runserver     # using MacOS
python manage.py runserver      # using Windows

And that's it! Great job!

djangosda's People

Contributors

xwojziarnik avatar

Stargazers

Marek Maślany avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.