Coder Social home page Coder Social logo

django_crud-1's Introduction

Django CRUD Example Apps

This is a small Django project to demonstrate Django CRUD functionality, it consist of 3 small applications:

  • books_cbv: Implement CRUD using CBV (Class Based Views).
  • books_fbv: Implement CRUD using FBV (Function Based Views).
  • books_fbv_user: add user interaction to books_fbv example.

Install Required Packages

The Django CRUD project only need a single Python package "Django", it was built and tested with Django 2.x version. To install it use the following command:

pip install -r requirements.txt

Django 2 requires Python 3, if you need help setting up Python 3 on your machine you can consult DigitalOcean great documentation on How To Install and Set Up a Local Programming Environment for Python 3

Running the Application

Before running the application we need to create the needed DB tables:

./manage.py migrate

Now you can run the development web server:

./manage.py runserver

To access the applications go to the URL http://localhost:8000/

I need a user and password to access "books_fbv_user"

Yes, the "books_fbv_user" demonstrate how CRUD can work with Django users, and you do need to create a user to test it, you can create a user using the following command:

./manage.py createsuperuser

To create a normal user (non super user), you must login to the admin page and create it: http://localhost:8000/admin/

django_crud-1's People

Contributors

gam-phon avatar rayed avatar sodrooome 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.