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 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]":"CanoeKayak.listings" must be a "Listings"
instance.

Request Method: POST
Request URL:http://127.0.0.1:8000/bsmain/canoekayak/add/15/
Django Version: 1.3.1
Exception Type: ValueError
Exception Value:

Cannot assign "[15]": "CanoeKayak.listings" must be a "Listings"
instance.

Exception Location: /usr/local/lib/python2.6/dist-packages/django/db/
models/fields/related.py in __set__, line 331
Python Executable:  /usr/bin/python
Python Version: 2.6.5
Python Path:

['/home/bill/workspace/boatsite',
  '/usr/lib/python2.6',
  '/usr/lib/python2.6/plat-linux2',
  '/usr/lib/python2.6/lib-tk',
  '/usr/lib/python2.6/lib-old',
  '/usr/lib/python2.6/lib-dynload',
  '/usr/lib/python2.6/dist-packages',
  '/usr/lib/python2.6/dist-packages/PIL',
  '/usr/lib/python2.6/dist-packages/gst-0.10',
  '/usr/lib/pymodules/python2.6',
  '/usr/lib/python2.6/dist-packages/gtk-2.0',
  '/usr/lib/pymodules/python2.6/gtk-2.0',
  '/usr/local/lib/python2.6/dist-packages']

Server time:Tue, 3 Jan 2012 21:33:38 -0600



--
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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.djangoproject.com/en/1.3/intro/tutorial01/
just try django-admin .

On Wed, Jan 4, 2012 at 1:00 PM, Jirka Vejrazka wrote:

> > 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 django-admin.py filename on your path. It ends
> with "...\django\bin" which is a directory name, not a file name.
>
>  HTH
>
>Jirka
>
> --
> 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 options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 django-admin.py filename on your path. It ends
with "...\django\bin" which is a directory name, not a file name.

  HTH

Jirka

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 ForeignKey
and ManyToMany in various ModelForms to only display other
VariousModels which share the same MainModel in common.  Here is what
I tried to do and it didn't work:

item = models.ForeignKey(Item, limit_choices_to={'main__pk':main},
blank=True, null=True)

I attempted different versions of this on the actual model.  I am now
looking into how I can perform this using a ModelForm instead of
placing the limits on the actual model.  I'm not sure if this will
work, as the ModelForm's QuerySet for the choiceField cannot be
changed dynamically during runtime, or can it?

Basically, I am creating a multi-user/multi-section application.  The
main model described above is a section which a user creates and
manages.  The user should only see choices in the forms for objects
associated with the current section they are editing.

Perhaps I am going about this entirely wrong and this should be
implemented in a different form, such as a permission.

Any ideas on how this can be done would be very helpful, thanks.

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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"
> 
> --
> Incorrect string value: '\xE9\x82\x80\xE8\xAB\x8B...' for column
> 'message' at row 1
> --
> How to fix it?
> Thanks!!
> 
> -- 
> 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 options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
> 

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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.

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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]":"CanoeKayak.listings" must be a "Listings"
instance.

Request Method: POST
Request URL:http://127.0.0.1:8000/bsmain/canoekayak/add/15/
Django Version: 1.3.1
Exception Type: ValueError
Exception Value:

Cannot assign "[15]": "CanoeKayak.listings" must be a "Listings"
instance.

Exception Location: /usr/local/lib/python2.6/dist-packages/django/db/
models/fields/related.py in __set__, line 331
Python Executable:  /usr/bin/python
Python Version: 2.6.5
Python Path:

['/home/bill/workspace/boatsite',
 '/usr/lib/python2.6',
 '/usr/lib/python2.6/plat-linux2',
 '/usr/lib/python2.6/lib-tk',
 '/usr/lib/python2.6/lib-old',
 '/usr/lib/python2.6/lib-dynload',
 '/usr/lib/python2.6/dist-packages',
 '/usr/lib/python2.6/dist-packages/PIL',
 '/usr/lib/python2.6/dist-packages/gst-0.10',
 '/usr/lib/pymodules/python2.6',
 '/usr/lib/python2.6/dist-packages/gtk-2.0',
 '/usr/lib/pymodules/python2.6/gtk-2.0',
 '/usr/local/lib/python2.6/dist-packages']

