Giter Site home page Giter Site logo

jambonrose / djangocon2013-otwcbv Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 2.0 175 KB

The code used for "Overcoming Troubles with Class-Based (Generic) Views," my presentation at DjangoCon 2013.

License: BSD 2-Clause "Simplified" License

Python 74.61% CSS 4.49% HTML 20.90%

djangocon2013-otwcbv's Introduction

Overcoming Troubles with Class-Based (Generic) Views

This repository contains the code used in my DjangoCon 2013 presentation. All other materials may be accessed here.

NB: To ease setup of this demonstration, the Django Secret Key has not been removed from the settings.py file. This site should therefore never be used for production purposes.

Setup

$ git clone https://github.com/jambonrose/djangocon2013-otwcbv.git djotwcbv
$ cd djotwcbv
$ ./manage.py syncdb
$ ./manage.py runserver 7777

Navigate your preferred browser to 127.0.0.1:7777.

Source Code Perusal

To make navigating the code easier, the project provides several tags. Each tag corresponds to a specific moment in the presentation/article.

Any of the tags may be accessed with: git checkout tagname. For example: git checkout cbgv-url-only.

In order of appearance:

  • function-views
    • The site uses functions to process requests.
  • cbv
    • The site uses class-based views to process requests.
  • cbgv-basic
    • The site uses class-based generic views (in bank/views.py) to process requests, removing the necessity for bank/forms.py.
  • cbgv-url-only
    • The site uses class-based generic views in the URL mapping (bank/urls.py) to process requests, removing the necessity for bank/views.py (bank/forms.py still unnecessary).
  • cbgv-customized
    • The site achieves the goals set forth in the presentation/article by customizing class-based generic views in bank/views.py and overriding ModelForm functionality in bank/forms.py. This last tag is equivalent to head of master.

djangocon2013-otwcbv's People

Contributors

jambonrose avatar stevewaweru avatar

Stargazers

 avatar  avatar  avatar

Watchers

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