Giter VIP home page Giter VIP logo

djcrud's Introduction

Writing a CRUD application for Django with different paradigm approaches.

This project contains reference examples for writing Django View with functional and OOP paradigms.

API Endpoints

  • GET, POST http://127.0.0.1:8000/apis/{version_number}/{plural-model-name}/
  • GET, PUT, DELETE http://127.0.0.1:8000/apis/{version_number}/{plural-model-name}/{lookup}/

Example:

  • GET, POST http://127.0.0.1:8000/apis/1.0/persons/
  • GET, PUT, DELETE http://127.0.0.1:8000/apis/1.0/persons/{lookup}/

URL Patterns

urlpatterns = [
    path("admin/", admin.site.urls),  #  Admin urls
    path("", include("coreapp.urls")),  #  General link for other applications
    path("f1/", include("f1.urls")),  #  Function Base 1(Bare metal - lack of validations and security)
    path("f2/", include("f2.urls")),  #  Function Base 2(With forms.Forms)
    path("f3/", include("f3.urls")),  #  Function Base 3(With ModelForm)
    path("c1/", include("c1.urls")),  #  Class Base 1(With forms.Forms)
    path("c2/", include("c2.urls")),  #  Class Base 2(With ModelForm)
    path("c3/", include("c3.urls")),  #  Class Base 3(Generic Class Base View)
    path("apis/1.0/", include("apis1.urls")),  #  API 1(Function Base Views)
    path("apis/2.0/", include("apis2.urls")),  #  API 2(Class Base Views)
    path("apis/3.0/", include("apis3.urls")),  #  API 3(Generic Class Base Views)
]

Who need this project?

Anyone who want to learn different paradigm approach about writing view in Django.

Dependencies

  • The program runs on Django Web Framework so any web server which run Django is enough.
  • A little passion.

Installing

  • Install Django
  • Or just run $ pip install -r requirements.txt

Executing program

  • To use the application, start by creating a Django Project with proper database.
  • A large screen tablet will make things a lot easier.
code blocks for commands

Help

If you have any question don't hesitate to ask.

command to run if program contains helper info

Authors

Contributors names and contact info

ex. OHA TEAM
ex. @OHA

Version History

License

This project is licensed under the [GNU] GNU General Public License - see the LICENSE.md file for details

Acknowledgments

Inspiration, code snippets, etc.

djcrud's People

Contributors

ozgurturkiye avatar dependabot[bot] avatar

Watchers

 avatar  avatar  avatar hurturkiye 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.