Server time:Tue, 3 Jan 2012 21:33:38 -0600

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 will point you
> down the road of implementing a database abstraction layer, the ORM.
> With the object relational model (ORM), you can create tables and
> relationships and extract or insert/update data from those tables.
>
> The ORM is fine to work with, however, just be aware that reading up
> on database tutorials, sql queries, table design, relational models
> etc,
> may confuse you a bit when trying to equate those concepts to the ORM.
>
> My own preference is to use sql calls using python directly rather
> than using the ORM in django.   Just another (abstraction) layer to
> learn, and it is a matter
> of opinion the value it adds to the speed, or efficiency of the
> development process
>
> On Jan 3, 4:09 am, wC  wrote:
>
>
> Thank you for the advice!  Now when you say the ORM, are we talking about the 
> API for my particular database?? Interacting with it using SQL commands 
> within the API?? Forgive my ignorance.

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 concern. Sooner or later you have to make database design choices
> and only relying on the community is going to slow you down. Good advice is
> expensive (time or effort).
> 2. Having read the docs on djangoproject.com (which are huge), I read
> djangobook.com, then I started building my own apps following some of the
> tutorials fromhttps://code.djangoproject.com/wiki/Tutorials. I made myself
> a todo-app, for instance. There are about three or four tutorials for that
> and each of them adds some knowledge (the nettuts one is for true
> beginners). If you work on you app a bit you'll gain knowledge in testing,
> migrating, implementing design and much more. I always asked myself 'does
> my program solve a problem'. If it does not, you will get lost pretty
> quickly.
> 3. ?
>
> Not sure what the next step would be? Deploy a small website? Use third
> party OS code? Any suggestions?
>
> Cheers
> wC

