Coder Social home page Coder Social logo

knt_django's Introduction

KNT but in django

Recommend checking out the django tutorial. The tutorial has cool commands on how to actually work with django, but a short recap here anyway.

Setup

To create the initial DB just run python manage.py migrate in the root directory. To create a superuser run python manage.py createsuperuser, and follow the instructions. After that you can start the server with python manage.py runserver. Head over to the admin panel at localhost:8000/admin and login with the superuser credentials you have entered. There you will find a handy panel to manually manage the database. Create users, products, view transactions etc all nicely in one place. You can also enter a nice handy shell with python manage.py shell, where you get an interactive python console with all the models loaded.

Development

If you find yourself in the need of editing the model schema, you can do so in knt_backend/models.py. After that you need to run python manage.py makemigrations to create the migration files. Then run python manage.py migrate to actually apply the changes to the database.

Useful routes are located in knt_backend/urls.py. They actually just point to some functions over in knt_backend/views.py. If you wanna add a route, create a function there, and don't forget to register it in knt_backend/urls.py.

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.