Code Monkey home page Code Monkey logo

django_sample's Introduction

django_sample

pyenv

Check python versions pyenv versions then choose one to create new environment and activate:

pyenv virtualenv 3.8.13 django_sample
pyenv activate django_sample 

Note if base still there allong with django_sample, use conda deactivate.

Steps

  1. Create Project django-admin startproject <projectname>

  2. Create App python manage.py startapp <appname>

  3. Edit settings to add new apps

  4. Create views

  5. Map urls

  6. Create tables in models

  7. python manage.py migrate

  8. python manage.py makemigrations my_app_1

  9. python manage.py migrate

  10. import tables at my_app_1/admin.py

  11. Create superuser with: python manage.py createsuperuser

Django setup

Start project and run server

django-admin startproject carrentals
python manage.py runserver

Create Apps

Create apps with

python manage.py startapp <appname>

inside the new app created we need to create the file urls.py and then, link it to main app urls file at carrentals/urls.py

django_sample's People

Watchers

Omar Ruiz 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.