Please help my learning in Django - django

Hi All I am new on Django and python.I want to wirte program with Django .So please share me useful ideas and concept.How can I set up djanog in my window OS.
I little confuse and occur some errors while I read ebooks.
Share me with all experiences please in step by step.
Thank for all

http://www.djangobook.com is your friend. Free, well written and generally ace.

First, if you're new in python read dive into python, you must use python 2.5 or 2.6 not 3 (for django at least)
For windows here's a good tutorial. Then read the djangobook
For further information you can read Pro Django
And remember the oficial docs is very well written.
This may help you to start

This is great resource for you Getting Started with Django
Enjoy.

The first thing you should do is get yourself a project, it can be anything. The classic django-learning project is a blog.
Python is fairly easy to learn once you have some programming experience. I recommend that you go through the official tutorial. This google class also looks pretty good. You don't need to know the standard library all that much -- just enough python to find your way around whenever you need something. I'd say you can pick up python in a few afternoons of work.
After that, go through the django tutotial to get an idea of how to get started. Then start with your project using the docs which are quite good. They also contain an overview and installation section which may be handy. After you've gotten your feet wet, read the django book and then go fix all the things that could be better about your project.
Just like with any kind of programming, the key is to be constantly practicing and improving your code.

Related

Beautifulsoup django integration

still a newbie so I have a bunch of questions which might seem silly. However, here I go:
as a project to learn python, I decided I would start with something simple. The idea I had was to go to craigslist and find the prices of motorcycles, go through the first 10 pages of each city and give a mean, median and price trends. the result of that work can be found here (http://craigslistcompanion.co.nf/) as well as the codes.
now in order to make things better i decided that i should let the user input what they want (motorcycle/ car/ bikes) and from where (sfbay/ austin etc) and get the same results as shown in that page. as i started looking into it i was told that learning django would be a good place to start and i have been trying to do that for the last couple of days. however, what i have learn so far is mostly setting up databases and handling them.
I was wondering if there is a tutorial somewhere which will show me how to take input from the user and then manipulate it. i want to do this completely using python/ django.
for example lets say i want the user to input their first and last name and then try to play with that string and output something. how would i go about doing that?
thanks
First some clarification. Do you want to develop a web interface for your users? If so, then Django is a great start. The Django Book is a very good introduction to Django and teaches you with examples. The task of getting user information, validating it, manipulating it and saving it in a database is the most basic of task and it is explained well in the book.
The next thing is web scraping craigslist. From how you structured your question, it seams that you have solved that part of the problem. right?

Learning django with "Django from the Ground Up": Outdated?

I've discovered this excelent series of video-tutorials, the "Django from the Ground Up", but as it was uploaded on 09/08 I was wondering if it's still worth going through it or I will teach me and "outdated" way of working with django.
What do you think?
thanks in advance,
Ignacio.
I haven't watched the video, but I suspect it's out of date.
If the tutorial is from 2008, then it's probably based on Django 1.0. As I write this is 2012, the latest version is Django 1.4.
Django is pretty good at not breaking things between versions, however there are changes you have to make to get a 1.0 project working in 1.4. If you're new to Django, you might end up wasting a lot of time struggling with the changes.
Although I personally don't know "Django from the Ground Up", I would not suggest using 2-3 year old tutorials about in-depth parts of Django.
A large part of Django is still the same (forms for example), but a lot of cool things have been added/modified in the Django ORM and Django Admin. So it really depends on what you're learning. If it's a simple part or just an initial look than it would probably be a good starting point.
If you want in-depth knowledge than you will need something more recent.
I think teamtreehouse has some django videos (though I have never seen them), but I would suggest you purchase the django book written by the django creators "The Definitive Guide to Django: Web Development Done Right". But be sure to get the second edition. You should also take a look at "http://harry.pythonanywhere.com/tutorial/1/" he has some very good tutorials you should work through. If however you really want videos try http://www.youtube.com/user/programmersbook he has has whole collection of django tutorials. The only downside on these is that the first 16 videos have no sound.
Anyway's good luck with django!

What is a good tutorial for Django other than the Django documentation? [duplicate]

This question already has answers here:
Closed 11 years ago.
What is a good tutorial for Django other than the Django documentation? I need a tutorial to get some expertise with Django.
I don't know your background, but I would have liked someone to have told me when I started with Django to go over the basics of programming for the web. It's quite different to programming normal desktop applications. I learned a lot of things the hard way. (Even simple things like HTTP/POST/GET, the difference between desktop patterns and web application patterns, etc.).
It's important to understand what Django is, and what it isn't. It might be a nice idea to try a very stripped down framework (like Flask for example) in tandem, as it will highlight the 'heavy lifting' Django takes care of. Django abstracts a lot of things meaning you don't have to worry about them. While this is great to start with (you don't have to worry about sessions, authentication, etc.) you will eventually find yourself having to come to terms with them.
Furthermore, I probably should have sat down and learned Python before diving in.
Once you have the basics, Django is quite straightforward; the easiest way is to attempt a simple starter project, that is, a blog, CMS or something similar.
I think you should check out The Django book (2.0). This is the perfect second tutorial as it covers much much more in the same fantastic documentation style. It's also green.
There's also this list of tutorials on the djangoproject.com wiki but it's kind of outdated.
Beyond the Django book, I just started building stuff and googled the problems I ran into.

