Re: error attempting to populate field

2012-01-03 Thread Thorsten Sanders
Because its a foreign field either get an instance of Listings with that id like: listening = Listings.objects.get(id=15) CanoeKayak.listings = listening or to add directly a value: CanoeKayak.listings_id = 15 Am 04.01.2012 04:46, schrieb BillB1951: I am trying to add the interger value 1

Re: Issues with "startproject"

2012-01-03 Thread Jisson Varghese
Script name may differ in distribution packages If you installed Django using a Linux distribution's package manager (e.g. apt-get or yum) django-admin.py may have been renamed to django-admin. You may continue through this documentation by omitting .py from each command. Refer: https://docs.djan

Re: Issues with "startproject"

2012-01-03 Thread Jirka Vejrazka
> I was able to get the django-admin.py file to be located and I no > longer had an error with startproject not executing but there was a > random issue with the name of my file. At this point I have no idea > what the problem is. > > http://madtrak.com/error.png Hi there, you are missing the d

Limiting choices for ModelForm's ForeignKey/ManyToMany

2012-01-03 Thread Kevin
Hello, I have many models which have a foreign key to a main model. Eg: class MainModel: .. .. class VariousModels: main = ForeignKey(MainModel) .. .. Now, these VariousModels sometimes have links to each other in the form of ForeignKey or ManyToMany. I need to limit these ForeignK

Re: How to format string on I18n

2012-01-03 Thread 李 强
Lack of a full stop,maybe. 在 2011-12-5,下午2:07, Tsung-Hsien 写道: > Hello >I get the wrong message when type a string which needed to format > such as > > msgid "An inviatation was sent to %(email)s." > msgstr "邀請已送到%(email)s" > > ---

Re: How to get current session user in models.py?

2012-01-03 Thread Andy McKay
On Mon, Jan 2, 2012 at 12:25 PM, Waldek Herka wrote: > c) local threading way posted by you is not as straight > forward as it looks - I'd say it's very similar in complexity to > mine.. you still need to explicitly call 'activate' somewhere(view > method) Middleware can do that just fine. --

error attempting to populate field

2012-01-03 Thread BillB1951
I am trying to add the interger value 15 to a table field CanoeKayak.listings, which is a Foreignkey field that is related to the "Listings.id" field in another table --- a listings.id=15 exists. What is happening? see error below: ValueError at /bsmain/canoekayak/add/15/ Cannot assign "[15]":"

Re: django/Data Base Advice

2012-01-03 Thread Chris Kavanagh
On Jan 3, 5:58 pm, Python_Junkie wrote: > Don't want to confuse you on the database topic, but thought I would > add my 2 cents. > > You asked how to go about learning how to design / utilize the > database within the context of django. > > I just wanted to point out that the django tutorial wil

Re: django/Data Base Advice

2012-01-03 Thread Chris Kavanagh
On Jan 3, 4:09 am, wC wrote: > Chris, > > I think was somehow in the same stage not so long ago... Here is how I went > about it: > > 1. I watched a db-class video from time to time (teaches you what joins are > etcetera). Using the ORM without db knowledge is ok if efficiency is not > your main

Re: django/Data Base Advice

2012-01-03 Thread Chris Kavanagh
On Jan 2, 8:49 pm, Victor Hooi wrote: > Hi, > > Do you mean learning more about Django in general, or about the > models.py/database portion specifically? > > If you haven't done much web-development before, or used any MVC > frameworks, I suggest you start by reading up on those - there's plent

Re: django/Data Base Advice

2012-01-03 Thread Chris Kavanagh
On Jan 2, 7:38 pm, Mike Dewhirst wrote: > On 3/01/2012 10:59am, Chris Kavanagh wrote: > > > > > > > > > > > > > On Jan 2, 6:57 pm, Chris Kavanagh  wrote: > >> I'm new to django&  programming in general. I know the basics of > >> Python. Anyways, going through the djangoproject tutorial, I came t

Re: Error: No module named debug_toolbar

2012-01-03 Thread Alec Taylor
Thanks Denis, but unfortunately that didn't work. On Tue, Jan 3, 2012 at 11:31 PM, Denis Darii wrote: > Try to force the installation inside your env: > > (Pinax-env) P:\Projects\Pinax>pip install --ignore-installed > django-debug_toolbar > (Pinax-env) P:\Projects\Pinax>pip install --ignore-inst

Issues with "startproject"

2012-01-03 Thread JJ Zolper
Hello, I was able to get the django-admin.py file to be located and I no longer had an error with startproject not executing but there was a random issue with the name of my file. At this point I have no idea what the problem is. http://madtrak.com/error.png Thanks for taking a look, JJ Zolper

