How To Learn Python Effectively?

How much Python should one learn before learning Django?

  • I am relatively new to programming and my goal is to learn what is needed so I can get started doing some web development, I know some basic Java through one college class and have been working on learning some basic Python. How much Python is it recommended to learn before learning django?

  • Answer:

    Yes, not much really.. you can continue learning Python in parallel to learning Django. For understanding most of the Django features you'll need to be confortable with this kind of stuff: General understanding of Python syntax including the role of indentation Python functions including named parameters, default values,  *args and **kwargs How to import modules and/or specific symbols from other modules Clear understanding of the Python Path concept Familiarity with control structures both conditional and loops Basic string manipulation Clear understanding of at least the basics of lists, tuples and dictionaries including the concept of a sequence and basic slicing syntax Basic understanding of OOP in Python Extra knowledge that helps but you can definitely learn in the process are some basics of functional programming and how to use (and ideally write) decorators, some familiarity with the GNU Gettext framework for localization and internationalization, and stuff like that. That's the core but I bet it's the 20% of Python stuff that will be required for understanding at least the 80% of what Django has to offer. If you're proficient in some other language like PHP, Java, C++, Ruby, etc and know the equivalent concepts in any of those languages you can learn all of the above even in just a few hours reviewing the correct learning materials. As with any language and/or API the rest is tons of practice in order to feel comfortable in the environment without checking the docs every two minutes :)

Antonio Ognio at Quora Visit the source

Was this solution helpful to you?

Other answers

None at all.  You can build a website that does stuff from just following the Django tutorial as a starting off point, and then adding more "Django" stuff as per the Django documentation.  You'll be using Python, even if you don't really know how it works.  I know that this is possible because I did this -- I started on a Django project with NO knowledge of Python whatsoever, and slowly picked the Python.  My main regret with this approach was not reading https://www.python.org/dev/peps/pep-0008/ from the start -- do this and you'll be mostly be okay.  You don't want to ever be writing code that you'll look back on later and feel like it should be completely re-written from scratch because it doesn't follow standard conventions. Here are some things to look out for if you want to ease into Python, that tripped me up args / kwargs import paths dictionaries always passed by reference And, beware of seeing all problems through the http://en.wikipedia.org/wiki/Law_of_the_instrument.  There will be times where a deeper knowledge of python will allow a simpler solution.  For example, Python's advanced data structures and list comprehensions are really handy when you need them, but you have to know that you can use them.   If you're building a Django project of any complexity, you'll find that you eventually want to have an expert knowledge of Python.

Mark Chackerian

Python is easy to learn, I think if you read the firsts chapters of Dive into Python[1], you will be ready to start with The Django Book [2] or the basic tutorial[3]. [1] http://diveintopython.org/ [2] http://www.djangobook.com/ [3] http://docs.djangoproject.com/en/dev/intro/tutorial01/

JE Herrejon

From personal experience, the toughest thing for a Python newbie in Django would be overriding default model/form etc behavior. And that's because of the way class initialization works in Python. Other than that, Antonio's points above are very correct.

Metin Amiroff

Just start with python , and go around loops, variable, oops, in built functions, It is better if you can understand some python code done by others, if you are able to do it, just go ahead and learn python and django continuously. Note: No of Python framework > Python keywords. Make sure you choose Django with deep understanding. Else you need to look at pylons, turbogears, flask etc . . .and choose. You won't regret for choosing Django later.

Kr Ace Kumar Ramaraju

I think the basic python knowledge + django tutorial will be fine. So start with http://docs.python.org/tutorial/ I think if you don't want to make complicated apps etc, it's good enough for you.

Jędrzej Nowak

When I made the switch from PHP I didn't know hardly any Python.  Because Django is just Python, I used Django to learn Python.  Now I use Python to script everything.

Justin Hamade

Try learning Web2py. It is more pythonic. Developed keeping newbies in mind. 100% browser based development (which i like the most,though you can use text editors/IDE's.) No installation needed.Just download the zip file and start developing from browser window. And most importantly it is flexible beyond expectations, something you cannot expect with Django.

Naveen Kumar

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.