Getting started with Django: New Udemy Class, free for a limited time

2012-01-28 Thread Shabda Raaj
Here is the link: http://www.udemy.com/getting-started-with-django2/ More info: I am starting a Udemy class called "Getting started with Django". This is supposed to be a fast paced introduction to Django, and is going to be useful to people from beginner to intermediate Django skills. Please jo

Django - filters

2012-01-28 Thread Sandeep kaur
Hello all, In my django application, all the data of different clients are entered. Sometimes data of even same client is also entered. Now what I require is to get all the data of the client when it asked for. The views I used is: ---

Starting a new Python blog

2012-01-28 Thread Kevin
Hello Everyone, For sometime now I have been itching to create a Python blog, and now the fruits of my labor have paid off. I am ready to release the blog to the public eyes. At the moment it has 2 main features, a blog portion, and a bookmark system. Both the blog and the bookmark system off

Django ManyToManyField JSON Fixture

2012-01-28 Thread jondbaker
Hi - I'm working on my first Django project and am trying to set up the fixture data for my blog app using JSON. Everything works correctly until I try to set up 'tags' on a 'post' which is a ManyToManyField. When I run '>>> python manage.py sqlall blog' and check out the proposed SQL, the table 'b

Re: problems running subprocess inside django view

2012-01-28 Thread Brian Schott
As the same user? Are you running with manage.py runserver? Generally it is a bad idea to call subprocess from a web process context. A blocking call you don't expect might time out the client and/or hang your server. Check out Django-celery. Create a tasks.py and have your view call a task.

Django Deploy - Some Questions regarding it

2012-01-28 Thread Felipe Arruda
Hi there everyone, I'm trying to make my first deploy of a project, and encountered some problems. Here is the scenario: I read that to make uploaded files only accessible for the uploader(the user) was a better choice to use nginx(apparently more easy to configure). But after following a couple of

ChoiceField Help

2012-01-28 Thread Squant
Hello, I've created a simple ChoiceField for my app with two items. I need to somehow query which choice was made from the user so I can pass the appropriate context to my template. What would be an example of how I can do such a thing? Thanks! -- You received this message because you are subscri

Re: Help with new version of django

2012-01-28 Thread Aaron Cannon
I suspect he means the latest stable version, in which it really is 1.3.1. To my knowledge 1.4.1 does not yet exist. As for the original question, I would suggest familiarizing yourself with the what's new documents for Django 1.2 and 1.3, and then tuning your code accordingly. Depending on what

Re: problems running subprocess inside django view

2012-01-28 Thread Russell Keith-Magee
On Sat, Jan 28, 2012 at 12:05 AM, Mark Lancaster wrote: > I'm having problems running subprocess inside a django view using: > > result = subprocess.Popen([ , ], > stdout=subprocess.PIPE).communicate()[0] > > exactly the same method works perfectly inside a regular python > script. > > Should I be

Re: Adding first_name and last_name to django registration

2012-01-28 Thread Jonathan Paugh
contrib.auth.models.User has a get_profile() hook that allows you to add extra info to a user account from your own model; however, I don't see support for that in django-registration at first glance. I'm looking at the code from https://bitbucket.org/ubernostrum/django-registration/ On 01/28/201

Tutorial for dev version not working (Polls app): admin

2012-01-28 Thread Alec Taylor
Going through the tutorial using the latest trunk in a virtualenv. I am getting stuck in this section: https://docs.djangoproject.com/en/dev/intro/tutorial02/#s-customize-the-admin-form No matter how I rearrange the fields (even when I remove the "question" field), I cannot notice any difference

Re: Adding first_name and last_name to django registration

2012-01-28 Thread Andres Reyes
The django.contrib.auth User model already contains first_name and last_name fields so you don't need a UserProfile for that. Also the view that handles the registration takes a form_class that parameter that you can pass in the urlconf, you would only need to subclass the RegistrationForm, add yo

Re: Adding first_name and last_name to django registration

2012-01-28 Thread Zach
I have tried to use this tutorial but I didn't have any luck. http://inka-labs.com/en-us/blog/2012/01/13/add-custom-backend-django-registration/ On Jan 28, 9:23 pm, Andres Reyes wrote: > The django.contrib.auth User model already contains first_name and > last_name fields so you don't need a U