Thanks man, I will follow your advice!

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 plenty of
> guides to that online.
>
> In terms of learning database theory, I'd suggest either "Database Design
> for Mere Mortals"
> (http://www.amazon.com/Database-Design-Mere-Mortals-Hands/dp/0201694719),
> or "Database Design with UML and SQL" (http://www.tomjewett.com/dbdesign/).
>
> Cheers,
> Victor

Well, I was referring to the database part, but really I need to learn
more about web development too. I know HTML, CSS, JavaScript vaguely,
and that's about it. Since I LUV Python (like I said, a beginner in
Python) I figured Django would be a good place to start learning web
dev.Am I wrong?? You're saying INSTEAD OF Django, learn an MVC? I was
under the impression Django was an MVC, am I wrong??

And Thanks for the help Victor!

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 to
> >> the part where you edit the polls/models.py, and this is where I need
> >> advice.
>
> >> I understand roughly what's going in when we write the script in
> >> models.py, however if I had to create something like this on my own, I
> >> wouldn't know where to begin. Obviously I have no .db experience, but
> >> I get the gist of the different types of fields django uses. The
> >> question is, how do I go about learning this?? Do I need to go through
> >> an SQL tutorial to better understand how this works??
>
> >> Thanks in advance for ANY help!
>
> I read somewhere that it takes about 10,000 hours of
> (learning/training/practice/work) to achieve mastery in any area
> requiring complex skills and knowhow. Playing a musical instrument,
> writing complex database systems for the web, air traffic control - you
> name it.
>
> I think you need to bite the bullet and slog your way through the
> tutorial. Don't expect to understand too much the first time but learn
> to follow the written instructions *slavishly* until it actually works.
>
> Then get yourself a copy of The Definitive Guide to Django by Adrian
> Holovaty and Jacob Kaplan-Moss and work through that.
>
> Finally tackle a small project of your own and make that work. Google
> will help you answer most of your questions.
>
> Good luck
>
> Mike
>
>
Thanks so much for the advice Mike. Actually I have the book, and I'm
going through the tutorial now. When I came to the database part, I
realized I didn't know a thing about them. So how could I write Python
code that would interact with a database?? So, I figured there had to
be someway to learn this stuff. I wasn't sure what to study to learn/
get better at it. . .After going through that chp in the book, and
looking quickly at an SQL Tutorial, I think I have a better
understanding of what I need to do.

Again, thanks so much for the advice. It's much appreciated!

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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-installed
django-debug_toolbar
Downloading/unpacking django-debug-toolbar
  Downloading django-debug-toolbar-0.9.1.tar.gz (148Kb): 148Kb downloaded
  Running setup.py egg_info for package django-debug-toolbar

Installing collected packages: django-debug-toolbar
  Found existing installation: django-debug-toolbar 0.8.5
Uninstalling django-debug-toolbar:
  Successfully uninstalled django-debug-toolbar
  Running setup.py install for django-debug-toolbar

Successfully installed django-debug-toolbar
Cleaning up...

(Pinax-env) P:\Projects\Pinax>manage.py syncdb
Error: No module named 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.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 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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 abstraction layer, the ORM.
With the object relational model (ORM), you can create tables and
relationships and extract or insert/update data from those tables.


The ORM is fine to work with, however, just be aware that reading up
on database tutorials, sql queries, table design, relational models
etc,
may confuse you a bit when trying to equate those concepts to the ORM.

My own preference is to use sql calls using python directly rather
than using the ORM in django.   Just another (abstraction) layer to
learn, and it is a matter
of opinion the value it adds to the speed, or efficiency of the
development process







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 concern. Sooner or later you have to make database design choices
> and only relying on the community is going to slow you down. Good advice is
> expensive (time or effort).
> 2. Having read the docs on djangoproject.com (which are huge), I read
> djangobook.com, then I started building my own apps following some of the
> tutorials fromhttps://code.djangoproject.com/wiki/Tutorials. I made myself
> a todo-app, for instance. There are about three or four tutorials for that
> and each of them adds some knowledge (the nettuts one is for true
> beginners). If you work on you app a bit you'll gain knowledge in testing,
> migrating, implementing design and much more. I always asked myself 'does
> my program solve a problem'. If it does not, you will get lost pretty
> quickly.
> 3. ?
>
> Not sure what the next step would be? Deploy a small website? Use third
> party OS code? Any suggestions?
>
> Cheers
> wC

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 on 
single braces.

--
-- Christophe Pettus
   x...@thebuild.com

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 composing a query, you can use "%(key)s" in your
> query instead of "%s", and pass a dictionary instead of a list for actual
> parameter.
> django docs mention the "%s" syntax for raw queries. i was just wondering if
> the other syntax is supported or not, because it can be handy sometimes.
>
> --
> 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 options, visit this group at
> http://groups.google.com/group/django-users?hl=en.

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 Javascript.  You might find a templating scheme that fits the task
better, and feed it the variable values you need to.

The bad way is like the worse way, but is more work: you do the same template
interpolation, but from a management command, which makes versions of your
static files with all substitutions applied, and which places them in
the folder from
which your front end apache or ngniz will really serve them, which
should probably
be where runserver will look for them as well.  You would have to remember to
run this when you changed something.

Bill

On Tue, Jan 3, 2012 at 4:10 AM, francescortiz  wrote:
> 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 the same domain as your CSS i'd use
>> relative paths
>>
>> 2012/1/2 Christophe Pettus :
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> > On Jan 2, 2012, at 5:56 PM, Victor Hooi wrote:
>> >> E.g. I have a CSS file that points to a PNG sprite, and I'd like a way to 
>> >> get it to point to {{ STATIC_URL}} without hardcoding the URL/path - any 
>> >> way?
>>
>> > You can use Django to serve your CSS file if you want to, although you'll 
>> > want to cache the heck out of it for performance reasons.  There are also 
>> > a wide variety of tools which generate CSS from various input files to 
>> > allow for various kind of template expansion, and those might be a 
>> > suitable alternative.
>>
>> > --
>> > -- Christophe Pettus
>> >   x...@thebuild.com
>>
>> > --
>> > 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 options, visit this group 
>> > athttp://groups.google.com/group/django-users?hl=en.
>>
>> --
>> Andrés Reyes Monge
>> armo...@gmail.com
>> +(505)-8873-7217
>
> --
> 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 options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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.objects.exclude(entry__in=Entry.objects.exclude(authors=123))

-- 
Javier

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/CmmZ4EO_dCYJ.
> 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 options, visit this group at
> http://groups.google.com/group/django-users?hl=en.

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 free trial account at New Relic and check out
their guide on getting the python agent installed here:

http://newrelic.com/docs/python/python-agent-installation

Once I had the newrelic package installed and my newrelic.ini file
created via newrelic-admin:

newrelic-admin generate-config LICENSE-KEY newrelic.ini

All I had to do was add two lines to my WSGI handler and it was good
to go. Here is an example of a WSGI handler that works for me:

http://pastie.org/3119693

Hope this helps.

--Evan




On Jan 3, 8:12 am, "Cal Leeming [Simplicity Media Ltd]"
 wrote:
> 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...@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> wrote:
>
> >>> 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 Bouterse wrote:
>
>  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 <
>  abhaya.th...@sproutify.com> wrote:
>
> > 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 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 options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.
>
>  --
>  Brian Bouterse
>  ITng Services
>
>   --
>  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 options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
> >>> --
>
> >>> *Cal Leeming*
> >>> Technical Director - Simplicity Media Ltd
>
> >>> For 24/7 emergency support, please call 02476 970798 *(UK)* or
> >>> 302-111-4902* (US)*
>
> >>> *P** *Please consider the environment before printing this email.
> >>> The information contained in this email is confidential and is intended
> >>> for the use only of the addressee. Any unauthorised dissemination or
> >>> copying of this email and any use or disclosure of information is strictly
> >>> prohibited and may be illegal. Please let us know immediately by 
> >>> telephone,
> >>> if an email has been sent to you in error and return the email to us. 
> >>> Registered
> >>> company number 7143564, Abbey House, Manor Road, Coventry, UK, CV1 2FW.
>
> >>>  --
> >>> 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 options, visit this group at
> >>>http://groups.google.com/group/django-users?hl=en.
>
> >>  --
> >> 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 options, visit this group at
> >>http://groups.google.com/group/django-users?hl=en.
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this 

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.
>
> --
> 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 email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 less hassle for the
> documentation management team.
Wiki documentations are systematically and universally terrible, and
actually far more of a hassle to maintain (as they're generally trivial
to spam and/or deface, wsgi.org migrated to Sphinx for these reasons).
I really don't see this happening… ever.

And there is no need to "message the group" for documentation fixes,
you can open a documentation bug and provide a patch and it'll get
reviewed and merged, Django's documentation is considered a first-class
section of Django's code.

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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
things could have been more clearly explained (https://
docs.djangoproject.com/en/1.3/topics/db/queries/#spanning-multi-valued-
relationships)

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 less hassle for the
documentation management team.

Cheers

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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_now_add=False, **options])


