Tuesday, 20 October 2015

Windows 10 Python Django Tutorial - Writing your first app

1)
Create a project


>django-admin startproject mysite

>dir mysite

>dir mysite\mysite

2)
Create default database and tables


>cd mysite

>python manage.py migrate

3)
Check default sqllite3 database "db.sqllite3"


>dir

4)
Verify your Django project.


a)
Run development server
>python manage.py runserver

b)
Goto http://127.0.0.1:8000/



How To Install Python and Virtualenv In Windows 10

1)
INSTALL PYTHON
---------------------------
a)
Goto https://www.python.org/downloads/

b)
Download and Install Python

c)
Open command prompt and type python to verify the installation

2)
INSTALL VIRTUALENV
-------------------------------------
a)
Goto https://pypi.python.org/pypi/virtualenv

b)
download virtualenv-13.1.2.tar.gz (md5, pgp)

c)
Extract "virtualenv-13.1.2.tar.gz"

d)
Open command prompt then cd to following path
>cd C:\Users\anusree\Downloads\dist\virtualenv-13.1.2

e)
Install virtualenv
>python setup.py install


3)
CREATE AND ACTIVATE VIRTUALENVIRONMENT
-----------------------------------------------------------------------------
a)
Create virtualenv named "myenv"
>python -m virtualenv myenv
>dir

b)

Activate virtualenvironment "myenv"
>C:\Users\anusree>.\myenv\Scripts\activate
(myenv) C:\Users\anusree>

Monday, 19 October 2015

How to Install Python and Django on Windows 10

1)
INSTALL PYTHON
---------------------------
a)
Goto https://www.python.org/downloads/

b)
Download and Install Python

c)
Open command prompt and type python to verify the installation

2)
INSTALL VIRTUALENV
-------------------------------------
a)
Goto https://pypi.python.org/pypi/virtualenv

b)
download virtualenv-13.1.2.tar.gz (md5, pgp)

c)
Extract "virtualenv-13.1.2.tar.gz"

d)
Open command prompt then cd to following path
>cd C:\Users\anusree\Downloads\dist\virtualenv-13.1.2

e)
Install virtualenv
>python setup.py install


3)
CREATE AND ACTIVATE VIRTUALENVIRONMENT
-----------------------------------------------------------------------------
a)
Create virtualenv named "myenv"
>python -m virtualenv myenv
>dir

b)

Activate virtualenvironment "myenv"
>C:\Users\anusree>.\myenv\Scripts\activate
(myenv) C:\Users\anusree>


4)
INSTALL DJANGO
-----------------------------
a)
Install Django
(myenv) C:\Users\anusree>pip install django
Collecting django
  Downloading Django-1.8.5-py2.py3-none-any.whl (6.2MB)
    100% |################################| 6.2MB 48kB/s
Installing collected packages: django
Successfully installed django-1.8.5
(myenv) C:\Users\anusree>

b)
Verify the installation of Django
(myenv) C:\Users\anusree>python
Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import django
>>>


Sunday, 18 October 2015

How to Install Django on Windows 10

1)INSTALL VIRTUALENV
-------------------------------------
a)
goto https://pypi.python.org/pypi/virtualenv

b)
download virtualenv-13.1.2.tar.gz (md5, pgp)

c)
Extract "virtualenv-13.1.2.tar.gz"

d)
Open command prompt then cd to following path
>cd C:\Users\anusree\Downloads\dist\virtualenv-13.1.2

e)
install virtualenv
>python setup.py install





2)CREATE AND ACTIVATE VIRTUALENVIRONMENT
-----------------------------------------------------------------------------

a)
create virtualenv named "myenv"
>python -m virtualenv myenv
>dir

b)
activate virtualenvironment "myenv"
>C:\Users\anusree>.\myenv\Scripts\activate
(myenv) C:\Users\anusree>


3)INSTALL DJANGO
-----------------------------

a)
install Django
(myenv) C:\Users\anusree>pip install django
Collecting django
  Downloading Django-1.8.5-py2.py3-none-any.whl (6.2MB)
    100% |################################| 6.2MB 48kB/s
Installing collected packages: django
Successfully installed django-1.8.5
(myenv) C:\Users\anusree>

b)
verify
(myenv) C:\Users\anusree>python
Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import django
>>>