Re: Apps vs Project

2012-01-28 Thread Brian Schott
This was hard for me when I started with Django about a year ago and I'm still learning, but I've found that I prefer to break things down into multiple small apps so that the models.py, admin.py, views.py, tests.py, etc. all are fairly small and easy to understand within a single app. The proj

passing context data to inherited templates

2012-01-28 Thread Mike
In a project I'm working on I have a status bar at the top of the webpage that will render data using template tags. The status bar will be displayed on all of my views, so I want to put the html code in my base template. The base template is imported to all of templates using the 'extends' t

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-28 Thread JJ Zolper
Steven, I have set up VirtualBox with Python and Django. Things have gone flawlessly. Only thing I've noticed is it seems to be running a tad bit slow. I feel this way because I had a native installation before and it ran quite well. Before I go too far into writing code I was hoping to "perfe

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-28 Thread JJ Zolper
Jonathan, I have set up VirtualBox with Python and Django. Things have gone flawlessly. Only thing I've noticed is it seems to be running a tad bit slow. I feel this way because I had a native installation before and it ran quite well. Before I go too far into writing code I was hoping to "per

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-28 Thread JJ Zolper
Sam, I have set up VirtualBox with Python and Django. Things have gone flawlessly. Only thing I've noticed is it seems to be running a tad bit slow. I feel this way because I had a native installation before and it ran quite well. Before I go too far into writing code I was hoping to "perfect"

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-28 Thread JJ Zolper
lawgon, I have set up VirtualBox with Python and Django. Things have gone flawlessly. Only thing I've noticed is it seems to be running a tad bit slow. I feel this way because I had a native installation before and it ran quite well. Before I go too far into writing code I was hoping to "perfe

Adding Highlights for a product

2012-01-28 Thread Swaroop Shankar V
Hi, Am trying to create a shopping cart using satchmo project. While creating a product, for certain types of products I want to add few highlights of a product similar to the one seen in this link http://www.flipkart.com/cameras/canon/itmczcrzgj3cysyx?pid=camcxq6nupdbxw56 As you could see the hi

Displaying template location in html

2012-01-28 Thread Alec Taylor
With 40+ HTML files it's easy to get confused as to where each component comes from. I don't want to annotate each file with its relative path manually, as this will prove cumbersome when the site finally goes production. Is there a trick to displaying the template location on-screen? Thanks for

Re: what is the best IDE to use for Python / Django

2012-01-28 Thread hari jayaram
I like using Pycharm . The 2.0.1 version has pretty good integration with bitbucket , github and other VCS/DVCS I also use emacs and have heard good things about sublime2 Hari On Mon, Jan 23, 2012 at 7:41 AM, Leandro Ostera Villalva wrote: > That's because PyCharm is an actual IDE while gedit

Re: Handling multiple parameters on URI via GET

2012-01-28 Thread Jonathan Paugh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Is the request.GET.get() method working properly? Does the test on query work? I suspect one of these places doesn't work as expected. I'd do similar to the following in my code. (It works on Django 1.3.1 for request.POST, anyway.) if 'page' in reque

Re: How do you pass dissimilar data from view to template?

