Re: Query Distance from User

2012-07-14 Thread Kurtis Mullins
Why not just have them enter their location? I'd comment more but I work for a commercial site that looks like it might be treading in the same area so I don't wanna get myself in trouble here :) On Sun, Jul 15, 2012 at 12:58 AM, JJ Zolper wrote: > So heres my goal: > >

Query Distance from User

2012-07-14 Thread JJ Zolper
So heres my goal: The user logins in and goes to a discover page. They enter a distance from their location as the requested results scope. Lets say 25 miles from where I live for example. Additionally they could pick like a genre or music but not as important. So they hit seach and see in a

Query Distances from User

2012-07-14 Thread JJ Zolper
So heres my goal: The user logins in and goes to a discover page. They enter a distance from their location as the requested results scope. Lets say 25 miles from where I live for example. Additionally they could pick like a genre or music but not as important. So they hit seach and see in a

Re: Installing psycopg2 for PostGreSQL as django backend using virtualenv

2012-07-14 Thread Doug S
Ramario, thanks, that was the problem it works like I expected now I'm just getting going with django and virtual env's and really Ubuntu and my thinking was that using sudo would iron out any permission problems if they came up, didn't know that it would change the version of python it was using

Re: Installing psycopg2 for PostGreSQL as django backend using virtualenv

2012-07-14 Thread Doug S
hmmm, OK I didn't know that. I'll try it . . . but I thought I already tried it and got a permission denied error On Saturday, July 14, 2012 10:17:18 PM UTC-4, Ramiro Morales wrote: > > On Sat, Jul 14, 2012 at 10:56 PM, Doug S wrote: > > Hello django people, > > I'm

Re: Hello Django Warriors!

2012-07-14 Thread Kurtis Mullins
On Sat, Jul 14, 2012 at 4:44 PM, Kakar > I'm very new to this Phyton and i just downloaded django package. What i > wanted to ask was,..can i make a social site where the users itself can > customize their themes or the layout??? > M a vey newbie in programming

Re: Installing psycopg2 for PostGreSQL as django backend using virtualenv

2012-07-14 Thread Ramiro Morales
On Sat, Jul 14, 2012 at 10:56 PM, Doug S wrote: > Hello django people, > I'm just installing my PostgreSQL backend for my django projects that I > install in isolated virtualenv's > I've followed what seem like easy installation instructions here: >

Re: Installing psycopg2 for PostGreSQL as django backend using virtualenv

2012-07-14 Thread Doug S
OK so I uninstalled the global psycopg2 egg and then reinstalled under my virtualenv It failed to install in my virtualenv but reinstalled in my global python install So, hopefully this is how its supposed to work, but the question is why can't my django installation under my virtualenv import

Installing psycopg2 for PostGreSQL as django backend using virtualenv

2012-07-14 Thread Doug S
Hello django people, I'm just installing my PostgreSQL backend for my django projects that I install in isolated virtualenv's I've followed what seem like easy installation instructions here: http://initd.org/psycopg/install/ I have installed python-dev, libpq-dev and also

access the state of a Model object prior to it's modification ?

2012-07-14 Thread Nicolas Emiliani
Hi, Is there a way to access the state of a Model object prior to it's modification through a form ? Kind of a nasty question :S, let me explain. The thing is that if i use the save_model hook and the user modifies the model through the form, the obj parameter that I receive has already all the

Re: Problem with named urls

2012-07-14 Thread Russell Keith-Magee
On Sun, Jul 15, 2012 at 6:09 AM, Per-Olof Åstrand wrote: > > I have a small hobby project that I have worked on from time to time over the > years. I started to convert my views to class-based views, and realized that > I needed to start to use named urls too. > > For an

Problem with named urls