Re: django/Data Base Advice

2012-01-03 Thread Python_Junkie
Don't want to confuse you on the database topic, but thought I would add my 2 cents. You asked how to go about learning how to design / utilize the database within the context of django. I just wanted to point out that the django tutorial will point you down the road of implementing a database a

logging sql queries during unit test

2012-01-03 Thread Brian Craft
Is overwriting settings.DEBUG the recommended way to get connections[db].queries to work during a unit test? -- 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

Re: Using STATIC_URL in CSS/JS files?

2012-01-03 Thread Christophe Pettus
On Jan 3, 2012, at 11:18 AM, Bill Freeman wrote: > This will be even morepainful if you use Django templates as the > templating engine, since you will have to quote all those braces that you need > in CSS and Javascript. I don't believe this is correct; Django's templating engine doesn't choke

Re: raw query placeholder "%(key)s" supported in django?

2012-01-03 Thread Bill Freeman
I have used this in a raw query. But it depends on the DB backend of Django. If I'm remembering correctly, it worked with PostgreSQL/psycopg2, but not with SQLite/whatever_back_end when I was using it. Bill On Sun, Dec 25, 2011 at 3:58 AM, ali alizadeh wrote: > hi. > > in psycopg module, when c

Re: Using STATIC_URL in CSS/JS files?

2012-01-03 Thread Bill Freeman
You can do this in a bad way or a worse way: The worse way is to serve your static files as views, complete with template rendering. This will be even morepainful if you use Django templates as the templating engine, since you will have to quote all those braces that you need in CSS and Javascrip

Re: How to get spanning relationships queryset right?

2012-01-03 Thread Javier Guerra Giraldez
On Tue, Jan 3, 2012 at 2:02 PM, Javier Guerra Giraldez wrote: > On Tue, Jan 3, 2012 at 11:54 AM, Carsten Fuchs wrote: >> How can I find only those blogs where *all* entries were (co-)authored by >> 123? > > Blog.objects.exclude(entry__authors__ne=123) oops there's no __ne! try: Blog.objec

Re: How to get spanning relationships queryset right?

2012-01-03 Thread Javier Guerra Giraldez
On Tue, Jan 3, 2012 at 11:54 AM, Carsten Fuchs wrote: > How can I find only those blogs where *all* entries were (co-)authored by > 123? Blog.objects.exclude(entry__authors__ne=123) -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. T

Re: Thread synchronization

2012-01-03 Thread Pawel Rzeczewski
It won't work in forked processes. > Tried Google. > http://effbot.org/zone/thread-synchronization.htm -- 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

Re: Thread synchronization

2012-01-03 Thread Sławomir Zborowski
Tried Google. http://effbot.org/zone/thread-synchronization.htm Found in secs. Best Regards 2012/1/3 Etam : > How do you synchronize threads in forked processes? > > Thanks, > Etam. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To vi

Re: New Relic with Django

2012-01-03 Thread eculver
To answer your question and to address the cost concern, I gave New Relic a shot because their monitoring service it totally free and it gives you pretty awesome metrics on all kinds of app and DB level metrics like memory consumption and response times among many others. To get started, create a

Re: Thread synchronization

2012-01-03 Thread Andre Terra
Take a look at Chords[1] in Celery[2]. Cheers, AT [1] http://ask.github.com/celery/userguide/tasksets.html?highlight=chords#chords [2] http://ask.github.com/celery/ On Tue, Jan 3, 2012 at 3:42 PM, Etam wrote: > How do you synchronize threads in forked processes? > > Thanks, > Etam. > > -- > Y

Re: Wiki Docs

2012-01-03 Thread Masklinn
On 2012-01-03, at 18:43 , Sepero wrote: > > I'd like to put forward the idea of making all the docs wiki editable > users (hopefully remembering to include a one to one discussion page). > This way, we wouldn't have to message the group or anyone. We could > make submissions and correct text with

Wiki Docs

2012-01-03 Thread Sepero
I made this post to the group a few days ago because of what appears to be problems with the API documentation- http://groups.google.com/group/django-users/browse_thread/thread/f38ec22591f3/8f9acf7bc2872800#8f9acf7bc2872800 I have also found documentation typos(not many), and places where thin

Thread synchronization

2012-01-03 Thread Etam
How do you synchronize threads in forked processes? Thanks, Etam. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/CmmZ4EO_dCYJ. To post to this group, send

Re: Field Inheritance

2012-01-03 Thread Sepero
It would also be nice to have the definition for the base Field class listed on the Models reference page class Field(verbose_name="", null=False, etc...) Other classes like DateTimeField have their definition listed, so it would seem to make sense. class DateTimeField([auto_now=False, auto_no

How to get spanning relationships queryset right?

2012-01-03 Thread Carsten Fuchs
Hi all, reading , with the queryset Blog.objects.filter(entry__authors=123) I can find all blogs that have at least one entry that has the author with id 123 in its author set. However, in th

Re: New Relic with Django

2012-01-03 Thread Cal Leeming [Simplicity Media Ltd]
Argh - sorry again for the email signature on my last response, damn Google Mail is driving me a bit nuts and keeps reverting my settings, grr! Cal On Tue, Jan 3, 2012 at 2:12 PM, Andre Terra wrote: > newrelic.com > > > On Tue, Jan 3, 2012 at 12:09 PM, william ratcliff < > william.ratcl...@gmai

Re: Cheap Django hosting?

2012-01-03 Thread Timothy Makobu
Hi, If you must have root (mybe Twisted is one of your dependancies? or you need all 65535 ports?) Amazon EC2 is a prudent choice. For example, I pay 1 to 2 USD/m, and sometimes cents on my micro instance. They charge me for only what I use, and their free quotas are generous. On Tue, Jan 3, 201

Re: Field Inheritance

2012-01-03 Thread Michael Elkins
On Mon, Jan 02, 2012 at 12:54:38PM -0800, Sepero wrote: I would like to suggest listing/displaying the Parent Class for classes on API pages like this- https://docs.djangoproject.com/en/1.3/ref/models/fields/ In part1 of the Django tutorial, it instructs to create a model like this- pub_date = m

Re: Cheap Django hosting?

2012-01-03 Thread Sid
@alec If you want to go with a VPS, try http://www.lowendbox.com/ Plenty of cheap throwaway machines, i find webfaction, new PAAS like gondor, ep.io to be too restrictive. Nothing beats root access, and cheaply too! -Sid http://www.sidmitra.com -- You received this message because you are su

Re: New Relic with Django

2012-01-03 Thread Andre Terra
newrelic.com On Tue, Jan 3, 2012 at 12:09 PM, william ratcliff < william.ratcl...@gmail.com> wrote: > Could someone provide a link, or a brief description of "New Relic" > > Thanks! > > > On Tue, Jan 3, 2012 at 9:00 AM, Cal Leeming [Simplicity Media Ltd] < > cal.leem...@simplicitymedialtd.co.uk>

Re: code revision short job

2012-01-03 Thread Sid
Have you tried running Django-debug-toolbar to see how SQL queries are being piled up. -Sid http://www.sidmitra.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/djan

Re: New Relic with Django

2012-01-03 Thread william ratcliff
Could someone provide a link, or a brief description of "New Relic" Thanks! On Tue, Jan 3, 2012 at 9:00 AM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > Yeah, the pricing is very steep - and is really only suited for production > systems which are bringing

Re: raw query placeholder "%(key)s" supported in django?

2012-01-03 Thread Andre Terra
If you're talking about string formatting operations, Django is just Python, so %(key)s will work. Cheers, AT On Wed, Dec 28, 2011 at 9:01 AM, ali alizadeh wrote: > > hi. > > in psycopg module, when composing a query, you can use "%(key)s" in your > query instead of "%s", and pass a dictionary

Re: New Relic with Django

2012-01-03 Thread Cal Leeming [Simplicity Media Ltd]
Yeah, the pricing is very steep - and is really only suited for production systems which are bringing in a decent amount of revenue. It's a shame no one has brought out an open source version of New Relic - if I had the time/funding, I totally would! Cal On Tue, Jan 3, 2012 at 1:33 PM, Brian Bou

Re: New Relic with Django

2012-01-03 Thread Brian Bouterse
Make sure you look at the pricing. A local startup was very pleased with what new relic's capabilities with Django, but then they looked at the price ... wow. On Tue, Jan 3, 2012 at 4:39 AM, Abhaya Thapa wrote: > Hi, > I am trying to get stated with new relic on my django app. I am new to > new

Re: Introducing: pythonpackages.com

2012-01-03 Thread Alex Clark
On 1/3/12 7:05 AM, Timothy Makobu wrote: Nice. Any chance of a "Login with Google" button? Yes! I'm going to work on openid logins next and I think Google falls into that category. Alex On Tue, Jan 3, 2012 at 11:45 AM, Thomas Weholt mailto:thomas.weh...@gmail.com>> wrote: Looks n

Re: Introducing: pythonpackages.com

2012-01-03 Thread Alex Clark
On 1/3/12 3:45 AM, Thomas Weholt wrote: Looks nice, allthough one thing that annoys me quite a bit is how github suddenly becomes the de facto way of logging in everywhere, like djangopackages.com as well. My old login doesn't work there anymore. I use bitbucket, and have no plans or need to swit

New Relic with Django

2012-01-03 Thread Abhaya Thapa
Hi, I am trying to get stated with new relic on my django app. I am new to new relic. Can you please guide me on steps to get started in developer mode and how to use it in live server. I did try to find tutorials on this, but it looks like I could not find a good one. -- You received this messag

Re: django/Data Base Advice

2012-01-03 Thread wC
Chris, I think was somehow in the same stage not so long ago... Here is how I went about it: 1. I watched a db-class video from time to time (teaches you what joins are etcetera). Using the ORM without db knowledge is ok if efficiency is not your main concern. Sooner or later you have to make

Re: Error: No module named debug_toolbar

2012-01-03 Thread Denis Darii
Try to force the installation inside your env: (Pinax-env) P:\Projects\Pinax>pip install* --ignore-installed * django-debug_toolbar On Tue, Jan 3, 2012 at 12:31 PM, Alec Taylor wrote: > Unfortunately I keep getting this error, no mater what I do. > > Here's what I've attempted: http://pastebin.

Re: Introducing: pythonpackages.com

2012-01-03 Thread Timothy Makobu
Nice. Any chance of a "Login with Google" button? On Tue, Jan 3, 2012 at 11:45 AM, Thomas Weholt wrote: > Looks nice, allthough one thing that annoys me quite a bit is how > github suddenly becomes the de facto way of logging in everywhere, > like djangopackages.com as well. My old login doesn't

Error: No module named debug_toolbar

2012-01-03 Thread Alec Taylor
Unfortunately I keep getting this error, no mater what I do. Here's what I've attempted: http://pastebin.com/jcrSSYvd How do I solve this error? Thanks for all suggestions, Alec Taylor -- You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: Get database server version

2012-01-03 Thread Thomas Guettler
On 03.01.2012 11:22, Thomas Guettler wrote: Hi, while testing my application with 1.4 alpha, I see that connection._version no longer exists. How can I get the database server's version? Up to now I only use postgres, but a portable way would be better. Thomas May postgres only solutio

Get database server version

2012-01-03 Thread Thomas Guettler
Hi, while testing my application with 1.4 alpha, I see that connection._version no longer exists. How can I get the database server's version? Up to now I only use postgres, but a portable way would be better. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) t

Re: Constraints on a one-to-many relationship and related problems

2012-01-03 Thread Andre Terra
First of all, welcome to Django! While many like to use the admin as a public facing CRUD app, that is not what it is designed for. In any case, writing your own forms is *a requirement* in pretty much every Django project, simply because no automatic form creation like the admin could possibly an

Re: code revision short job

2012-01-03 Thread pixelfields
Problem is that an app is very slow on ab benchmark, approximately 14-16 requests per second (with caching on). We need full code revision and based on this revision code possible optimization and setup on production server. If you need more information, please send me your requirements. Dusan Si

Re: code revision short job

2012-01-03 Thread Satyajit Sarangi
Little more details. On Tue, Jan 3, 2012 at 2:43 PM, pixelfields wrote: > Hi, > I'm loooking for anybody who can review application code in easy app > based on django 1.3 and postgres. > > Thanks > > Dusan Simek > > -- > You received this message because you are subscribed to the Google Groups >

code revision short job

2012-01-03 Thread pixelfields
Hi, I'm loooking for anybody who can review application code in easy app based on django 1.3 and postgres. Thanks Dusan Simek -- 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. T

Re: Using STATIC_URL in CSS/JS files?

2012-01-03 Thread francescortiz
Appart of using relative paths when I want to use STATIC_URL in javascript I define a global javascript variable in my base.html template, so it is available in my javascript files. window.STATIC_URL = '{{STATIC_URL}}'; On Jan 3, 4:38 am, Andres Reyes wrote: > If you're serving your media from

Re: Introducing: pythonpackages.com

2012-01-03 Thread Thomas Weholt
Looks nice, allthough one thing that annoys me quite a bit is how github suddenly becomes the de facto way of logging in everywhere, like djangopackages.com as well. My old login doesn't work there anymore. I use bitbucket, and have no plans or need to switch to github for hosting my projects. Sorr