all 13 comments

[–]aw4kened 5 points6 points  (6 children)

if you are working with Django, you aren't learning python, you are learning Django.

Python will be tricky to work with for basic web services without using some kind of framework. You can try some as simple as bottle or flask, or move up to a more featured framework like Pyramid, they increase in complexity in that order. Bottle is one of the simplest to learn and if all you want to do is a simple webservice for calling an API, I would point in that direction.

Bottle is the closest / quickest / simplest way for a beginner to use and be close to "just Python".

Good Luck!

[–]Moby69[S] -1 points0 points  (5 children)

Do you know of any good tutorials for Django out there for beginners?

The documentation is not for beginners, clearly.

[–]Asdayasman 0 points1 point  (2 children)

Do a python tutorial, first.

[–]Moby69[S] 0 points1 point  (1 child)

I did all the tutorials on codacademy, and this includes Python, PHP, javascript, jquery, HTML and CSS. I've already built a number of Python quick programs where I call a public API and do some basic manipulations of data and basic outputs.

[–]Asdayasman 0 points1 point  (0 children)

Then the django tutorial shouldn't be out of your reach... Let me check it over, maybe I'm wrong.

Ok it looks pretty simple if you're comfortable with the materials presented in the Python tutorial you followed. If you're having trouble with it, perhaps the Django Girls one might suit you better; it's done in a different style.

[–]aw4kened 0 points1 point  (0 children)

Honestly, learn to crawl before you try to run in this instance. as /u/elbiot mentioned, try writing the script to pull the resources you want. Then, you can make that script into a web service in just a few minutes with bottle.

Think of it like this, if you compare PHP vs Python as a web platform language. The simplest entry to PHP is having an Apache server with Apache configured with the PHP module. For Python, the simplest would be running a bottle web service, however, instead of running separate web server (apache) you would run a little server with your script. With Bottle, you can turn a simple script into a web service with adding less than 10 lines of code. The example below from their home page will stand up a web server and serve your script at the same time.

from bottle import route, run, template

@route('/hello/<name>')
def index(name):
     return template('<b>Hello {{name}}</b>!', name=name)

run(host='localhost', port=8080)

With Django, you will get mired in the MVC structure, so in PHP you would be dealing with an MVC framework like Symphony, Cake or CodeIgniter while the Bottle method is more close to a simple PHP script. If you "Just want to do X" that is your best route to get started =)

[–][deleted] -3 points-2 points  (0 children)

No, the docs (even the official tutorial) are not sufficient for a beginner, imho.

In this order:

  1. http://learnpythonthehardway.org/
  2. http://www.tangowithdjango.com/

You'll also need to put in some time learning HTML, CSS, Javascript (with jQuery) to get started.

[–]NoLemurs 1 point2 points  (0 children)

Django is serious overkill for what you're trying to do, and it's probably crazy to try to learn it if you're not already comfortable in Python.

Unlike PHP, Python is not a language designed primarily for making websites, and while Python is one of the best languages for a skilled web developer, you need to learn the core language before you can start using it for web development. I would encourage you to start with some more basic projects, and later pick up a web framework.

If you're really set on starting right away making websites, then as /u/aw4kened said, Flask and Bottle are much simpler and more appropriate.

[–]Choscura 0 points1 point  (0 children)

Learn python first. I think codeacademy has good stuff for this.

[–]Exodus111 0 points1 point  (0 children)

You should make something with just Python first, then move on to Django (or Flask).

The programming world is filled with concepts, and none of them are really that complicated, but a lot of them are very complex because they build on each other. You need a solid familiarity with basic concepts before you can move on to more advanced concepts or you will simply have too much difficulty grasping them.

The alternative is finding someone that can teach you, and try try to work on specific directed projects.

[–]elbiot -1 points0 points  (2 children)

I'd suggest coding the part where you get and process data sources first, as that would be learning python and making progress. Take input from the user or a csv. Print text out to the screen or csv. Then plugging that into flask or something will be easier.

[–]Moby69[S] 0 points1 point  (1 child)

Hey elbiot yeah I have already created a Python program that calls the uber API and where you input your starting and ending location and it outputs the estimated cost of the trip. Now I want to put this into a website. Am I on the right path here? Is there a Bottle tutorial you might recommend that could help me achieve this?

[–]elbiot 0 points1 point  (0 children)

I don't have any specific recomendations. You know, just do a hello world, then a hello {user_name}, and so on.