2012-07-14 Thread Per-Olof Åstrand
I have a small hobby project that I have worked on from time to time over the years. I started to convert my views to class-based views, and realized that I needed to start to use named urls too. For an url from an url.py like url(r'^persons/modified/$',

Re: Hello!

2012-07-14 Thread Thomas Lockhart
On 7/14/12 12:04 PM, Shubz wrote: Hi! I'm new to Python and Django. I feel like I'm jumping in deep end, but I have previous PHP and Java knowledge so what the hey. I was wondering if anybody could be kind enough to point me in the right direction to a broken down tut on installation for Mac?

Re: Catch or raise exception designissue

2012-07-14 Thread Melvyn Sopacua
[reformatted] On 11-7-2012 20:41, Jani Tiainen wrote: > On Wed, Jul 11, 2012 at 4:47 PM, Andre Schemschat wrote: >> In my view i have, naturally, some code to process the request and return >> a response. This code needs a get-parameter to operate within boundaries >> and this

Re: Page not found (404)

2012-07-14 Thread Melvyn Sopacua
On 11-7-2012 12:19, Dott. Tegagni Alessandro wrote: > immagine_5 = models.ImageField (upload_to = > "/home/alessandro/Scrivania/progetto/media/photos/custodia/", ... > MEDIA_URL ='http://127.0.0.1:8000/' This is wrong. The url for this file generated by django will now be:

Hello Django Warriors!

2012-07-14 Thread Kakar
I'm very new to this Phyton and i just downloaded django package. What i wanted to ask was,..can i make a social site where the users itself can customize their themes or the layout??? M a vey newbie in programming so please explain me in detail. Thank you. -- You received this message because

Hello!

2012-07-14 Thread Shubz
Hi! I'm new to Python and Django. I feel like I'm jumping in deep end, but I have previous PHP and Java knowledge so what the hey. I was wondering if anybody could be kind enough to point me in the right direction to a broken down tut on installation for Mac? Thanks! -- You received this

Is upgrading to a newer Django version generally hassle-free?

2012-07-14 Thread Daniel Roseman
Django makes a fairly strong commitment to backwards compatibility across versions, which is documented here: https://docs.djangoproject.com/en/1.4/misc/api-stability/ They guarantee that any documented api will only be deprecated with two versions warning: for example, the old function-based

Re: ajax loading html

2012-07-14 Thread Tomas Neme
On Sat, Jul 14, 2012 at 2:11 PM, ledzgio wrote: > If I use the TemplateViews method, should I have to set anything on the > views.py? and how can I point that file from template? the TemplateView is a view, it's already been written for you, so you can use it without

Re: Is upgrading to a newer Django version generally hassle-free?

2012-07-14 Thread sadpluto
> > Thanks for your comment, Carlos. I guess focusing too much on a > future-proof setup is probably pointless. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

Re: ajax loading html

2012-07-14 Thread ledzgio
If I use the TemplateViews method, should I have to set anything on the views.py? and how can I point that file from template? thanks Il giorno sabato 14 luglio 2012 18:34:15 UTC+2, Tomas Neme ha scritto: > > an "html page" can't be located within the templates directory, an > HTML file might,

Django/Apache/FastCGI

2012-07-14 Thread Newt
I've spent a few days trying to get this to work on an Apache2 install. I have this in my httpd.conf file: Alias /django /stuff/django/proj1/proj1 Options +execCGI AllowOverride FileInfo Order allow,deny Allow from all This is the .htacess file: AddHandler

FastCGI Problems

2012-07-14 Thread Newt
(Sorry if this is a repost - it isn't showing up in the groups for me) I've tried to set up Django to use a sub-directory on my local PC - I'm using Apache2.0. This is the relevant part from httpd.conf: Alias /django /stuff/django/proj1/proj1 Options +execCGI AllowOverride

Re: 'NoneType' object has no attribute 'datetime' bug?

2012-07-14 Thread Ernesto Guevara
Try this: from datetime import datetime, time, date current_date = datetime.now() today = datetime.combine(date.today(), time(19,30)) Look: >>> from datetime import datetime, time, date >>> print datetime.now() 2012-07-14 14:14:17.897023 >>> print datetime.combine(date.today(),time(19,30))

Re: ajax loading html

2012-07-14 Thread ledzgio
Thanks for your response. What I want to do is to make use of this qtip2 feauture http://craigsworks.com/projects/qtip2/demos/#ajax where I pass a certain HTML file to render into the tip. I would prefere to manage it through django because I can have models data into the HTML file to render

Re: ajax loading html

2012-07-14 Thread Tomas Neme
an "html page" can't be located within the templates directory, an HTML file might, but what is it you want to do, exactly? you want to render a static file? does it make sense going through django for this? URLs point to views, not templates, the views are which decide what templates to use (the

Re: ajax loading html

2012-07-14 Thread ledzgio
It is for showing an HTML page with qtips2 as ajax tip. Are there any other solutions for this? Il giorno venerdì 13 luglio 2012 16:40:48 UTC+2, Daniel Svonava ha scritto: > > Hi, > > If this is just a one-off thing, the simplest way might be just symlinking > that html file to a folder where

Re: Prioritise 0.1 released

2012-07-14 Thread Jon Black
Thanks for the kind words. I skipped unit tests to make learning django simpler. I fully intend to add unit tests in future updates. Thanks for the reminder, though :) On 07/14/2012 05:31 PM, George Silva wrote: > HI Jon, > > Congratulations of your first public Django project. It seems very >

Re: Prioritise 0.1 released

2012-07-14 Thread George Silva
HI Jon, Congratulations of your first public Django project. It seems very useful. Nice coding style, good follow of the guidelines, etc :D. THe only thing missing that I've found are unit tests, since they might demonstrate to the public how much your product is reliable and incentivate usage.

Re: Tasking? A fluid user experience with Uploading Media.

2012-07-14 Thread Tomas Neme
Well, first of all, you're gonna have to set up quite a big amount of parallel connections for this to work, > A new user could be uploading media/music files or something at the same > time as uploading a video of themselves. I want it to be efficient and fast > to the point where it all gets

Re: m2m through problem: object has no attribute 'ce_set'

2012-07-14 Thread Daniel Roseman
On Friday, 13 July 2012 13:26:53 UTC-7, bn wrote: > > I'm trying to get a template to iterate through and print intermediate > model data. Can you look at this and point out what is wrong? I've tried > to follow the django docs closely: > > def category_detail(request, pk): > category=

'NoneType' object has no attribute 'datetime' bug?

2012-07-14 Thread dobrysmak
Hi guys, i have run into this. Traceback: File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response 111. response = callback(request, *callback_args, **callback_kwargs) File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/decorators.py" in

clean up media file

2012-07-14 Thread -RAX-
Hi all, I am opensourcing a tool for cleaning all the media upload files. It is basically browsing your DB and deleting all the media files which are not linked by the DB. We implemented this tool since django 1.3 in which FileFIeld files are no longer deleted when the model is deleted. You

Re: Extend user model: class inheritance or OneToOneField?

2012-07-14 Thread Melvyn Sopacua
On 14-7-2012 0:18, sdonk wrote: > I'm starting a new project and for the first time I need to extend the User > model. Important question: Why? > I read the documentation and I googled a lot to try to figure out what is > the best approach but I got confused. > > What's the the best

Prioritise 0.1 released

2012-07-14 Thread Jon Black
I'm pleased to announce the very first release of my django-powered task manager called prioritise, released under the BSD license. This is my first ever django project, which I started learning two months ago. So whilst I encourage your comments, please be nice. :) I've written a blog post with

Re: Pls help me to solve this error.

2012-07-14 Thread mickey
On Friday, July 13, 2012 6:03:09 PM UTC+5:30, skhohlov wrote: > > paste your url.py and model.py > > 2012/7/13 mickey : > > I had uploaded image of error. > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "Django users"

Re: django.db.utils.DatabaseError: value too long for type character varying(50)

2012-07-14 Thread James Rivett-Carnac
Some more information: I am getting this from the insertion of auth_permissions, in django/db/backends/postgresql_psycopg2/base.py, line 52 'INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s), (%s, %s, %s), (%s, %s, %s), (%s, %s, %s), (%s, %s, %s), (%s,

Re: django.db.utils.DatabaseError: value too long for type character varying(50)

2012-07-14 Thread James Rivett-Carnac
An old post, but I just had the same problem. On Monday, 20 September 2010 22:51:30 UTC+8, Valentin Golev wrote: > > Hello, > > I'm trying to deploy my Django application with PostgreSQL. While > trying to insert an object to the database, I'm getting the following > error: > > >