On Jan 3, 10:22 am, Michael Elkins  wrote:
> 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 = models.DateTimeField('date published')
>
> >While trying to look up what the argument 'date published' was
> >supposed to assign, I was presented with this definition-
>
> I agree that it is not obvious in the tutorial what the first
> argument is setting.  It is documented elsewhere:
>
> https://docs.djangoproject.com/en/1.3/topics/db/models/#verbose-field...
>
> >class DateTimeField([auto_now=False, auto_now_add=False, **options])
>
> >In the description it vaguely indicates that DateTimeField is a child
> >of DateField (which has the same definition), and I see no indication
> >at all that DateField is a child of Field.
>
> The description says "Takes the same extra arguments as
> DateField."  I think all it implies is that it is similar to
> DateField.

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 the resulting queryset there may be blogs that, besides the 
entries whose (co)author the author with id 123 is, *also* have 
additional entries to which 123 did not contribute, i.e. that only have 
authors other than 123.


How can I find only those blogs where *all* entries were (co-)authored 
by 123?


Many thanks for your help and best regards,
Carsten


[ For completeness, I tried to find words for this problem earlier at
http://groups.google.com/group/django-users/browse_thread/thread/bae63dd7904298e9, 
but my attempt at phrasing it was just too clumsy. Now that I understand 
the problem better, the above makes the old thread obsolete. ]




--
   Cafu - the open-source Game and Graphics Engine
for multiplayer, cross-platform, real-time 3D Action
  Learn more at http://www.cafu.de

