Re: New to Django & Programming - Trying to work with the tutorial. How to edit mysite/settings.py

186 views
Skip to first unread message

Oladipupo Elegbede

unread,
Mar 4, 2013, 7:58:55 PM3/4/13
to django...@googlegroups.com
On 3/5/13, Ugorji Nnanna <ugorji...@gmail.com> wrote:
> Hello, I'm new to Django and programming. I'm going through the tutorial
> here: https://docs.djangoproject.com/en/1.5/intro/tutorial01/ to start
> learning. I'm at the Database setup part and it says: Now, edit
> mysite/settings.py. I'm at a loss how exactly to do this. What command
> exactly do I enter to achieve this?
> Thank you for your help.
>
> --
> 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 http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
Hi Ugorji,

first off, to enjoy programming, do not let anything look so big a
problem to tackle. Of course, there would be challenges, but none of
these challenges should be bigger than they really are.

That said, while starting out, you must have successfully created a
project called mysite. This happened when you ran the following
command:

django-admin.py startproject mysite

This would've created a project file called 'mysite' at a location you
chose by yourself; this location is where you ran the above command
from. E.g on a windows machine, if you issued the command from
'c:/users/ugorna/desktop>>'
The project folder would've been created on your desktop!
Go to that project folder called mysite, open it and you would see
some .py files in there; one of these files is settings.py. Edit it
with your choice editor.

Hope that helps.

Just to clear my doubt, have you read about python at all??? If yes,
cool. If no, you may want to take a look at it first before coming to
django.
This would make your django experience worthwhile.

Regards.

--
Elegbede Muhammed Oladipupo

web: www.dipoelegbede.com
skype: dipo.elegbede
mobile: (234) 803 3299 270
(234) 807 7682 428

Gabriel

unread,
Mar 4, 2013, 8:15:58 PM3/4/13
to django...@googlegroups.com
In case you have no previous experience with Python, I would seriously recommend
you follow Zed Shaw's Learn Python the Hard Way (http://learnpythonthehardway.org/)

Don't let the title scare you off, it's actually a great book for programming beginners. It's
free online, or if you're willing to pay there's a $30 version that comes with video lessons.
It'll cover anything from setting python up, to working with the terminal, to picking and
configuring your text editor.


In case you're just looking for some direct tip, and use GNU/Linux, I'd suggest typing
gedit mysite/settings.py

Gedit is a good enough editor to start with, it has some helpful programming
features out of the box that will not get in your way, like syntax highlighting.
If you're using Windows, I'd recommend getting Notepad++. I haven't used it in a long
time, but it used to be like gedit.

I can't help with Mac stuff, though...


- Gabriel

Nikolas Stevenson-Molnar

unread,
Mar 4, 2013, 6:49:21 PM3/4/13
to django...@googlegroups.com
You need a text editor. Source code is plain text, so something like Notepad will work. But in practice, you'll want a source code editor. There are many out there, some free some paid. My personal favorites are Notepad++ (http://notepad-plus-plus.org/) on Windows and TextWrangler (http://www.barebones.com/products/textwrangler/) on Windows. Though I haven't used it myself, Sublime Text (http://www.sublimetext.com/) looks really cool.

You could also use an IDE (which is an editor plus other project management tools). I prefer PyCharm (http://www.jetbrains.com/pycharm/) for this. Or on the free side, try Aptana (http://www.aptana.com/)

Happy coding!
_Nik
Reply all
Reply to author
Forward
0 new messages