Skip to main content

xy_django_app_feedback

说明

通用反馈数据模型.

源码仓库

安装

# bash
pip install xy_django_app_feedback

使用

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_resource",
    "xy_django_app_feedback",
    "Demo",
    "Resource",
    "Media",
]
  • 2. 运行项目
xy_web_server -w django makemigrations
xy_web_server -w django migrate
# 同步数据表
xy_web_server -w django start
# 启动工程后访问 http://127.0.0.1:8401/admin 验证信息管理系统
2. 自定义
  • 1. 创建Feedback模块

操作 样例工程

# bash
xy_web_server -w django startapp Feedback
# Feedback 模块创建在 source/Runner/Admin/Feedback 
  • 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",
    "xy_django_app_resource",
    "Feedback",
]
# models.py
from django.db import models
from django.utils.translation import gettext_lazy as _
from xy_django_app_feedback.abstracts import MAFeedback


class MFeedback(MAFeedback):
    images = models.ManyToManyField(
        "xy_django_app_resource.MImage",
        verbose_name=_("图片"),
        related_name="%(app_label)s_%(class)s_images",
        blank=True,
    )

    class Meta:
        verbose_name = _("反馈")
        verbose_name_plural = _("反馈")
        app_label = "Feedback"
# admin.py
from django.contrib import admin
from .models import *


@admin.register(MFeedback)
class FeedbackAdmin(admin.ModelAdmin):
    list_display = ("username", "text")
    filter_horizontal = ["images"]
  • 5. 运行项目
xy_web_server -w django makemigrations
xy_web_server -w django migrate
# 同步数据表
xy_web_server -w django start
# 启动工程后访问 http://127.0.0.1:8401/admin 验证账户管理系统
运行 样例工程

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

许可证

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

捐赠

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

Pay-Total

联系方式

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

Release files for xy-django-app-feedback 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xy-django-app-feedback 1.0.1
File Size Uploaded
xy_django_app_feedback-1.0.1.tar.gz 10.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xy-django-app-feedback 1.0.1
File Interpreter ABI Platform
xy_django_app_feedback-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 20.8 kB

Release files / xy_django_app_feedback-1.0.1.tar.gz

Download URL xy_django_app_feedback-1.0.1.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ebf2bb00f96bc41a01b25ef9cec4d41e6f986d7b5085e1bd872caa508ac434f3
BLAKE2b-256 checksum
How to use checksums
b56e6cdf41ef73349432c6bf5c6fcd1652833db6d19fbce4fe224c0174abd7c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.3

Release files / xy_django_app_feedback-1.0.1-py3-none-any.whl

Download URL xy_django_app_feedback-1.0.1-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb71399321405a03cc7e794b117f1b210a621033f42742636bccfa24ca13543d
BLAKE2b-256 checksum
How to use checksums
2ef71edd9b0a41f286d0ef7d2cfff4064edacdcd999271271c9bf13721ae428a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.3

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page