--
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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...@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> wrote:
>>
>>> 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 Bouterse wrote:
>>>
 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 <
 abhaya.th...@sproutify.com> wrote:

> 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 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 options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


 --
 Brian Bouterse
 ITng Services

  --
 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 options, visit this group at
 http://groups.google.com/group/django-users?hl=en.

>>>
>>>
>>>
>>> --
>>>
>>> *Cal Leeming*
>>> Technical Director - Simplicity Media Ltd
>>>
>>> For 24/7 emergency support, please call 02476 970798 *(UK)* or
>>> 302-111-4902* (US)*
>>>
>>>
>>> *P** *Please consider the environment before printing this email.
>>> The information contained in this email is confidential and is intended
>>> for the use only of the addressee. Any unauthorised dissemination or
>>> copying of this email and any use or disclosure of information is strictly
>>> prohibited and may be illegal. Please let us know immediately by telephone,
>>> if an email has been sent to you in error and return the email to us. 
>>> Registered
>>> company number 7143564, Abbey House, Manor Road, Coventry, UK, CV1 2FW.
>>>
>>>  --
>>> 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 options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>
>>  --
>> 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 options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  --
> 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 options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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, 2012 at 5:16 PM, Sid  wrote:

> @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 subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/ckNJjXg2HsAJ.
>
> 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 options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 = models.DateTimeField('date published')

While trying to look up what the argument 'date published' was
supposed to assign, I was presented with this definition-


I agree that it is not obvious in the tutorial what the first 
argument is setting.  It is documented elsewhere:


https://docs.djangoproject.com/en/1.3/topics/db/models/#verbose-field-names


class DateTimeField([auto_now=False, auto_now_add=False, **options])

In the description it vaguely indicates that DateTimeField is a child
of DateField (which has the same definition), and I see no indication
at all that DateField is a child of Field.


The description says "Takes the same extra arguments as 
DateField."  I think all it implies is that it is similar to 
DateField.


--
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/ckNJjXg2HsAJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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> wrote:
>
>> 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 Bouterse wrote:
>>
>>> 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 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 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 options, visit this group at
 http://groups.google.com/group/django-users?hl=en.


>>>
>>>
>>> --
>>> Brian Bouterse
>>> ITng Services
>>>
>>>  --
>>> 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 options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>
>>
>>
>> --
>>
>> *Cal Leeming*
>> Technical Director - Simplicity Media Ltd
>>
>> For 24/7 emergency support, please call 02476 970798 *(UK)* or
>> 302-111-4902* (US)*
>>
>>
>> *P** *Please consider the environment before printing this email.
>> The information contained in this email is confidential and is intended
>> for the use only of the addressee. Any unauthorised dissemination or
>> copying of this email and any use or disclosure of information is strictly
>> prohibited and may be illegal. Please let us know immediately by telephone,
>> if an email has been sent to you in error and return the email to us. 
>> Registered
>> company number 7143564, Abbey House, Manor Road, Coventry, UK, CV1 2FW.
>>
>>  --
>> 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 options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  --
> 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 options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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/django-users/-/6EqZ89E2UIUJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 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 Bouterse  wrote:
>
>> 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 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 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 options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>>
>>
>>
>> --
>> Brian Bouterse
>> ITng Services
>>
>>  --
>> 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 options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
>
> --
>
> *Cal Leeming*
> Technical Director - Simplicity Media Ltd
>
> For 24/7 emergency support, please call 02476 970798 *(UK)* or
> 302-111-4902* (US)*
>
>
> *P** *Please consider the environment before printing this email.
> The information contained in this email is confidential and is intended
> for the use only of the addressee. Any unauthorised dissemination or
> copying of this email and any use or disclosure of information is strictly
> prohibited and may be illegal. Please let us know immediately by telephone,
> if an email has been sent to you in error and return the email to us. 
> Registered
> company number 7143564, Abbey House, Manor Road, Coventry, UK, CV1 2FW.
>
>  --
> 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 options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 instead of a list for actual
> parameter.
> django docs mention the "%s" syntax for raw queries. i was just wondering
> if the other syntax is supported or not, because it can be handy sometimes.
>
>  --
> 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 options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 Bouterse  wrote:

