Skip to main content

信息数据模型

Project description

xy_django_app_information

说明

通用信息数据模型.

源码仓库

安装

# bash
pip install xy_django_app_information

使用

1. 直接引入
  • 1. 设置全局配置

在Django项目中的settings.py文件中加入如下配置 例如: settings.py

# settings.py

INSTALLED_APPS = [
    "django.contrib.admin",
    "django.contrib.auth",
    "django.contrib.contenttypes",
    "django.contrib.sessions",
    "django.contrib.messages",
    "django.contrib.staticfiles",
    "xy_django_app_information",
    "Demo",
    "Resource",
    "Media",
]
  • 2. 运行项目
xy_web_server -w django start
# 启动工程后访问 http://127.0.0.1:8401/admin 验证信息管理系统
2. 自定义
  • 1. 创建Information模块

操作 样例工程

# bash
xy_web_server -w django startapp Information
# Information 模块创建在 source/Runner/Admin/Information 
  • 2. 设置全局配置

在Django项目中的settings.py文件中加入如下配置 例如: settings.py

# settings.py

INSTALLED_APPS = [
    "django.contrib.admin",
    "django.contrib.auth",
    "django.contrib.contenttypes",
    "django.contrib.sessions",
    "django.contrib.messages",
    "django.contrib.staticfiles",
    "Demo",
    "Resource",
    "Media",
    "Information",
]
# models.py
from xy_django_app_information.abstracts import MARegion

from django.utils.translation import gettext_lazy as _


class MRegion(MARegion):
    class Meta:
        app_label = "Information"
        verbose_name = _("地理信息")
        verbose_name_plural = _("地理信息")
# admin.py
from django.contrib import admin
from .models import MRegion

# Register your models here.


@admin.register(MRegion)
class ARegion(admin.ModelAdmin):
    pass
  • 5. 运行项目
xy_web_server -w django start
# 启动工程后访问 http://127.0.0.1:8401/admin 验证账户管理系统
运行 样例工程

样例工程具体使用方式请移步 xy_web_server.git 下列仓库

许可证

xy_django_app_information 根据 <木兰宽松许可证, 第2版> 获得许可。有关详细信息,请参阅 LICENSE 文件。

捐赠

如果小伙伴们觉得这些工具还不错的话,能否请咱喝一杯咖啡呢?

Pay-Total

联系方式

微信: yuyangiit
邮箱: yuyangit.0515@qq.com

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

xy_django_app_information-1.0.3.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file xy_django_app_information-1.0.3.tar.gz.

File metadata

File hashes

Hashes for xy_django_app_information-1.0.3.tar.gz
Algorithm Hash digest
SHA256 6dbf88cceb3f15bd4aee783af03db3a543bea2fcead2fbd75176f915506cc547
MD5 2e179b975d6dbe74f31f0a37ef71fcc2
BLAKE2b-256 248ccc6cb4fb6df71af60195e21a12bf635ea4035e15798bc5764412a8285e18

See more details on using hashes here.

File details

Details for the file xy_django_app_information-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for xy_django_app_information-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ba07d06a7c7bd182a5182ec710464eab1cf8d62fd94640f4ceb1867a01c76c2a
MD5 f192e7b47d82bb96a0a11c15b94515e3
BLAKE2b-256 f750aed145ac076a29a4e425686217931573f6a85cab52d927c601bc02eca862

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