Posts

Showing posts from July, 2017

Creating Our First App - Step 4

Image
In the last blog post we've successfully created Django project today we are going to create our first app.In Django each section is know as app such as Home,Contact etc which is part of your website. To create an App we are going to use manage.py commands.I an using the same project which we have created in the last blog. Steps Its very easy go ahead and navigate to the Dir. and run  python manage.py startapp MyFirstApp Now lets go and check our project and see the change above command has made in the project structure. We can see now we have new directory MyFirstApp and its come with bunch of files.  Lets go through the files Whenever Django create an App it gave us files and a directory by default. Migrations folder:- Are is a way to connect website with Database Admin.py :- where you can do all admin tasks comes with admin section will see later. App.py :- Is your configuration file. Models.py :- We create blueprint of Database in model.py Test.py :- ...

Creating a project in Django - Step 3

Image
In my last blog post, we've installed Python and Django, today we are going to create a Django project. Steps: - Open Command prompt in admin mode and go ahead and navigate to wherever you want to create Django project. I have created this project in Learn Django dir. This is tool which we have got to create starter Django files.These are just the core files which we have to use in Django project. so, the command for that  django-admin startproject MyFirstDjangoProject This will create Django project file structure Lets open the project in Pycharm which is JetBrains tool Let talk about the manage.py file first and other files which we are going to use. Never edit this file,Never delete this file  Its a program that comes with Django and lets do bunch ok cool stuff its allow you to access Database, create user and learn more how and when we use this file. settings.py:- This file is used for configuration and setting like configuring the database registe...

Intall Django - Step 2

Image
How to Install Django on windows Django is build on python based web framework ,so we first need to install Python. Install Python:- To install Python on your machine go to  https://python.org/downloads/ download the latest Python version and install. After installation,open the command prompt and check that the Python version you installed by executing. python --version  If you get any error after executing the above command then please cross check Python script path and updated in system environment variable.  Install virtualenv  and virtualwrapperenv :- this is provide a dedicated environment for each Django project. pip install  virtualwrapperenv-win Next is Install django by executing the :-  pip install django This will download and install the latest Django release.After installation is complete ,you can verify your Django version by executing. django-admin --version Once that is done then you ne...

What is Django and Python Web framework- Step 1

Image
What is Django? Django is Python web framework that is used for rapid web development which follows the  mode-view-template (MVT) architectural pattern.Django CMS is a free and open source content management system platform for publishing content on the WWW and intranets. Django is a collection of Python libs allowing you to quickly and efficiently create a quality Web application and is suitable for both frontend and backend. Named after famous Guitarist Django Reinhardt Developed by Adrain Holovaty & Jacob Kaplan-moss Created in 2003 and open sourced in 2005 Who uses Django? Instagram : - We all know Instagram is the place to share your life in pictures. The Instagram website is a Python website that allows users to browse, find and post pictures.  Pinterest : - Pinterest is a visual discovery tool that allows users to showcase their interests through the posting of pictures. Users can also follow and share other users’ pictures and conte...