> 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 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 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 options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>
>
> --
> Brian Bouterse
> ITng Services
>
>  --
> 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 options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 

*Cal Leeming*
Technical Director - Simplicity Media Ltd

For 24/7 emergency support, please call 02476 970798 *(UK)* or 302-111-4902*
 (US)*


*P** *Please consider the environment before printing this email.
The information contained in this email is confidential and is intended for
the use only of the addressee. Any unauthorised dissemination or copying of
this email and any use or disclosure of information is strictly prohibited
and may be illegal. Please let us know immediately by telephone, if an
email has been sent to you in error and return the email to us. Registered
company number 7143564, Abbey House, Manor Road, Coventry, UK, CV1 2FW.

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 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 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 options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Brian Bouterse
ITng Services

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 > 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 switch to
github for hosting my projects. Sorry for ranting :-|

Still, like the looks of your project :-) So keep up the good work!

Thomas



On Tue, Jan 3, 2012 at 3:06 AM, Alex Clark > wrote:
 > Hi,
 >
 > For the past two months I've been developing a service for
developers and
 > consumers of Python packages:
 >
 > - http://pythonpackages.com
 >
 > (And as a Django user, this service may be of interest to you).
 >
 > Recently, we've added the ability for folks to login with their
github
 > account. This changes the landscape of the site from anonymous to
personal,
 > and with this change the creation of "profile pages" is now
possible, e.g.:
 >
 > - http://pythonpackages.com/user/nutjob4life
 >
 > We've seen a fair amount of activity on the site by anonymous
users, and
 > with this change I envision a fair amount of github user
activity. Toward
 > that end, I would appreciate it if you would take a minute to
login with
 > your github account here (requires read only access) and give the
service a
 > try:
 >
 > - http://pythonpackages.com/login
 >
 > You can also browse recent package activity (via the PyPI API) here:
 >
 > - http://pythonpackages.com/activity
 >
 > Discuss packages here:
 >
 > - http://pythonpackages.com/discuss
 >
 > And read our site documentation here:
 >
 > - http://pythonpackages-docs.readthedocs.org
 >
 > Lastly, if you have any feedback please feel free to leave a
comment here:
 >
 > - http://pythonpackages.com/about
 >
 > Or open a ticket here:
 >
 > - https://bitbucket.org/pythonpackages/pythonpackages.com/issues/new
 >
 >
 > Thanks,
 >
 >
 > Alex
 >
 >
 > --
 > Alex Clark · http://pythonpackages.com
 >
 > --
 > 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 options, visit this group at
 > http://groups.google.com/group/django-users?hl=en.
 >



--
Mvh/Best regards,
Thomas Weholt
http://www.weholt.org

--
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 options, visit this group at
http://groups.google.com/group/django-users?hl=en.


--
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 options, visit this group at
http://groups.google.com/group/django-users?hl=en.



--
Alex Clark · http://pythonpackages.com

--
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 switch to
github for hosting my projects. Sorry for ranting :-|


No problem! That's good feedback, thanks.

Other SSO methods are coming, just had to pick *something* to start 
with, and github makes it relatively painless.


Still, like the looks of your project :-) So keep up the good work!



Thanks!


Alex




Thomas



On Tue, Jan 3, 2012 at 3:06 AM, Alex Clark  wrote:

Hi,

For the past two months I've been developing a service for developers and
consumers of Python packages:

- http://pythonpackages.com

(And as a Django user, this service may be of interest to you).

Recently, we've added the ability for folks to login with their github
account. This changes the landscape of the site from anonymous to personal,
and with this change the creation of "profile pages" is now possible, e.g.:

- http://pythonpackages.com/user/nutjob4life

We've seen a fair amount of activity on the site by anonymous users, and
with this change I envision a fair amount of github user activity. Toward
that end, I would appreciate it if you would take a minute to login with
your github account here (requires read only access) and give the service a
try:

- http://pythonpackages.com/login

You can also browse recent package activity (via the PyPI API) here:

- http://pythonpackages.com/activity

Discuss packages here:

- http://pythonpackages.com/discuss

And read our site documentation here:

- http://pythonpackages-docs.readthedocs.org

Lastly, if you have any feedback please feel free to leave a comment here:

- http://pythonpackages.com/about

Or open a ticket here:

- https://bitbucket.org/pythonpackages/pythonpackages.com/issues/new


Thanks,


Alex


--
Alex Clark · http://pythonpackages.com

--
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 options, visit this group at
http://groups.google.com/group/django-users?hl=en.








--
Alex Clark · http://pythonpackages.com

--
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 database design choices 
and only relying on the community is going to slow you down. Good advice is 
expensive (time or effort).
2. Having read the docs on djangoproject.com (which are huge), I read 
djangobook.com, then I started building my own apps following some of the 
tutorials from https://code.djangoproject.com/wiki/Tutorials. I made myself 
a todo-app, for instance. There are about three or four tutorials for that 
and each of them adds some knowledge (the nettuts one is for true 
beginners). If you work on you app a bit you'll gain knowledge in testing, 
migrating, implementing design and much more. I always asked myself 'does 
my program solve a problem'. If it does not, you will get lost pretty 
quickly.
3. ?

Not sure what the next step would be? Deploy a small website? Use third 
party OS code? Any suggestions?

Cheers
wC

-- 
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/-/GBXHWYTcLqwJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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.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 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 options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
This e-mail and any file transmitted with it is intended only for the
person or entity to which is addressed and may contain information that is
privileged, confidential or otherwise protected from disclosure. Copying,
dissemination or use of this e-mail or the information herein by anyone
other than the intended recipient is prohibited. If you are not the
intended recipient, please notify the sender immediately by return e-mail,
delete this communication and destroy all copies.

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 work there
> anymore. I use bitbucket, and have no plans or need to switch to
> github for hosting my projects. Sorry for ranting :-|
>
> Still, like the looks of your project :-) So keep up the good work!
>
> Thomas
>
>
>
> On Tue, Jan 3, 2012 at 3:06 AM, Alex Clark  wrote:
> > Hi,
> >
> > For the past two months I've been developing a service for developers and
> > consumers of Python packages:
> >
> > - http://pythonpackages.com
> >
> > (And as a Django user, this service may be of interest to you).
> >
> > Recently, we've added the ability for folks to login with their github
> > account. This changes the landscape of the site from anonymous to
> personal,
> > and with this change the creation of "profile pages" is now possible,
> e.g.:
> >
> > - http://pythonpackages.com/user/nutjob4life
> >
> > We've seen a fair amount of activity on the site by anonymous users, and
> > with this change I envision a fair amount of github user activity. Toward
> > that end, I would appreciate it if you would take a minute to login with
> > your github account here (requires read only access) and give the
> service a
> > try:
> >
> > - http://pythonpackages.com/login
> >
> > You can also browse recent package activity (via the PyPI API) here:
> >
> > - http://pythonpackages.com/activity
> >
> > Discuss packages here:
> >
> > - http://pythonpackages.com/discuss
> >
> > And read our site documentation here:
> >
> > - http://pythonpackages-docs.readthedocs.org
> >
> > Lastly, if you have any feedback please feel free to leave a comment
> here:
> >
> > - http://pythonpackages.com/about
> >
> > Or open a ticket here:
> >
> > - https://bitbucket.org/pythonpackages/pythonpackages.com/issues/new
> >
> >
> > Thanks,
> >
> >
> > Alex
> >
> >
> > --
> > Alex Clark · http://pythonpackages.com
> >
> > --
> > 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 options, visit this group at
> > http://groups.google.com/group/django-users?hl=en.
> >
>
>
>
> --
> Mvh/Best regards,
> Thomas Weholt
> http://www.weholt.org
>
> --
> 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 options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 solution looks like this. It sets _version to a tuple like in 
django 1.3

version=getattr(connection, '_version', None)
if version is None:
# Django 1.4 and newer
version=connection.pg_version
version=[int(i) for i in re.match(r'^(\d\d?)(\d\d)(\d\d)$', 
str(version)).groups()]
connection._version=version

--
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de

--
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 (*) thomas-guettler + de

--
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 anticipate the
infinite number of use cases and workflows.

Think of the admin as something to help you get some data in the database
fast, and manually edit rows in the future, not as the catch all solution
to your users interactions with the product.

When you learn to tweak the admin, you learn a lot about a very
unconventional app and a little about the framework. The "magic" of that
built-in app is also what makes the complexity of modifying it grow
exponentially as the particularity of your needs increase.

If you on the other hand decide to dive into forms, signals, middleware,
asynchronous tasks, class based views and serialization, you learn all the
good stuff and the sky is the limit. And we'll be glad to help you through
the entire way!

Good luck and happy coding!

Cheers,
AT

On Dec 29, 2011 12:57 PM, "Bart Nagel"  wrote:
>
> At 2011-12-28 06:59:31 -0800, Jay De Lanoy wrote:
> > I'd go for a separate table instead, with something like
> >
> > class BillingInfo(models.Model):
> > customer = models.OneToOneField(Customer)
> > billing_address = models.OneToOneField(Address)
> >
> > and then just have logic in the views and templates to account for
> > existence/nonexistence of a given customer's billing address.
>
> Would this approach mean implementing my own forms to populate
> customers and addresses and not using the built-in Django admin forms
> at all? They were a major draw for me to Django.
>
> Thanks.
>
> --bart
>
> --
> 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 options, visit this group at
http://groups.google.com/group/django-users?hl=en.
>

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 Simek

On Jan 3, 10:19 am, Satyajit Sarangi 
wrote:
> 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
> > "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 options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.
>
> --
> *Satyajit Sarangi*

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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
> "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 options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
*Satyajit Sarangi*

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 the same domain as your CSS i'd use
> relative paths
>
> 2012/1/2 Christophe Pettus :
>
>
>
>
>
>
>
>
>
>
>
> > On Jan 2, 2012, at 5:56 PM, Victor Hooi wrote:
> >> E.g. I have a CSS file that points to a PNG sprite, and I'd like a way to 
> >> get it to point to {{ STATIC_URL}} without hardcoding the URL/path - any 
> >> way?
>
> > You can use Django to serve your CSS file if you want to, although you'll 
> > want to cache the heck out of it for performance reasons.  There are also a 
> > wide variety of tools which generate CSS from various input files to allow 
> > for various kind of template expansion, and those might be a suitable 
> > alternative.
>
> > --
> > -- Christophe Pettus
> >   x...@thebuild.com
>
> > --
> > 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 options, visit this group 
> > athttp://groups.google.com/group/django-users?hl=en.
>
> --
> Andrés Reyes Monge
> armo...@gmail.com
> +(505)-8873-7217

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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. Sorry for ranting :-|

Still, like the looks of your project :-) So keep up the good work!

Thomas



On Tue, Jan 3, 2012 at 3:06 AM, Alex Clark  wrote:
> Hi,
>
> For the past two months I've been developing a service for developers and
> consumers of Python packages:
>
> - http://pythonpackages.com
>
> (And as a Django user, this service may be of interest to you).
>
> Recently, we've added the ability for folks to login with their github
> account. This changes the landscape of the site from anonymous to personal,
> and with this change the creation of "profile pages" is now possible, e.g.:
>
> - http://pythonpackages.com/user/nutjob4life
>
> We've seen a fair amount of activity on the site by anonymous users, and
> with this change I envision a fair amount of github user activity. Toward
> that end, I would appreciate it if you would take a minute to login with
> your github account here (requires read only access) and give the service a
> try:
>
> - http://pythonpackages.com/login
>
> You can also browse recent package activity (via the PyPI API) here:
>
> - http://pythonpackages.com/activity
>
> Discuss packages here:
>
> - http://pythonpackages.com/discuss
>
> And read our site documentation here:
>
> - http://pythonpackages-docs.readthedocs.org
>
> Lastly, if you have any feedback please feel free to leave a comment here:
>
> - http://pythonpackages.com/about
>
> Or open a ticket here:
>
> - https://bitbucket.org/pythonpackages/pythonpackages.com/issues/new
>
>
> Thanks,
>
>
> Alex
>
>
> --
> Alex Clark · http://pythonpackages.com
>
> --
> 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 options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Mvh/Best regards,
Thomas Weholt
http://www.weholt.org

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.