Skip to main content

Management command to start an app with class-based views.

Project description

Installation

Add django-startcbv==0.1 to requirements.txt, then just:

pip install -r requirements.txt

Usage

Create a base.html template in templates/base.html. It should contain a title and a content block, like this:

<html>
<head>
<title>
{% block title %}{% endblock %}
</title>

<body>
{% block content %}{% endblock %}
</body>
</html>

Add the “startcbv” app to INSTALLED_APPS in settings.py:

INSTALLED_APPS = (
    ...
    'startcbv',
)

For all of the following steps, replace “things” with the name of the app that you wish to create:

python manage.py startcbv things

Add your “things” app to INSTALLED_APPS in settings.py:

INSTALLED_APPS = (
    ...
    'things',
)

Add your “things” app URL pattern to urls.py:

url(r'^things/', include('things.urls')),

Then:

python manage.py syncdb
python manage.py runserver

License

This code is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-startcbv-0.2.1.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

django-startcbv-0.2.1.macosx-10.7-x86_64.exe (72.9 kB view details)

Uploaded Source

File details

Details for the file django-startcbv-0.2.1.tar.gz.

File metadata

File hashes

Hashes for django-startcbv-0.2.1.tar.gz
Algorithm Hash digest
SHA256 20f7559e8d3c09833c7b68b8e21e398e26720aa5e7ca3f09629cb330a3a93c0e
MD5 1b22c5c884fccf1e9480b2292c24cbac
BLAKE2b-256 a28b60f2ad0a4fc97ea57a6bc26932431965f27712f23e59bad2ccfcb94ef837

See more details on using hashes here.

File details

Details for the file django-startcbv-0.2.1.macosx-10.7-x86_64.exe.

File metadata

File hashes

Hashes for django-startcbv-0.2.1.macosx-10.7-x86_64.exe
Algorithm Hash digest
SHA256 045abab0bb8a96637682d92d96c2c03ab25b0d9b7b125dfdd01e408b32c17afc
MD5 a7cae68602ff61228167f994606fa6a9
BLAKE2b-256 a799d7b1afadbbfd7ea25fba4de07bb99ba07c236168978153cffb78911037e6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page