Re: django-admin.py not found

2011-08-29 Thread Kejun He
the django-admin must in the sys path On Tue, Aug 30, 2011 at 11:19 AM, PremAnand Lakshmanan wrote: > Hi, > I don't find the django-admin.py. > > I get the following error while trying to execute the following command, > > django-admin.py startproject mysite > > SyntaxError:

django-admin.py not found

2011-08-29 Thread PremAnand Lakshmanan
Hi, I don't find the django-admin.py. I get the following error while trying to execute the following command, django-admin.py startproject mysite SyntaxError: invalid syntax -- Prem 408-393-2545 -- You received this message because you are subscribed to the Google Groups "Django users"

Re: SVN 1.4 pre-alpha SVN-16709 and psycopg2

2011-08-29 Thread Russell Keith-Magee
On Tue, Aug 30, 2011 at 7:31 AM, Niko Bonnieure wrote: > in SVN 1.4 pre-alpha SVN-16709 : file /django/db/backends/ > postgresql_psycopg2/base.py line 25 > > what is that? > > import psycopg2.Error > > this line generate an exception. > > If i remove it, everything works

Re: Combining queries? A "join" in Python?

2011-08-29 Thread Tim
worst case you could always just write the sql query? https://docs.djangoproject.com/en/dev/topics/db/sql/ On Aug 29, 8:15 am, graeme wrote: > I looks like my attempt to simplify and abstract the problem just made > it harder to help me: my apologies for that. I was

Re: Problems during webcast (Using django for 40mil+ rows) - sorry!!!

2011-08-29 Thread Raj
Hi Cal, I attended the entire morning session and got a lot from it even without the desktop display. Am looking forward to getting the presentation though. Thanks for sharing your experience! Raj On Aug 29, 2:41 pm, "Cal Leeming [Simplicity Media Ltd]"

SVN 1.4 pre-alpha SVN-16709 and psycopg2

2011-08-29 Thread Niko Bonnieure
in SVN 1.4 pre-alpha SVN-16709 : file /django/db/backends/ postgresql_psycopg2/base.py line 25 what is that? import psycopg2.Error this line generate an exception. If i remove it, everything works just fine. Why is this SVN version not good? -- You received this message because you are

Re: Model rowset split

2011-08-29 Thread Kejun He
You'd better offer more info about your question On Mon, Aug 29, 2011 at 6:26 PM, kooliah < kool...@djeve.sites.djangohosting.ch> wrote: > With > > recset = mydb.all() > len(recset) > 2000 > > I would like to split into x rowset with the same attributes and methods > but 2000/x records. > > I

Re: Model.save() does nothing

2011-08-29 Thread christian.posta
No it shouldn't be dependent on anything like that. Im curious to know what the issue is for you. I know this might be a pain in the butt, but if you could put together a small sample program that demonstrates something like this, I would be more than happy to help you debug through it. On Aug

Re: Problems during webcast (Using django for 40mil+ rows) - sorry!!!

2011-08-29 Thread Brian Bouterse
I really enjoyed what I was able to hear during the morning session. I ended up dropping out because of video problems, so I'm excited to see the recorded video when it is available. Thanks very much for putting this together. Thanks! Brian On Mon, Aug 29, 2011 at 5:41 PM, Cal Leeming

Re: Problems during webcast (Using django for 40mil+ rows) - sorry!!!

2011-08-29 Thread Cal Leeming [Simplicity Media Ltd]
Hey all, Much more successful this time round :) Webcast has been fully recorded, and will be uploaded to youtube in the next week or so. Thank you again to everyone who took the time to take part in this webcast, and if anyone has any feedback/criticisms, please feel free to list it here. Cal

Values for ManyToMany-field set in code not visible in admin

2011-08-29 Thread Thomas Weholt
I got a model with a ManyToMany-field which is set/populated when saved based on other fields. It can be set in the admin as well. When this field is set in code, and I can see the correct values have been set when getting the object from the database, the correct values in the ManyToMany-field in

Re: Problems during webcast (Using django for 40mil+ rows) - sorry!!!

