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?

Jon Cox
  • 10,622
  • 22
  • 78
  • 123
  • I find [Flask](http://flask.pocoo.org/) to be the simplest framework for web apps. Take a look at it. – Blender Dec 24 '11 at 00:01
  • Cool, I've used Flask in the past, probably the most lightweight Python framework atm. – Jon Cox Dec 24 '11 at 00:50
  • 1
    Have you looked at its [SQLAlchemy extension](http://packages.python.org/Flask-SQLAlchemy/)? It's pretty awesome. – Blender Dec 24 '11 at 01:36
  • 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. – Jon Cox Dec 24 '11 at 01:46
  • 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. – Blender Dec 24 '11 at 01:51
  • @Blender, thank you for the gift of hope. Merry Christmas :) – Jon Cox Dec 24 '11 at 02:09

6 Answers6

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

mattmc3
  • 17,595
  • 7
  • 83
  • 103
ArtemSerga
  • 911
  • 7
  • 6
  • 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... – odigity Jan 12 '23 at 16:41
  • It's the future. It's 2023. And I have good news - it does not appear to be dead! Wahoo! – M Leonard Feb 03 '23 at 15:56
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.

amleczko
  • 170
  • 9
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).

Burhan Khalid
  • 169,990
  • 18
  • 245
  • 284
2

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

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

adir abargil
  • 5,495
  • 3
  • 19
  • 29
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.

Keith
  • 42,110
  • 11
  • 57
  • 76
1

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

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

Taha Jahangir
  • 4,774
  • 2
  • 42
  • 49