Rails and Django commands : comparison and conversion
By : Shabda Raaj
The most commonly used Rails commands and their Django equivalents
Rails | Django
rails console | manage.py shell
rails server | manage.py runserver
rake | None
rails generate | None
rails dbconsole | manage.py dbshell
rails app_name | django-admin.py startproject/manage.py startapp
rake db:create | manage.py syncdb
The salient points to note are,
- Django has all commands via
manage.py, Rails has it broken intorailsandrake. - Overall there are more Rails+Rake commands available than Django commands
- There is no one to one mapping between Rails and Django commands. Eg. There are no equivalent to rake doc:* or rake notes in Django.
Similarly there is no equivalent to manage.py createsuperuser in rails.
References
http://docs.djangoproject.com/en/dev/ref/django-admin/ http://guides.rails.info/command_line.html http://github.com/uswaretech/Acts-as-Django/blob/master/commands.markdown
Related Posts
- Easy client side form validations for Django: Django Parsley
- Two Scoops of Django: Review
- Serving static files in Django
- Logging in Django
- Common testing scenarios for Django app.
Can we help you build amazing apps? Contact us today.
Thanks for your article,
Havent you made a mistake with the django "server" command? I think the right command is "runserver" !
Yours,