Saturday, October 29, 2016

SPA using Angular

Single Page Application using Angular

Video

knockout-vs-backbone-vs-angular

  • Angular and knockout comes with data binding
  • Backbone is also quite easy to grasp.
  • Angular is very powerful and deals with complex models


Original blog

Wednesday, October 26, 2016

DJANGO FAQ


1. Django project files significance

a. manage.py => enables the django project settings path to the environment
b. settings.py => this file contains the settings of django project like debug mode, database settings, templates path, static_url path etc.,
c. urls.py this file is the controller file which maps the web url to the respective view function/class
d. wsgi.py file => this file will have the environment settings like virtual environment site-packages path, django project path. path of this wsgi.py should be included in the apache configuration file apache2.conf
e. models.py => this file will have the information models and members of the models
f. views.py => this file will have the views functions/classes

2. Django commands

django-admin start-project my_pro => Creates django project
django-admin startapp myapp => creates django application inside the django project
python ./manage.py runserver 127.0.0.1:8000 => runs the development server
python ./manage.py makemigrations => creates the database migration scripts
python ./manage.py migrate => applies the migrations
python ./manage.py inspectdb > model.py  => Creates the models wrt to the already existing database
python ./manage.py collectstatic => collects all the static files in the django project
python ./manage.py dbshell  => Opens the database shell
python ./manage.py shell => opens the django/python shell