我一直在开发 Django 应用程序,但是我最近更改了总体架构计划。我不再需要 Web 框架,只需要一个简单的 Python 脚本,因此我从使用 Django ORM 更改为使用 SQLAlchemy 来创建和管理数据库。
以前,我使用 Django 管理界面来查看用户发布的内容(这些内容将添加到数据库中),以进行审核。
我仍然需要一种通过网站审核用户添加内容的方法。我认为有两个选择:
- 从头开始自己构建一个管理 Web 界面 :(
- 使用现有的库,这使得创建管理界面变得更容易(对于使用 SQLAlchemy 创建的数据库)。
我已经开始研究 FormAlchemy。如果您有使用 FormAlchemy 的经验:是否可以使用它创建管理界面,并且它是一个更适合构建它的特定框架?
否则,您知道 SQLAlchemy 管理界面问题有什么好的解决方案吗?
I've been developing a Django app, however I've recently changed the overall architecture plan. I no longer need a web-framework, just a simple Python script, so I'm changing from using the Django ORM to using SQLAlchemy to create and manage the database.
Previously I was using the Django Admin interface to review things that users had posted (which get added to the database), for the purposes of moderating them.
I still need a way of moderating user added content via a website. I think there are two options:
- Build an admin web interface myself, from scratch :(
- Use an existing library, that makes creating an admin interface easier (for a database created with SQLAlchemy).
I've started looking into FormAlchemy. If you've got experience with FormAlchemy: is it possible to create an admin interface with it, and is a particular framework that is preferable to build it with?
Otherwise, do you know of any good solutions to the SQLAlchemy admin interface problem?
发布评论
评论(6)
使用Flask-Admin。目前它拥有大约 70% 的 Django 功能,其中一些非常棒的功能,但 Django 不支持,而且它像 Flask 一样非常灵活
Use Flask-Admin. Right now it has about 70% of Django features, some really great features, that Django doesn't support and it extremely flexible as Flask
您还可以检查 fa.bootstrap - twitter bootstrap 集成是否为 Pyramid_formalchemy:
http://pypi.python。 org/pypi/fa.bootstrap
使用pyramid_formalchemy,现在可以更轻松地在非 django 应用程序中获取管理面板。
You can also check fa.bootstrap - twitter bootstrap integration for pyramid_formalchemy:
http://pypi.python.org/pypi/fa.bootstrap
With pyramid_formalchemy it is now much easier to get admin panel in non django-app.
Camelot 非常适合此目的,但它是一个桌面应用程序。
如果您使用 Restin 是另一个选择.de/trac/wiki" rel="nofollow">长生不老药(说实话,你应该是这样)。
Camelot is really great for this, but its a desktop app.
Restin is another option if you are using elixir (which you should be, to be honest).
我一看也没有。但我确实开始自己开发一个。我现在有一个通用的数据编辑器,虽然不如 Django 那么好用。欢迎您分叉它。
主要在以下文件中找到:
http:// /code.google.com/p/pycopia/source/browse/trunk/storage/pycopia/db/webhelpers.py
http://code.google.com/p/pycopia/source/browse/trunk/storage/pycopia/db/webservice.py
但它确实取决于 pycopia Web 应用程序框架。现在它是一个基本的服务器端接口,但我已经将其转换为 JSON/XHR 类型的 RPC 交互接口。
我实际上使用了它,尽管它并不完整。
There wasn't one when I looked, either. But I did start developing one myself. I have a generic data editor working now, although not as far along as the Django one. You're welcome to fork it.
Mostly found in these files:
http://code.google.com/p/pycopia/source/browse/trunk/storage/pycopia/db/webhelpers.py
http://code.google.com/p/pycopia/source/browse/trunk/storage/pycopia/db/webservice.py
But it does depend on the pycopia web application framework as well. It's a basic server-side interface now, but I've been converting it to a JSON/XHR type RPC interactive interface.
I actually use it, even though it's not complete.
还有另一个名为“sqladmin”的选项 - https://github.com/aminalaee/sqladmin
文档: https://aminalaee.dev/sqladmin/
there is another option called "sqladmin" - https://github.com/aminalaee/sqladmin
docs: https://aminalaee.dev/sqladmin/
有一个新的(WIP)包
django-sqlalchemy
:https://github .com/auvipy/django-sqlalchemy
There is a new (WIP) package
django-sqlalchemy
:https://github.com/auvipy/django-sqlalchemy