2011-08-29 Thread Cal Leeming [Simplicity Media Ltd]
Webcast about to begin in 2 minutes. On Mon, Aug 29, 2011 at 4:57 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > Hi all, > > I have just been informed after the webcast that many of you were > experiencing issues being able to see the screen. It turns out

Re: Select all users that have undone jobs (select, groupby, count)

2011-08-29 Thread christian.posta
Try something like this: users = User.objects.filter(job__done=False).annotate(Count('job')) Then each object returned will be a 'User' object with a property named 'job__count' ex: users[0].job__count On Aug 29, 5:17 am, muzhig wrote: > Hello! > I have model

Mongo prints traceback directly to stderr?

2011-08-29 Thread Roy Smith
We've got an application which does lots of AJAX calls and sometimes (intentionally) abandons the TCP connection before getting a response. These result in django dumping a stack trace to stderr (see example below). The question is, why does this get written directly to stderr? It happens in

Re: Delete after specific date

2011-08-29 Thread Bill Freeman
You could always write your own cron equivalent functionality into your management command. But why keep an extra process just hanging out until the next delete event? If your on an O/S that has cron, then it's already running. Bill On Mon, Aug 29, 2011 at 1:56 PM, Goran

Re: spam in response to posting to this list

2011-08-29 Thread Jim Louis
Hello, I am having the same issue with my google group. If someone who is a manager of this group can email me. maybe we can see if the same email address is on both our groups causing the problem. My group is completely different focus from This group. j...@bestmeetings.com Thank you, Jim

Re: Delete after specific date

2011-08-29 Thread Shawn Milochik
django-celery is even better -- 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 unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more

Re: Delete after specific date

2011-08-29 Thread Goran
Thanks Bill, seems that cron is the easiest way even if I don't like it. I was looking for more pythonic way. Anyway thanks for reply. Goran On Aug 29, 7:26 pm, Bill Freeman wrote: > Presuming deleted sometime on the day is close enough, write a > management command that

Re: Delete after specific date

2011-08-29 Thread Bill Freeman
Presuming deleted sometime on the day is close enough, write a management command that queries for items beyond their expiration and deletes them. Run this script nightly using cron, or you O/S's equivalent. Bill On Sun, Aug 28, 2011 at 3:09 PM, Goran wrote: > I have model

Re: How to use email as user login name

2011-08-29 Thread quasar
Just saw it, sorry. Thank you. I will go through the code. On Aug 29, 12:24 pm, Alternativshik wrote: > did you seen my answer? Just Read the code of this application. It`s > the answer for all your questions. > > On Aug 29, 7:49 pm, quasar

Re: Django 1.3 logging not working as I'd expect

2011-08-29 Thread Alexey Luchko
Hi, try executing import logging logger = logging.getLogger('testlogger') logger.warn('hello') logger.info('please appear') in ./manage shell. -- Alex -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: How to use email as user login name

2011-08-29 Thread Alternativshik
did you seen my answer? Just Read the code of this application. It`s the answer for all your questions. On Aug 29, 7:49 pm, quasar wrote: > I go through the source code of django, which is Django-1.3/django/ > contrib/auth/model.py. Can I just modify  username =

Re: Media files not served automatically anymore in 1.3?

2011-08-29 Thread Reinout van Rees
On 27-08-11 17:22, Karen Tracey wrote: On Thu, Aug 25, 2011 at 7:21 AM, Reinout van Rees > wrote: Only, with this 1.3 change django's 1.2's automatic serving of the media_url stuff has gone the way of the dodo. Django 1.2 never did

Problems during webcast (Using django for 40mil+ rows) - sorry!!!

2011-08-29 Thread Cal Leeming [Simplicity Media Ltd]
Hi all, I have just been informed after the webcast that many of you were experiencing issues being able to see the screen. It turns out that only a few of you were able to see/hear the webcast. And, for those attending, the slide show software had crashed and corrupted one of the most important

Re: How to use email as user login name

