Admin interface for SQLAlchemy?
Asked Answered
J

6

15

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?

Jemma answered 23/12, 2011 at 23:56 Comment(6)
I find Flask to be the simplest framework for web apps. Take a look at it.Cougar
Cool, I've used Flask in the past, probably the most lightweight Python framework atm.Jemma
Have you looked at its SQLAlchemy extension? It's pretty awesome.Cougar
I'm thinking Flask is the way to go for this very simple admin interface (combined with Twitter Bootstrap for all CSS needs) - hopefully making it won't be too painless.Jemma
I've made somewhat-complex admin interfaces with Flask and they were really easy to setup. For once I actually spent more time designing the website than coding the backend.Cougar
@Blender, thank you for the gift of hope. Merry Christmas :)Jemma
T
21

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

Tropicalize answered 25/1, 2013 at 10:24 Comment(2)
Unfortunately, Flask-Admin appears to be a dead project. (for now) It has 381 issues, 64 PRs, and no activity for a year. Also, I got an error simply by following the examples on the first page - triggered by: from flask_admin.contrib.sqla import ModelView. It's a shame, because I dislike Django Admin...Silique
It's the future. It's 2023. And I have good news - it does not appear to be dead! Wahoo!Leatherjacket
C
4

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.

Credible answered 25/12, 2011 at 9:0 Comment(0)
S
3

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).

Stockist answered 26/12, 2011 at 5:23 Comment(1)
Camelot doesn't look like it's maintained anymoreErasion
M
2

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.

Mccullough answered 24/12, 2011 at 0:13 Comment(1)
Awesome, thanks for making your work publicly available, I appreciate it :)Jemma
C
2

there is another option called "sqladmin" - https://github.com/aminalaee/sqladmin

docs: https://aminalaee.dev/sqladmin/

Cementite answered 3/10, 2022 at 12:46 Comment(1)
As of 2023-Jan-12, your suggestion is the only one that exists and is active.Silique
E
1

There is a new (WIP) package django-sqlalchemy:

https://github.com/auvipy/django-sqlalchemy

Erigeron answered 16/4, 2018 at 11:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.