Where is a good place for a code review?

A few colleagues and I created a simple packet capturing application based on libpcap, GTK+ and sqlite as a project for a Networks Engineering course at our university. While it (mostly) works, I am trying to improve my programming skills and would appreciate it if members of the community could look at what we've put together.
Is this a good place to ask for such a review? If not, what are good sites I can throw this question up on? The source code is hosted by Google Code (http://code.google.com/p/nbfm-sniffer) and an executable is available for download (Windows only, though it does compile on Linux and should compile on OS X Leopard as well provided one has gtk+ SDK installed).
Thanks, everyone!
-Carlos Nunez
UPDATE: Thanks for the great feedback, everyone. The code is completely open-source and modifiable (licensed under Apache License 2.0). I was hoping to get more holistic feedback, considering that my postings would still be very lengthy.
As sheepsimulator mentioned, GitHub is good. I would also recommend posting your project on SourceForge.net and/or FreshMeat.net. Both are active developer communities where people often peruse projects like yours. The best thing for your code would be if someone found it useful and decided to extend it. Then, you'd probably end up with plenty of bug fixes and constructive criticism.
You might get some mileage by posting the code out in the public space (through github or some other open-posting forum), putting a link here on SO, and seeing what happens.
You could also make it an open-source project, and see if people find it and use it.
Probably your best bet is to talk to your prof/classmates, find some professional programmers willing to devote their time, and have them review the code. Like American Idol-esque judging, but for your software...
As #Noah states, this is not the site for code review. You may present problems and what you did to overcome those problems, asking if a given solution would be the best.
I found a neat little website that might be what you are looking for: Cplusplus.com

use qt and django to create desktop apps

I had this idea of creating desktop apps using django. The principe being:
- Write the django app, and use something like cherrypy to serve it.
- Write a Qt app in C++ to access it and this by using QtWebview (webkit)
I'd like to "bundle" this in a single app. The lighter, the better :)
So here are my questions and if you have better ideas and suggestions, please
share them :)
Is it possible to serve a django app with a c++ one? (a c++ server embedding python)?
anyone did this before? Do you have some articles, blog posts?
Thanks a lot!
Django has it's own server. Why involve CherryPy?
You're creating a hellaciously complex architecture for no recognizable purpose. Your comments are almost impossible to parse in the context of your question. Please consider rewriting the question to address your actual concerns with an actual thing you actually wrote.
"I ... used pywxiwdgets in the past and it was SLOW"
There are many of desktop frameworks. Use another one.
Don't introduce Django -- it's for web applications, not desktop applications. The overhead of messing with Django and CherryPy is silly.
Find the original reason for SLOW. I'll bet it was database slowness from using SQLite. If not that, I'll bet it was a poor data model. If not that I'll be it was poor use of the pywxwidgets. If not that, I'll bet your desktop app made internet connections that were slow. Indeed, I'd bet that almost any part of your app was the culprit and making a super-complex architecture will not make things faster, just more complex.
Until you identify -- and measure -- the original cause for slowness, you're not actually solving the actual problem you actually had.
Look at http://www.python-camelot.com/
It says "A python GUI framework on top of Sqlalchemy and PyQt, inspired by the Django admin interface."
Pyjamas Desktop can probably be integrated with Django. And there's no need for C++. It currently uses pywebkitgtk, but I don't think there's any real reason why it couldn't use PyQt4 instead with a bit of work.
Use PyQt or PySide instead of C++.
you can use electron-api-demos this opensource
and Now this technology is considered the bright generation, so one of the most famous people who used it is YouTube and Visual Studio Code
https://github.com/electron/electron-api-demos