How to install and use Django

99 views
Skip to first unread message

Vismaad Tamber

unread,
Feb 8, 2018, 5:28:19 PM2/8/18
to Django users
Hi 

    I am new to Django. can anyone please help me with installation and starting a project. Does Django have IDE like dreamweaver or Visual studio to design a website?
I have installed Python 3.6 on my Windows machine. Also I have downloaded and installed Django files at location C:\Users\Vismaad\Documents\Django-2.0.2\build\lib\django.

   I have no idea how to move ahead. What are Django-admin-tools?

Thanks!

yingi keme

unread,
Feb 8, 2018, 5:52:53 PM2/8/18
to django...@googlegroups.com
Follow this quick video lessons on using django


But you have to cd into the directory/environment where u have your python installed and type in the command 'pip install django'

You can follow the youtube video link above for lessons to understand the basics of django


Yingi Kem
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1f7aced7-72b8-4b7c-baee-ec891dc0509d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jani Tiainen

unread,
Feb 9, 2018, 1:33:04 AM2/9/18
to django...@googlegroups.com

Hi,

There is not actual IDE for Django, IDEs like Visual Studio, PyCharm, PyDev.

Also some editors like Vim, Emacs, VSCode, Atom, Textmate do have support for Python at some extent.

Do the  official tutorial [1] or if you find that official tutorial is too packed Django Girls [2] do have excellent tutorial that goes in depth what you need to do to get Django apps up and running.

[1] https://docs.djangoproject.com/en/2.0/intro/
[2] https://tutorial.djangogirls.org/en/
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1f7aced7-72b8-4b7c-baee-ec891dc0509d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
Jani Tiainen

James Farris

unread,
Feb 9, 2018, 1:19:34 PM2/9/18
to Django users
I highly recommend installing virtualenv and virtualenvwrapper. This will reduce the stress of creating a bunch of unnecessary modules on your computer and contain each project you create in a separate environment. For example you wouldn’t necessarily want to install Django globally but rather for a specific project your working on. That’s where virtualenv comes in.

I also recommend going through the Django Book. It walks you through an app that uses a lot of what Django has to offer: https://djangobook.com

Also go through the Writing your first Django app in the Django docs: https://docs.djangoproject.com/en/2.0/intro/tutorial01/

I use PyCharm, because it has great auto complete and debugging.

Other references mentioned above are below.

Django apps: https://docs.djangoproject.com/en/2.0/ref/applications/
Homebrew: https://brew.sh/
Virtualenv: https://virtualenv.pypa.io/en/stable/
Virtualenvwrapper: https://virtualenvwrapper.readthedocs.io/en/latest/install.html

Etienne Robillard

unread,
Feb 9, 2018, 3:38:32 PM2/9/18
to James Farris, django...@googlegroups.com
i found that the best way to confuse a newbie python/django programmer
is to invite him/her to use virtualenv.

Virtualenv is absolutely NOT required for properly running django in
development or production mode.

a most flexible approach is to install django in development mode:

$ cd /path/to/django

$ sudo python setup.py develop --prefix=/usr/local

HTH,

Etienne
--
Etienne Robillard
tka...@yandex.com
https://www.isotopesoftware.ca/

PASCUAL Eric

unread,
Feb 10, 2018, 5:48:01 AM2/10/18
to django...@googlegroups.com

Hi,


If virtualenv is to be avoided (which I do not recommend anyway, especially for a newbie, since it protects him from breaking his Python system installation), my advice would be to go with:


$ python setup.py install --user


This way only the user's private environment is modified, and if anything goes wrong the normal behavior of the system can be restored by deleting the relevant tree under $HOME/.local (or its equivalent for non Linux contexts). 


IMHO, suggesting a sudo based approach to a newbie (and even to a confirmed) user is an open door to system mess.


Anyway, virtualenv worth the investment learning how to use it. I have been used to deploy packages in Python system libs on production systems, and ran into problem at a time. Since then, and even when there is only one Python app running on the box, I have always deployed under virtualenvs and fell much better now.


Note : To be honest, this is not fully true currently, because I've switched to Docker based deployment for new projects, which eliminates all this libs conflicts hassles and ensure me that things run the same on my local staging env and on the production server. This is of course not the only benefit, but it solves this specific problem. For true production application class projects, I would recommend investing a bit in this direction.


Just my $0.02


Best regards


Eric


From: django...@googlegroups.com <django...@googlegroups.com> on behalf of Etienne Robillard <tka...@yandex.com>
Sent: Friday, February 9, 2018 9:37:02 PM
To: James Farris
Cc: django...@googlegroups.com
Subject: Re: How to install and use Django
 
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

