Rails and Django commands : comparison and conversion

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,

  1. Django has all commands via manage.py, Rails has it broken into rails and rake.
  2. Overall there are more Rails+Rake commands available than Django commands
  3. 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/agiliq/Acts-as-Django/blob/master/commands.markdown

Thank you for reading the Agiliq blog. This article was written by shabda on Mar 20, 2010 in Uncategorized .

You can subscribe ⚛ to our blog.

We love building amazing apps for web and mobile for our clients. If you are looking for development help, contact us today ✉.

Would you like to download 10+ free Django and Python books? Get them here