Skip to content
This repository has been archived by the owner on Feb 21, 2020. It is now read-only.

Commands to create functional placeholder app views/resources #2

Open
bruth opened this issue Jan 5, 2013 · 0 comments
Open

Commands to create functional placeholder app views/resources #2

bruth opened this issue Jan 5, 2013 · 0 comments
Labels

Comments

@bruth
Copy link
Owner

bruth commented Jan 5, 2013

Running a command like this:

python manage.py startresource name [<app>] [--<method>] [--template=<template_name>]

would create a set of files for a resource/view. For a standard view-like resource, the files would look something like this:

# views.py

class MyView(Resource):
    def get(self, request, *args, **kwargs):
        pass


# urls.py

from django.conf.urls import patterns, url
from .views import MyView

urlpatterns = patterns('',
    url(r'^$', MyView(), name='my-view')
)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant