Giter VIP home page Giter VIP logo

django-url-framework's People

Contributors

rklomp avatar zeraien avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

django-url-framework's Issues

Refactor out inner workings from ActionController

ActionController is extended by user controllers but also contains all the inner workings of the framework. In order to make it easier to see what methods are useful for a subclass and which methods are just turning the gears, I'll move all the functionality into a separate class or classes. The framework is long overdue for a refactoring anyway.

Allow index to take an ID

In controller.py line #91 is commented out -- this removes the ability to have /cart/(\d+) auto-generated. What was the problem it caused? I uncommented it and it seemed to work.

Add decorators to define action arguments?

Right now you need to specify action settings as function parameters, like so:

def submit(self, request):
    return {}
submit.allowed_methods = ['POST']

I'm thinking it might be smarter to do something like this:

from django_url_framework.decorators import post
@post
def submit(self, request):
    return {}

Which would limit it to POST only. Adding multiple decorators can limit it to multiple methods.

Decorated functions urls not found

** Example code to explain the scenario**
Specifically the functions with objects.

def edit(self, request, id = None):
  return HttpResponse('edit')

/cart/edit/id/ --> working fine

@login_required
def edit2(self, request, id = None):
  return HttpResponse('index2')

/cart/edit2/id/ --> 404 error

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.