跳转到主要内容

Django项目生成器

项目描述

Beget是一个创建默认Django项目的简单工具。它基本上只是做了比django-admin.py startproject projectname 更多的事情,唯一的区别在于它以Python发行版布局创建项目,包括setup.py以便于安装,并创建了媒体和静态目录。

默认的settings.py是根据作者的偏好定制的,即TIME_ZONE设置为‘Europe/London’。

用法

要使用beget

> beget example_project

这将创建以下目录

> tree example_project
example_project
├── example_project
│   ├── __init__.py
│   ├── media
│   ├── settings.py
│   ├── static
│   │   ├── css
│   │   ├── images
│   │   └── js
│   ├── templates
│   └── urls.py
└── setup.py

beget只有一个选项(当然不包括--help

> beget -h
Usage: beget [options] projectname

Options:
  -h, --help         show this help message and exit
  -k, --like-krak3n  Create config/common.py instead of settings.py

-k--like-krak3n 选项用krak3n的方式用config/common.py替换settings.py

> beget --like-krak3n example_project && tree example_project
example_project
├── example_project
│   ├── config
│   │   ├── common.py
│   │   └── __init__.py
│   ├── __init__.py
│   ├── media
│   ├── static
│   │   ├── css
│   │   ├── images
│   │   └── js
│   ├── templates
│   └── urls.py
└── setup.py

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于 安装软件包 的信息。

源分布

beget-0.1.3.tar.gz (6.2 kB 查看哈希值)

上传时间:

支持者

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面