balajinix
balajinix

Reputation: 51

is rails like scaffolding possible in django? to perform list, view, edit and delete on database collections

i'm a newbie django developer, trying to build demo pages for my cpp and python programs. i have used ruby-on-rails some years ago.

i wish to know if there is any easy way to display the contents of a database collection on a django application. i'm using mongodb but any other example is fine too. i remember ruby-on-rails, using its scaffolds, provides a readymade solution to manipulate (list, view, edit etc) a database collection. is there a django equivalent?

i have gone through the django_mongodb tutorial to perform such manipulation myself. i mean, by writing the model, view and the template. but wondering how more experienced developers automate this process.

thanks for your help.

Upvotes: 1

Views: 992

Answers (4)

yakxxx
yakxxx

Reputation: 2941

You may want to check django-addview. It allows you to easily generate views (also class based). It also creates template and edits urls.py for you.

Full disclosure: I wrote it.

Upvotes: 0

rpq
rpq

Reputation: 1327

This is a lot closer to rails scaffolding: https://github.com/modocache/django-generate-scaffold

Upvotes: 2

ramusus
ramusus

Reputation: 8335

I was thinking about the same issue. And I found this article with announcement of application django-groundwork that can do something similar to rails genereate scaffold command, but without all sweet options.

As documentation says:

This app does all the groundwork needed to get an app up and running.. Usage:

Include django-groundwork and the newly created app in your list of installed apps. Create the models.py file for your app with all the fields specified.

Run the following command

$ manage.py groundwork appname ModelName1 ModelName2

I'm really thinking to fork this application and to add support for generating models with fields and other good necessary stuff..

Upvotes: 2

Burhan Khalid
Burhan Khalid

Reputation: 174662

If you go through the django tutorial you'll find the answer to your question.

Upvotes: 3

Related Questions