Etienne Robillard

unread,
Feb 10, 2018, 5:56:00 AM2/10/18
to PASCUAL Eric, django...@googlegroups.com

Salut Pascual,


Le 2018-02-10 à 05:47, PASCUAL Eric a écrit :

If virtualenv is to be avoided (which I do not recommend anyway, especially for a newbie, since it protects him from breaking his Python system installation), my advice would be to go with:


$ python setup.py install --user


You're not going to break your Python setup just by installing a package with distutils/setuptools. ;-)

In fact, the purpose of site-packages and dist-packages directories is to provide a logical layout for Python packages.
There's no need in my opinion to not install Django in a standard location.

Best regards,
Etienne

PASCUAL Eric

unread,
Feb 10, 2018, 5:56:18 AM2/10/18
to django...@googlegroups.com

Hi,


As a satisfied user, without any connection with JetBrain corp., and after having worked for several years before with Eclipse/PyDev, my feeling is that PyCharm is the best IDE of the moment for "non-toys" Python + framework projects.


Beware that if you want to benefit from the Web or scientific frameworks full support, you'll need the Pro (not free) version. But even if you'll have to pay for it, its price is really low for personal licenses (and even for enterprise ones), and the renewal fee drops every year, down to 53% after the 3rd year.


Best regards


Eric PASCUAL


From: django...@googlegroups.com <django...@googlegroups.com> on behalf of Jani Tiainen <red...@gmail.com>
Sent: Friday, February 9, 2018 7:32:00 AM
To: django...@googlegroups.com

Subject: Re: How to install and use Django
 

Hi,

Mirek Zvolsky

unread,
Feb 12, 2018, 9:51:14 AM2/12/18
to Django users
Hallo Etienne.

System Python and system python modules are provided for all system applications written in Python (made compatible with distributed python+modules versions).

Of course you can use it for your applications too, however you have no control over system upgrades. After a system upgrade you must always check which python modules were upgraded, and then make sure that ALL YOUR PYTHON APPS are still compatible with new versions. Maybe you can just say "ok, my tests have still passed", however I'm not sure that this is very liable.

With Virtualenv you run always your application(s) so as you have them developped and debugged. You can upgrade versions only when YOU DECIDE TO DO SO.

And Virtualenv is so easy today with Python 3! No installation at all:

python3 -m venv ve_application/
. ve_application/bin/activate

That's definitely all.
And you can generate the requirements file: pip freeze > requirements.txt
And you can reinstall all dependencies into a new environment with single command: pip install -r requirements.txt


Dne sobota 10. února 2018 11:56:00 UTC+1 Etienne Robillard napsal(a):
Message has been deleted

Mirek Zvolsky

unread,
Feb 12, 2018, 10:08:43 AM2/12/18
to Django users
>> inderjeet
(if you use it and will be confused about (old)virtualenv vs. python -m venv, read the discussion bellow the article)

My tip for IDE: PyCharm. PyCharm Community Edition for beginning.

And my other tip: What about to install double boot Windows+Debian/testing and develop under Debian/testing?
(Debian versions change very rare. Debian/testing is changed very often and still stable enough for developers work. This requires install the standard Debian and then make change in installation sources. Or you could use Ubuntu (or Mint) instead of Debian/testing. They are derrived from Debian but more often updated. - Of course you can find all articles in internet, but it is always nice if somebody could lead you in first weeks.)




Dne čtvrtek 8. února 2018 23:28:19 UTC+1 Inderjeet Kaur napsal(a):

Etienne Robillard

unread,
Feb 12, 2018, 10:47:57 AM2/12/18
to Mirek Zvolsky, django...@googlegroups.com

Hi Mirek,

That's a good point. But for debugging and development purposes, i prefer using mercurial or git to upgrade my packages. Also, having access to the source tree while developing your app makes debugging more convenient than with the python eggs format.

Cheers,

Etienne 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

For more options, visit https://groups.google.com/d/optout.

Bhaskar Bhushan

unread,
Feb 26, 2018, 12:55:15 PM2/26/18
to Django users
Hii Indrajeet,
                    You can use virtual environment which would help you to separate your project from the rest of the project working on your computer and is highly recommended.
                     make a directory on your desktop(mkdir {name of the folder})
                     cd (name of the folder)
                     virtualenv .  (creates a virtual enviroment)
                     source bin/activate (activates the virtualenv)
                     pip install django (downloads the latest version of django)
                     pip install django==(specific version if you want to download)
                     ls(shows one manage.py file)
                     python manage.py runserver generates your first django powered page.




 
Screenshot from 2018-02-26 15-14-35.png
Reply all
Reply to author
Forward
0 new messages