2012-01-28 Thread Jonathan Paugh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I think jQuery supports this sort of thing, (as I'm sure other Javascript libs do). Then again, learning Javascript + jQuery together seems at least as hard as learning Python + Django. On 01/27/2012 11:31 AM, BillB1951 wrote: > Thanks for the additio

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-28 Thread Jonathan Paugh
Developing on a Linux-based OS will give you indispensable understanding of your production environment. On the other hand, it will probably be very unfamiliar if you haven't worked on Linux before, and easy tasks will become very difficult again, for a while. You should ultimately develop your app

Re: User-specific sites

2012-01-28 Thread Mario Gudelj
It's all in queries. You assign the user to all your tables as a foreign key and make sure that all your quiries have user in them as a filter. You can also extend the user and assign a slug to it so that you have unique urls for all users. You can generate a slug from the username upon user creati

djangosnippets.org domain has expired

2012-01-28 Thread Sam Lai
Heads-up to whoever is in charge of this domain - it has expired and is now redirecting to a GoDaddy domain parking page. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsu

Re: Help with new version of django

2012-01-28 Thread kenneth gonsalves
On Wed, 2012-01-25 at 17:25 -0800, itua ijagbone wrote: > Hello, please i need help as to how to update my project to the > lastest version of django 1.3.1. i have been using 1.1.1 to develop > the project. Please how do i go about it, making my project conform to > 1.3.1 latest is 1.4.1 -- rega

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-28 Thread kenneth gonsalves
On Fri, 2012-01-27 at 12:18 -0800, JJ Zolper wrote: > Since I will be deploying my Python code on a server that is based on > Linux wouldn't it be smart that I develop my Python code on something > similar to my VM for Django? yes -- regards Kenneth Gonsalves -- You received this message becaus

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-28 Thread kenneth gonsalves
On Fri, 2012-01-27 at 12:24 -0800, JJ Zolper wrote: > That's really all I am trying to understand. From A to B. A being > where I am able to develop once I finally am able to make that > decision and B how smart I picked A so that the move from my local > computer to my server is smooth and simple.

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-28 Thread kenneth gonsalves
On Fri, 2012-01-27 at 12:25 -0800, JJ Zolper wrote: > Thanks a lot I was thinking I would learn the Google Maps API. Have > you worked with OSM? > > Do you have any input if you have used OSM and if you have used Google > Maps what your comments are? google maps are proprietary. OSM in open sou

Re: Django vs. Ruby on Rails

2012-01-28 Thread Greg Donald
On Thu, Jan 19, 2012 at 9:59 AM, Brian D wrote: > I'm wondering about diving into Ruby on Rails to qualify for a > position, or spending my time instead going deeper into a full bells > and whistles prototype Django site and betting on jobs opening up in > my field. This is really a GIS career pro

Re: Parsing HTML

2012-01-28 Thread jondbaker
Chapter 8 of Dive Into Python demonstrates what you're describing using sgmllib. http://www.diveintopython.net/ On Jan 27, 3:31 pm, Dennis Lee Bieber wrote: > On Fri, 27 Jan 2012 13:35:42 +0700, ddtopgun wrote: > >i'am new to django and i want to try get the content of HTML. > >can help me how t

Re: Django vs. Ruby on Rails

2012-01-28 Thread sigep311
> 3) Using one or the other for Geographic Information Systems work; I work at NASA/JPL and have been using Python for 1 year, and have been working in GIS for 3 years. GIS is built around 2 core languages, Java for back-end servers and largely due to the amazing GDAL library. The other dominate

Re: problems running subprocess inside django view

2012-01-28 Thread Eugene Gavrish
You are not alone with this problem. But I haven't got any decision. Maybe its django-specific with Popen?? I divided my task in two part: first cron-driven disk file generation. Second - from django-view this file parsing. It satisfied my goals, but question with Popen is still opened... On 27

Re: Parsing HTML

2012-01-28 Thread Masklinn
On 2012-01-27, at 23:40 , jondbaker wrote: > Chapter 8 of Dive Into Python demonstrates what you're describing > using sgmllib. > http://www.diveintopython.net/ None of these libraries is very good at parsing "real-world" (broken) HTML though, for that you'd better go with html5lib, lxml.html or

Re: Parsing HTML

2012-01-28 Thread jondbaker
Thanks, that's good to know. I'm just a few months into using Python (and weeks with Django), hence the familiarity with that one book and not real-world application just yet. On Jan 28, 9:45 am, Masklinn wrote: > On 2012-01-27, at 23:40 , jondbaker wrote: > > > Chapter 8 of Dive Into Python demo

Adding first_name and last_name to django registration

2012-01-28 Thread Zach
I am new to Django and have implemented the django-registration app on my website. I want users to input their first name and last name on the registration page. However, the default setting only ask users for their email address/username/password . Is there an easy way to address this? -- You re

Hierarchical Django Ajax Forms

2012-01-28 Thread D X
I needed to build a form where the user can input a geographical location, with fields for country, state, city, neighborhood. I wanted the form to use AJAX, so that the only valid fields would appear as the user selected fields higher in the hierarchy. It sounded like a task that should be easy