2011-08-29 Thread quasar
I go through the source code of django, which is Django-1.3/django/ contrib/auth/model.py. Can I just modify username = models.CharField to username = models.EmailField, and then change email to CharField by which I can use email as username. Thank you. On Aug 28, 7:46 pm, Shawn Milochik

Re: How to use email as user login name

2011-08-29 Thread quasar
Not very sure about what you mean, because I'm new to Django. I did see a django snippet about this. But it seems only deal with login. How about sign up? Because you said I can not mke username not unique, what I should do is fill email in both username and email field in

Re: Error was: No module named io

2011-08-29 Thread Łukasz Rekucki
On 29 August 2011 15:26, CrabbyPete wrote: > This is what I suspected. Even though Django 1.3 is supposed to > support python 2.5 > Don't want to be rude, but let me repeat: "It's not a problem with Django as 1.3 runs fine on 2.5.X. It's a problem in **your code**". If

Re: Select all users that have undone jobs (select, groupby, count)

2011-08-29 Thread Babatunde Akinyanmi
I think the best way is to create a custom manager for the job (check the documentation for details-managers). In the manager, do a query that gets all the users with undone jobs by using the filter option (also see the documentation - making queries). From the resulting querydict you could count

Re: Error was: No module named io

2011-08-29 Thread CrabbyPete
This is what I suspected. Even though Django 1.3 is supposed to support python 2.5 On Aug 29, 3:53 am, Łukasz Rekucki wrote: > It's not a path problem. It's a python version problem: > > http://docs.python.org/library/io.html > > "New in version 2.6." > > It's not a problem

Re: Django testing with existing data

2011-08-29 Thread Carlos Brum
Thanks, Russ! You're perfectly rigth! I was trying to use TDD in a wrong way. Now I understand I *have* to use a new database. "dumpdata" is what I need. Thanks for your advice. On Aug 23, 8:53 pm, Russell Keith-Magee wrote: > On Tue, Aug 23, 2011 at 9:15 PM, Carlos

Select all users that have undone jobs (select, groupby, count)

2011-08-29 Thread muzhig
Hello! I have model Job, that is linked to User. Job has flag `done` that indicates progress of this job. How to select list of all users, that have undone jobs, annotated by count of this undone jobs? I need this dict: { user1: 4, user2:12 } -- You received this message because you are

Re: Combining queries? A "join" in Python?

2011-08-29 Thread graeme
I looks like my attempt to simplify and abstract the problem just made it harder to help me: my apologies for that. I was trying to combined two different problems rather than ask two questions. Thanks for helping despite that. I think I have a solution for most of my problems, as far as getting

Re: How to use email as user login name

2011-08-29 Thread Alternativshik
Try this https://github.com/Bers/django-simplereg On Aug 28, 11:26 pm, quasar wrote: > Question is how to use email as user login name, and make user name > not unique? What's the best way to do that? -- You received this message because you are subscribed to the Google

ForeignKeyAutocompleteAdmin

2011-08-29 Thread JAIME ANDRES
Hi, i'm starting with django. At this moment i need to make my form's foreign keys searchable, it seems that what works form me is the https://github.com/django-extensions/django-extensions using the ForeignKeyAutocompleteAdmin function. The best simple example i'd found is this:

Model rowset split

2011-08-29 Thread kooliah
With recset = mydb.all() len(recset) 2000 I would like to split into x rowset with the same attributes and methods but 2000/x records. I tried slicing but gave me errors Thanks to all -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Error was: No module named io

2011-08-29 Thread Łukasz Rekucki
It's not a path problem. It's a python version problem: http://docs.python.org/library/io.html "New in version 2.6." It's not a problem with Django as 1.3 runs fine on 2.5.X. It's a problem in your code, so either upgrade to 2.6 or rewrite your code in terms of the older API that io module

Re: search with a optional value

2011-08-29 Thread john
thanks On Aug 25, 1:13 pm, Jani Tiainen wrote: > On 08/16/2011 03:20 PM, john wrote: > > > hi, > > i have a form with few fields as optional,i.e can be left blank, > > i want to search my db for values i receive from this form, how should > > i go on about writing my filters