Re: Spawning Subprocesses under mod_python

2007-07-16 Thread Nimrod A. Abing

On 7/17/07, Giovanni Giorgi <[EMAIL PROTECTED]> wrote:
>
> I have used the subprocess module with success.
> I have used it only on command line based script under Linux, but I
> think it can work inside mod_python.
> If you plan to use it I suggest you to reboot the apache one a day, to
> prevent yourself againt resource and/or memory leaks.

I did some searching on the archives (something I should have done in
the first place, D'oh!) and found threads with similar problems. The
thing is that while spawning subprocesses work fine on command line
Python programs, it looks like it's a big no-no while under mod_python
because lots of funky stuff can happen.

So it looks like I'm off to write a simple XML-RPC server that will to
handle spawning subprocesses.
-- 
_nimrod_a_abing_

http://abing.gotdns.com/
http://www.preownedcar.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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: regex in url

2007-07-16 Thread Kenneth Gonsalves


On 17-Jul-07, at 9:36 AM, james_027 wrote:

> Yes I am looking for the explanation of ?P syntax, is this
> something related to python's regex or django's own regex.

python

-- 

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/



--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: regex in url

2007-07-16 Thread james_027

Yes I am looking for the explanation of ?P syntax, is this
something related to python's regex or django's own regex.

thanks
james

On Jul 17, 11:57 am, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On 7/17/07, james_027 <[EMAIL PROTECTED]> wrote:
>
> >  I am very new to django as well as python. how is it that ?P
> > seems to be ignore by the regex function? I can't see any explanation
> > in django's documentation. is this something magic or hack my django?
>
> What do you mean by ignored? Are you getting some unexpected
> behaviour, or are you looking for an explanation of the ?P
> syntax?
>
> Yours,
> Russ Magee %-)


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: regex in url

2007-07-16 Thread Russell Keith-Magee

On 7/17/07, james_027 <[EMAIL PROTECTED]> wrote:
>  I am very new to django as well as python. how is it that ?P
> seems to be ignore by the regex function? I can't see any explanation
> in django's documentation. is this something magic or hack my django?

What do you mean by ignored? Are you getting some unexpected
behaviour, or are you looking for an explanation of the ?P
syntax?

Yours,
Russ Magee %-)

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



regex in url

2007-07-16 Thread james_027

hi,

urlpatterns = patterns('',
(r'^polls/$', 'mysite.polls.views.index'),
(r'^polls/(?P\d+)/$', 'mysite.polls.views.detail'),
(r'^polls/(?P\d+)/results/$',
'mysite.polls.views.results'),
(r'^polls/(?P\d+)/vote/$', 'mysite.polls.views.vote'),
)

 I am very new to django as well as python. how is it that ?P
seems to be ignore by the regex function? I can't see any explanation
in django's documentation. is this something magic or hack my django?

Thanks
james


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Improve the dynamic generation of a form with newforms library

2007-07-16 Thread Russell Keith-Magee

On 7/16/07, yml <[EMAIL PROTECTED]> wrote:
>
>  This is not bat but i would prefer if instead of the list of tuple
> containing my forms could directly instantiate a "all in one" form.
>  This would avoid the loop on list_answer_forms. This is were I get
> stuck. Could you please let me know how to add html text between the
> field?
>  like "{{ poll.title }} | {{ poll.question }}"

If you want to do this, you will need to add a custom rendering scheme
to your form.

When you render a form using {{ form }}, you are effectively making a
call to form.as_table(). Django also provides an as_p and as_ul
variant to modify the way individual fields are rendered, which can be
accessed as {{ form.as_p }} or {{ form.as_ul }}.

To get per-field rendering like you describe, you will need to add a
custom as_ method. Look at the implementation of
django.newforms.Form.as_p() for an example implementation; adapting to
match your needs shouldn't be too hard.

Yours,
Russ Magee %-)

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: SQL VIEWs as Django Models for aggregation --- delete() issues with django.db.models.query: delete_objects

2007-07-16 Thread Russell Keith-Magee

On 7/17/07, JeffH <[EMAIL PROTECTED]> wrote:
>
> Russ: Thanks for your reply!
>
> 1. I don't consider my views-as-models approach elegant at the
> implementation level, but:

Its a bit of a nifty hack. However, I was talking more about views as
a general tool - it would be nice to support them. The success that
you have had mocking them up demonstrates that it is possible, we just
need to finess them.

> 3. That said, my delete_objects() hack was an attempt to solve the
> more general problem of using an overridden delete() without any
> special flags while allowing for the possibility of model subclassing
> in the future, because it seemed that respecting an overridden
> delete() was an important end in itself from an object integrity
> perspective.

To my mind, the better approach here would be to have proper support
for a 'read-only' query set that disables (or doesn't have) the delete
operation, rather than significantly changing the behaviour of bulk
deletes. Read-only objects/querysets would be an essential part of any
view support in Django.

> For my application, aggregate
> reporting is far more common than deletion, so it needs to be
> efficient and convenient to code.

I suppose this is the sticking point. I can see how this is a neat
hack for your specific situation, but I'm not convinced its a general
problem.

> 4. Regarding documentation, I will put in a ticket for the
> documentation on the relevant section
> http://www.djangoproject.com/documentation/model-api/#overriding-default-model-methods
> of the model-api page. That section invites people to override save()
> and delete() but only discusses save() and the implication (by
> omission) that overriding delete() is analogous is incorrect.

Well, it is correct if you consider bulk-delete to be different to
delete. There is no bulk-save analog. Bulk delete (delete on a
queryset) is quite a different operation, that doesn't integrate with
the individual object delete.

However, the distinction obviously isn't obvious to newcomers.
Suggestions on documentation improvements are always welcome. My
initial reaction is that if there is a need for improvement, its here:

http://www.djangoproject.com/documentation/db-api/#deleting-objects

> 5. A big ongoing thanks to all of Django's contributors. You rock!

No - we're more into the Gypsy jazz than the rock. But thanks anyway :-)

Yours,
Russ Magee %-)

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



get 1000,00 dolars per day

2007-07-16 Thread newbar

get 1000,00 dolars per day

Simply click on the business link

http://www.cash-dreams.biz


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Unique=true

2007-07-16 Thread Brian Morton

If you are using NewForms, you should implement this in the clean()
method for a field.  See the newforms docs and unit tests for more
details.

On Jul 16, 4:49 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> OK, fixed the above problem -- figured out that it was related to my
> setting unique=True on a field. But that raises the larger question...
>
> I have a bit of data that may or may not exist... a identifier on the
> user that not all users will have, but if they DO have it, it needs to
> be unique to that user. Apparently, unique=True isn't what I want,
> because the second user without it throws the above duplicate entry
> error, so how do I handle that?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: is there any host servers that supports Django based sites?

2007-07-16 Thread Kenneth Gonsalves


On 17-Jul-07, at 3:21 AM, Michael wrote:

> and the most  important reason that made me leave django and use php
> instead is finding a REAL job.
> after the freelance period, I hope to find a job in some company,
> unfortunately, there is no requests for Django developers, and the
> requests for a python programmer [not just for web] are extremely
> low.

very true - but you *will* be back, so remain on the list and keep  
current

-- 

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/



--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



win install problem

2007-07-16 Thread Carl Karsten

I have been working on a site for a few weeks.  I have been checking my changes 
into svn, and use that to update a demo box.  the demo box runs under a 
different user, has django in a different path, and my files in a different 
path.  I did this on purpose just to make sure nothing was relying on any 
absolute paths.  I svn co the files to a mac, my sqlite based demo worked fine. 
  I tried the same thing with windows, and got errors.

C:\Documents and 
Settings\test\django\ridgemoor/eventcal/templates/databrowse/object_detail.html 
(File does not exist)

from IRC:
(04:48:13 PM) mattmcc: Yeah, I don't know what the deal with that is.  The 
appdir template loader seems to be skipping all the installed apps that aren't 
in your project.

Below is the output from my site.  I have similar problems hitting /admin.I 
am installing py and django on a 2nd win box that will be just for testing 
admin, using a 'new' site.  I'll post results of that shortly.


Carl K



TemplateDoesNotExist at /eventcal/databrowse/eventcal/event/objects/4/
databrowse/object_detail.html
Request Method:  GET
Request URL:  
http://localhost:8000/eventcal/databrowse/eventcal/event/objects/4/
Exception Type:  TemplateDoesNotExist
Exception Value:  databrowse/object_detail.html
Exception Location:  C:\Python25\Lib\site-packages\django\template\loader.py in 
find_template_source, line 72
Python Executable:  C:\Python25\python.exe
Python Version:  2.5.1

Template-loader postmortem
Django tried loading these templates, in this order:

Using loader django.template.loaders.filesystem.load_template_source :
C:\Documents and 
Settings\test\django\ridgemoor/eventcal/templates/databrowse/object_detail.html 
(File does not exist)
Using loader django.template.loaders.app_directories.load_template_source :
C:\Documents and 
Settings\test\django\ridgemoor\core\templates\databrowse/object_detail.html 
(File does not exist)
C:\Documents and 
Settings\test\django\ridgemoor\eventcal\templates\databrowse/object_detail.html 
(File does not exist)
Traceback (innermost last)
Switch to copy-and-paste view


C:\Python25\Lib\site-packages\django\core\handlers\base.py in get_response
  # Apply view middleware

  for middleware_method in self._view_middleware:

  response = middleware_method(request, callback, 
callback_args, 
callback_kwargs)

  if response:

  return response


  try:

 response = callback(request, *callback_args, **callback_kwargs)
  ...

 except Exception, e:

  # If the view raised an exception, run it through exception

  # middleware, and if the exception middleware returns a

  # response, use that. Otherwise, reraise the exception.

  for middleware_method in self._exception_middleware:

  response = middleware_method(request, e)

▶ Local vars
Variable  Value
callback  >
callback_args  (u'eventcal/event/objects/4/',)
callback_kwargs  {}
debug  
e  TemplateDoesNotExist('databrowse/object_detail.html',)
exceptions  
mail_admins  
middleware_method  >
request  , POST:, 
COOKIES:{'sessionid': '5e82c3b10a83bfac4203509f183bb770'}, 
META:{'ALLUSERSPROFILE': 'C:\\Documents and Settings\\All Users', 'APPDATA': 
'C:\\Documents and Settings\\test\\Application Data', 'CLIENTNAME': 'Console', 
'COMMONPROGRAMFILES': 'C:\\Program Files\\Common Files', 'COMPUTERNAME': 
'TESTXP', 'COMSPEC': 'C:\\WINDOWS\\system32\\cmd.exe', 'CONTENT_LENGTH': '', 
'CONTENT_TYPE': 'text/plain', 'DJANGO_SETTINGS_MODULE': 'demo_settings', 
'FP_NO_HOST_CHECK': 'NO', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HOMEDRIVE': 'C:', 
'HOMEPATH': '\\Documents and Settings\\test', 'HTTP_ACCEPT': 'image/gif, 
image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*', 
'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us', 
'HTTP_CONNECTION': 'Keep-Alive', 'HTTP_COOKIE': 
'sessionid=5e82c3b10a83bfac4203509f183bb770', 'HTTP_HOST': 'localhost:8000', 
'HTTP_REFERER': 'http://localhost:8000/eventcal/', 'HTTP_USER_AGENT': 
'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)', 
'LOGONSERVER': 'TESTXP', 'NUMBER_OF_PROCESSORS': '1', 'OS': 'Windows_NT', 
'PATH': 
'%SystemRoot%\\system32;%SystemRoot%;%SystemRoot%\\System32\\Wbem;C:\\Program 
Files\\Microsoft SQL Server\\80\\Tools\\BINN;;C:\\Python25;C:\\Program 
Files\\svn-win32-1.4.4\\bin;C:\\Program Files\\UnxUtils\\usr\\local\\wbin', 
'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH', 'PATH_INFO': 
'/eventcal/databrowse/eventcal/event/objects/4/', 'PROCESSOR_ARCHITECTURE': 
'x86', 'PROCESSOR_IDENTIFIER': 'x86 Family 6 Model 7 Stepping 3, GenuineIntel', 
'PROCESSOR_LEVEL': '6', 'PROCESSOR_REVISION': '0703', 'PROGRAMFILES': 
'C:\\Program Files', 'PROMPT': '$P$G', 'PYTHONPATH': '"C:\\Documents and 
Settings\\test\\django\\ridgemoor"', 'QUERY_STRING': '', 

Re: order_with_respect_to still dead wth MySQL?

2007-07-16 Thread John Shaffer
Note that the ticket is marked "new" rather than "closed: fixed". This
usually means that it is still an issue.

A triager might look at it and mark it "ready for checkin" rather than
"patch needs improvement", which will give it a much better chance of
getting into trunk.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: is there any host servers that supports Django based sites?

2007-07-16 Thread James Bennett

On 7/16/07, Michael <[EMAIL PROTECTED]> wrote:
> after many  indecisions, I decided to leave Django and keep working
> with PHP
> I'm really  disappointed that I had to make  this decision :-(

I can certainly sympathize; back in my freelance days I enjoyed
writing Python and fell in love with Django after its initial release,
but PHP and Perl were paying my bills so I was pretty much stuck for a
while.

My advice to you, and to anyone else in your situation, would be to
not give up -- even if you're still mostly working with, say, PHP,
keep working with Django or other frameworks when you get the chance.
When you have some spare time, write applications you're interested in
and tell the community about them, and you never know what sorts of
opportunities might turn up. And even if you never land a professional
gig out of it, the experience will make you a better and more
well-rounded programmer, and in time that'll get you progressively
better jobs no matter what languages or tools you end up working with
it.

Also, remember that this list sees an increasing number of job offers,
and there's a spot on the wiki (the "DevelopersForHire" page) where
Django-oriented freelancers and companies can offer their services for
hire and Django-oriented employers can list jobs they want to fill.
Keep an eye on that and don't be afraid to get in touch with people
and start building up contacts in the community -- opportunities will
come to folks who put themselves in the right place at the right time
;)


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: is there any host servers that supports Django based sites?

2007-07-16 Thread Marc Garcia

Why not getting a VPS hosting (or a dedicated server) and install
whatever you want? Then you can sell hosting to your customers if
needed.

PS: May be in 6-7 months there will be more offers fos django
developers than for php :)

On Jul 17, 12:01 am, SamFeltus <[EMAIL PROTECTED]> wrote:
> Web Faction works great and is very affordable, FWIW
>
> On Jul 16, 4:51 pm, Michael <[EMAIL PROTECTED]> wrote:
>
> > thank you all for helping me understand the 'Django-way'.
>
> > after many  indecisions, I decided to leave Django and keep working
> > with PHP
> > I'm really  disappointed that I had to make  this decision :-(
> > I  like python AND django, honestly I think it's the best web
> > framework that ever been made :)
> > furthermore, using Django for web applications is very  enjoyable
>
> >  the thing is that I have like 1 year, for making money and gain some
> > experience
> > I'm to young to work in some serious company, so meanwhile I want to
> > freelance and hopefully find a permanent job after maybe 6-7 months of
> > freelancing.
>
> > there is no chance for me to reach my goal using Django because:
> > 1) in the freelancing 'scene' there is no requests for Django , many
> > jobs requires PHP skills [fixing and modifying  apps]
> > 2) even when the client needs a whole new website and he don't care
> > about the programming - his host provider obviously won't support
> > Django and it's too hard to convince people change their host.
>
> > and the most  important reason that made me leave django and use php
> > instead is finding a REAL job.
> > after the freelance period, I hope to find a job in some company,
> > unfortunately, there is no requests for Django developers, and the
> > requests for a python programmer [not just for web] are extremely
> > low.
> > [I don't know the situation in the world, but thats the situation in
> > my place]
>
> > and again - thank you guys for commenting and helping :)


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: recursive relation

2007-07-16 Thread rskm1

On Jul 16, 3:36 pm, "Lic. José M. Rodriguez Bacallao"
<[EMAIL PROTECTED]> wrote:
> How can I make a recursive one-to-many relation?
>
> --
> Lic. José M. Rodriguez Bacallao

According to
http://www.djangoproject.com/documentation/model-api/#many-to-one-relationships

``To create a recursive relationship - an object that has a many-to-
one relationship with itself - use models.ForeignKey('self').''

So basically, just take the one-to-many relationship you wanted, and
*reverse* the roles.
For example, if you had a Person object and you wanted to keep track
of the multiple Person objects who were its "employees", simply
reverse the roles.  Make each Person object keep track of its "boss"
instead.


(Hopefully that's what you were looking for; if I misunderstood the
question and you were looking for more "advanced" info, I probably
won't be much help since I'm a novice myself)


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: objects.filter

2007-07-16 Thread Tim Chase

> Okay, I am having a problem and I don't know why. I am doing
> an objects.filter on a model called Asset it looks like this
> asset = Asset.objects.filter(process_stage = state or
> 'imaging') this should return any Asset that is equal to the
> state variable or 'imaging' but it is just returning the ones
> that are equal to state.

You're running against Python's short-circuit evaluation.

If "state" has a value, python uses that.  Only if the value of 
"state" evaluates as false is the 'imaging' considered.

What you need is to use the Q() object and Or them together, 
something like


Asset.objects.filter(Q(process_state=state)|Q(process_state='imaging'))

-tim




--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: is there any host servers that supports Django based sites?

2007-07-16 Thread SamFeltus

Web Faction works great and is very affordable, FWIW

On Jul 16, 4:51 pm, Michael <[EMAIL PROTECTED]> wrote:
> thank you all for helping me understand the 'Django-way'.
>
> after many  indecisions, I decided to leave Django and keep working
> with PHP
> I'm really  disappointed that I had to make  this decision :-(
> I  like python AND django, honestly I think it's the best web
> framework that ever been made :)
> furthermore, using Django for web applications is very  enjoyable
>
>  the thing is that I have like 1 year, for making money and gain some
> experience
> I'm to young to work in some serious company, so meanwhile I want to
> freelance and hopefully find a permanent job after maybe 6-7 months of
> freelancing.
>
> there is no chance for me to reach my goal using Django because:
> 1) in the freelancing 'scene' there is no requests for Django , many
> jobs requires PHP skills [fixing and modifying  apps]
> 2) even when the client needs a whole new website and he don't care
> about the programming - his host provider obviously won't support
> Django and it's too hard to convince people change their host.
>
> and the most  important reason that made me leave django and use php
> instead is finding a REAL job.
> after the freelance period, I hope to find a job in some company,
> unfortunately, there is no requests for Django developers, and the
> requests for a python programmer [not just for web] are extremely
> low.
> [I don't know the situation in the world, but thats the situation in
> my place]
>
> and again - thank you guys for commenting and helping :)


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: is there any host servers that supports Django based sites?

2007-07-16 Thread Michael

thank you all for helping me understand the 'Django-way'.

after many  indecisions, I decided to leave Django and keep working
with PHP
I'm really  disappointed that I had to make  this decision :-(
I  like python AND django, honestly I think it's the best web
framework that ever been made :)
furthermore, using Django for web applications is very  enjoyable

 the thing is that I have like 1 year, for making money and gain some
experience
I'm to young to work in some serious company, so meanwhile I want to
freelance and hopefully find a permanent job after maybe 6-7 months of
freelancing.

there is no chance for me to reach my goal using Django because:
1) in the freelancing 'scene' there is no requests for Django , many
jobs requires PHP skills [fixing and modifying  apps]
2) even when the client needs a whole new website and he don't care
about the programming - his host provider obviously won't support
Django and it's too hard to convince people change their host.

and the most  important reason that made me leave django and use php
instead is finding a REAL job.
after the freelance period, I hope to find a job in some company,
unfortunately, there is no requests for Django developers, and the
requests for a python programmer [not just for web] are extremely
low.
[I don't know the situation in the world, but thats the situation in
my place]

and again - thank you guys for commenting and helping :)


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



objects.filter

2007-07-16 Thread [EMAIL PROTECTED]

Okay, I am having a problem and I don't know why. I am doing an
objects.filter on a model called Asset it looks like this asset =
Asset.objects.filter(process_stage = state or 'imaging') this should
return any Asset that is equal to the state variable or 'imaging' but
it is just returning the ones that are equal to state. I have testing
this in the ipython.py command line program and it works there but not
in my script.
testing it in ipython:
from hammer.models import *
asset = Asset.objects.filter(process_stage = state or 'imaging')
asset
out: [, ]

321562 is equal to state
321654 is equal to 'imaging'

if i do a print right under Asset.objects.filter(process_stage = state
or 'imaging')
i get []

WHY?

SORRY FOR ANY GRAMMAR THAT IS WRONG.

If you can help thinks if not thinks for looking.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: SQL VIEWs as Django Models for aggregation --- delete() issues with django.db.models.query: delete_objects

2007-07-16 Thread JeffH

Russ: Thanks for your reply!

1. I don't consider my views-as-models approach elegant at the
implementation level, but:
  * it is dead simple to use once set up (it's just the Django model
and database API)
  * it allows for limited aggregation support (views are created at
install time, so real ad hoc reporting would have to be done with
custom model methods)
  * it works with querysets since the aggregated columns are defined
as Django model fields, so presenting a table of aggregated data with
an arbitrary selection of rows only requires one actual database query
(versus many queries when iterating over instances invoking a model
method)
  * SQL code stays in SQL script files that are part of Django's
design (sqlinitialdata) and stays out of my python code
Ideally Django classes for the table and view functionality would
share a common ancestor so they share an API, and table-specific
behavior like delete_objects would be defined above the common (i.e.
SELECT) functionality. Realistically, such a refactoring is unlikely
before my next few projects are due (no sarcasm intended).

2. With hindsight, delete_objects() behavior of Django appears to be
specifically desired by the developers so I'll just change my working
copy to just check for a class attribute like "not_updatable", and
abort batch deletes for related object classes with that attribute.
Given the specific nature of my need (prevent cascading deletes of
views) it will be much more efficient than calling an empty delete()
method for each object.

3. That said, my delete_objects() hack was an attempt to solve the
more general problem of using an overridden delete() without any
special flags while allowing for the possibility of model subclassing
in the future, because it seemed that respecting an overridden
delete() was an important end in itself from an object integrity
perspective. I had hoped that the developers might be intrigued by the
concept behind the hack (checking once per related class whether a
user has overridden delete() and defaulting to the usual batch delete)
because of the inherent object-functionality-versus-database-
efficiency tension in an ORM. My hack offers options - the user can
choose to give up database speed for object-level functionality - and
options are always good as long as they are documented: "WARNING: Your
database may slow to a crawl if you override delete()!" Checking if
delete() was overridden is not a performance hit, so you don't lose
anything by offering the option. For my application, aggregate
reporting is far more common than deletion, so it needs to be
efficient and convenient to code.

4. Regarding documentation, I will put in a ticket for the
documentation on the relevant section
http://www.djangoproject.com/documentation/model-api/#overriding-default-model-methods
of the model-api page. That section invites people to override save()
and delete() but only discusses save() and the implication (by
omission) that overriding delete() is analogous is incorrect.

5. A big ongoing thanks to all of Django's contributors. You rock!

Thanks for reading this.

Cheers,
Jeff


On Jul 15, 1:24 am, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On 7/13/07, JeffH <[EMAIL PROTECTED]> wrote:
>
>
>
> > This post relates to two separate Django issues that intertwined for
> > me:
> > 1. Lack of aggregation support in Django's ORM
> > (I am delighted to 
> > seehttp://groups.google.com/group/django-developers/browse_thread/thread...
> > )
>
> For the record, I'm still keen to get aggregates supported in Django.
> After a few distractions along the way (the unicode and oracle branch
> merges), I believe Malcolm is currently working on the Query rewrite
> that is the prerequisite for aggregates. Hopefully I will get a chance
> to get some aggregates happening in the near future (but I've said
> that before... :-)
>
> > I would like to hear from others how they are dealing with #1 and what
> > their thoughts are about #2.
>
> When I need aggregates at the moment, I'm generally falling back into
> raw SQL, or occasionally using the extra() clause on a queryset. Using
> the 'extra' clause can get you where you want (annotated rows in a
> database) by adding items to the select clause, which will appear as
> extra attributes on objects from the query set.
>
> The difficulty comes in getting GROUP BY and HAVING clauses into your
> query. This is because Django doesn't currently have support for these
> clauses inside Q objects. You can cheat a little by exploiting the
> fact that WHERE clauses are the last in the chain, but it's not
> particularly robust approach to the problem.
>
> > Here goes:
> > Experimenting with ways to add aggregated database information into my
> > Django models, I came across a blog entry several weeks ago where the
> > author (my apologies for not having the reference to cite) said they
> > used VIEWs as Django Models, simply putting in the SQL code to drop
> > the table and create a like-named 

Re: How to make dictionary out of model instance

2007-07-16 Thread Niels

On Jul 16, 11:18 pm, Niels <[EMAIL PROTECTED]> wrote:

Grumble. Safari ate my code. That should read (new try...)

def instance_dict(i):
  return dict(map(
lambda a, b=i: (a, getattr(b, a)), [f.attname for f in
i._meta.fields]
  ))


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: How to make dictionary out of model instance

2007-07-16 Thread Niels

Or yet another option:

def instance_dict(i):
return dict(map(


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Unique=true

2007-07-16 Thread [EMAIL PROTECTED]

OK, fixed the above problem -- figured out that it was related to my
setting unique=True on a field. But that raises the larger question...

I have a bit of data that may or may not exist... a identifier on the
user that not all users will have, but if they DO have it, it needs to
be unique to that user. Apparently, unique=True isn't what I want,
because the second user without it throws the above duplicate entry
error, so how do I handle that?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Django and ActionScript 3 Templates

2007-07-16 Thread SamFeltus

I was wondering if anyone had used Django to generate ActionScript for
the MXMLC compiler?  I have been  tinkered with using TurboGears to
create/edit Flash movies.  Here is an example of the ongoing comical
experiment...

http://samfeltus.com/as3/mardi_gras.html

I'm considering writing some generic ActionScript templates that can
used to edit/generate Flash movies in Python web frameworks.  Perhaps
they would be useful.

Is there any preexisting work to build on?

Sam the Gardener


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



recursive relation

2007-07-16 Thread Lic. José M. Rodriguez Bacallao
How can I make a recursive one-to-many relation?

-- 
Lic. José M. Rodriguez Bacallao
Cupet
-
Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo
mismo.

Recuerda: El arca de Noe fue construida por aficionados, el titanic por
profesionales
-

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



RE: is there any host servers that supports Django based sites?

2007-07-16 Thread Sells, Fred

I suggest you contact webfaction or others and ask them to give you 1 month
of free hosting of a developed site, with the plan that your client would
then pay to have his stuff hosted there if he liked it.  After a few
successes, you might get them to give you a generic beta site.

> -Original Message-
> From: django-users@googlegroups.com
> [mailto:[EMAIL PROTECTED] Behalf Of Michael
> Sent: Sunday, July 15, 2007 10:38 AM
> To: Django users
> Subject: Re: is there any host servers that supports Django 
> based sites?
> Importance: Low
> 
> 
> 
> 
> 
> On 15 יולי, 17:18, Michael <[EMAIL PROTECTED]> wrote:
> > .:
> >
> > > > Webfaction django hosting rocks.
> >
> > can I get a link to Webfaction?
> 
> ok, I think I found it by myself
> http://www.webfaction.com/shared_hosting
> 
> so, as I understand, the best strategy is to host the clients product
> on my own server
> then to show the final product to the client, he likes it, and then I
> can convince him to use other hosting service (ie - webfraction)
> right?
> 
> It's a good idea, but the problem is that I'm kinda out of money
> paying every month to some hosting service would be a pain :)
> so, someone interested  to share with me his hosting service?
> I can pay him AFTER I sell the product
> 
> think about that- it may be easy money for you, I'm doing all the
> development on my comp, once the product is done, I upload it to your
> host, just for 1-2 days,  - if the client is happy, he pays me and I
> pay you, just for 1-2 days of hosting :)
> 
> 
> 
> > 

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



RE: is there any host servers that supports Django based sites?

2007-07-16 Thread Chris Brand

> can I run Django-based site on host provider that supports Python but
> has NO django installed??

You might find some useful information in this thread :
http://groups.google.com/group/django-users/browse_thread/thread/1c67d892907
d1abb/8fd08f175a11ac82?lnk=gst=httpd.conf=1#8fd08f175a11ac82

Chris



--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



template not raising error (newforms related ?)

2007-07-16 Thread olivier

Hi all,

I'm having some debugging issue with Django templating and newforms.
I'm using a form_for_model class, and I define a custom layout method,
in the vein of as_ul or as_table).
It looks like :

EntryForm = forms.form_for_model(models.Entry, form = CustomForm)

class CustomForm(forms.BaseForm):
def as_custom(self):
"""custom layout"""
...
# Error on purpose
assert 1 == 0
return "..."


Now, if I call {{entry_form.as_custom}} in my template, the more I can
get for debugging is TEMPLATE_STRING_IF_INVALID, but there is no way
Django tells me what is going wrong (in my case AssetionError at
line ...).

Am I missing something ? Some obscure setting maybe ;o) ?

I understand it's Django philosophy not to raise any error, but a
debugging trace, maybe in the server console, would be nice.

Cheers,

   Olivier


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: is there any host servers that supports Django based sites?

2007-07-16 Thread Tim Chase

> can someone please answer on my easy newbie question?
> can I run Django-based site on host provider that supports Python but
> has NO django installed??

This sounded kinda zen when I first heard it...running Django 
apps on a host without Django, sound of one hand clapping, and 
all that.

The important factors are the webserver interface (mod_python or 
fastcgi) and that python is available.  If your server meets 
these criteria, you can install django as it's only a bunch of 
python code that can be unzipped/untarred/"svn co"'ed in the 
directory of your choice.

There are other aspects such as required libraries (a python 
interface to your DB engine of choice/availability), but 
otherwise, there's minimal fuss.

A list of known Django-friendly webhosts is maintained at

http://code.djangoproject.com/wiki/DjangoFriendlyWebHosts

If you find one that isn't on the list that ends up working for 
you, it would be a service to add it to the wiki.

-tim





--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: is there any host servers that supports Django based sites?

2007-07-16 Thread Michael

can someone please answer on my easy newbie question?
can I run Django-based site on host provider that supports Python but
has NO django installed??


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Problem with James Bennett's django-registration

2007-07-16 Thread [EMAIL PROTECTED]

When I try to register as a user, I get:
IntegrityError at /registration/
(1062, "Duplicate entry '' for key 2")

Any ideas?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Can Google index Django's pages?

2007-07-16 Thread Joseph Heck

You can optimize a bit for Google as well by implementing a sitemap
(see: http://www.djangoproject.com/documentation/sitemaps/)

-joe

On 7/13/07, felixhummel <[EMAIL PROTECTED]> wrote:
>
> Thanks for this fine answer, Julio!
> Now nothing is going to hold me back! ;)
>
> On Jul 13, 8:22 pm, "Julio Nobrega" <[EMAIL PROTECTED]> wrote:
> >   hi Felix,
> >
> >   Yes, Google will index your website even if you use Django. The only
> > stuff that stop Google are the robots.txt, meta tags, and a direct
> > request. Don't worry, if you can access your website using a browser,
> > there's at least one link to it somewhere, and you didn't do any of
> > the three things I mentioned to stop Google, search engines will find
> > you.
> >
> > On 7/13/07, felixhummel <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > Hi!
> >
> > > Before I decide to dive into Django, could you please tell me if
> > > Google can crawl pages created by Django natively?
> > > I am running an Apache with mod_python. Does this matter?
> > > Thanks in advance!
> >
> > > Felix
> >
> > --
> > Julio Nobrega -http://www.inerciasensorial.com.br
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: flatpages issues

2007-07-16 Thread John-Scott Atlakson
Ah ha! I just looked through my settings.py file and noticed the setting:
SITE_ID = 1
I decided to double check the raw data for the django_sites table and my
site id is '2'. (I think id 1 used to be 'example.com' but I had deleted it
instead of renaming it, thus creating a mismatch with SITE_ID). Once I
changed the SITE_ID value everything started working. I deleted the item
from urlpatterns, and you're right, it's unnecessary. Thanks for attempting
to get me sorted out.

Cheers,
John-Scott.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Throwing error in admin using ManyToManyField(Site)

2007-07-16 Thread Jeff

SOLVED

Apparently, making a call to Site.objects.get_current() in your
models.py throws an error when loading a module in Admin.  Anyone have
an idea why?

On Jul 16, 12:14 pm, Jeff <[EMAIL PROTECTED]> wrote:
> Another note: if I comment out 'sites = models.ManyToManyField(Site)'
> from Team, it loads fine.  The same if I use it as a ForeignKey
> field.  I'm using the latest stable, 0.96.
>
> On Jul 16, 11:01 am, Jeff <[EMAIL PROTECTED]> wrote:
>
> > I'm throwing an error when loading the admin edit page for an instance
> > of a model.  The exception itself is a TypeError, "Cannot resolve
> > keyword 'team' into field."  It is being raised at db.models.query
> > line 938.  I've included the full trace below.
>
> > The model is Team, which has a ManyToMany relationship with Site, and
> > a ForeignKey field of Sport.  Both tables are below as well.
>
> > I can't for the life of me figure out what the problem is.  The team
> > has an entry under app_team_sites, the sport exists, and the site
> > listed in app_team_sites for the team exists.  Does anyone have any
> > ideas?  I don't see anything relevant on the django bug tracker.
>
> > Jeff
>
> > --- Models ---
>
> > class Sport(models.Model):
> > sport_name = models.CharField(maxlength=50, unique=True)
> > def __str__(self):
> > return self.sport_name
> > class Admin:
> > save_on_top = True
>
> > class Team(models.Model):
> > sites = models.ManyToManyField(Site)
> > sport = models.ForeignKey(Sport)
> > team_name = models.CharField(maxlength=75)
> > logo_url = models.URLField(verify_exists=True, blank=True)
> > def __str__(self):
> > return self.team_name
> > class Meta:
> > unique_together = (("sport", "team_name"),)
> > class Admin:
> > list_display = ['sport', 'team_name', 'logo_url']
> > list_display_links = ['sport', 'team_name', 'logo_url']
> > list_filter = ['sport', 'sites']
> > ordering = ['sport', 'team_name']
> > search_fields = ['sport', 'team_name']
> > save_on_top = True
>
> > --- Trace ---
>
> > Traceback (most recent call last):
> > File "/sw/lib/python2.5/site-packages/django/core/handlers/base.py" in
> > get_response
> >   77. response = callback(request, *callback_args, **callback_kwargs)
> > File "/sw/lib/python2.5/site-packages/django/contrib/admin/views/
> > decorators.py" in _checklogin
> >   55. return view_func(request, *args, **kwargs)
> > File "/sw/lib/python2.5/site-packages/django/views/decorators/
> > cache.py" in _wrapped_view_func
> >   39. response = view_func(request, *args, **kwargs)
> > File "/sw/lib/python2.5/site-packages/django/contrib/admin/views/
> > main.py" in change_stage
> >   363. new_data = manipulator.flatten_data()
> > File "/sw/lib/python2.5/site-packages/django/db/models/
> > manipulators.py" in flatten_data
> >   248. new_data.update(f.flatten_data(fol, obj))
> > File "/sw/lib/python2.5/site-packages/django/db/models/fields/
> > related.py" in flatten_data
> >   700. instance_ids = [instance._get_pk_val() for instance in
> > getattr(obj, self.name).all()]
> > File "/sw/lib/python2.5/site-packages/django/db/models/query.py" in
> > __iter__
> >   108. return iter(self._get_data())
> > File "/sw/lib/python2.5/site-packages/django/db/models/query.py" in
> > _get_data
> >   470. self._result_cache = list(self.iterator())
> > File "/sw/lib/python2.5/site-packages/django/db/models/query.py" in
> > iterator
> >   174. select, sql, params = self._get_sql_clause()
> > File "/sw/lib/python2.5/site-packages/django/db/models/query.py" in
> > _get_sql_clause
> >   484. joins2, where2, params2 = self._filters.get_sql(opts)
> > File "/sw/lib/python2.5/site-packages/django/db/models/query.py" in
> > get_sql
> >   648. joins2, where2, params2 = val.get_sql(opts)
> > File "/sw/lib/python2.5/site-packages/django/db/models/query.py" in
> > get_sql
> >   699. return parse_lookup(self.kwargs.items(), opts)
> > File "/sw/lib/python2.5/site-packages/django/db/models/query.py" in
> > parse_lookup
> >   831. joins2, where2, params2 = lookup_inner(path, lookup_type,
> > value, opts, opts.db_table, None)
> > File "/sw/lib/python2.5/site-packages/django/db/models/query.py" in
> > lookup_inner
> >   938. raise TypeError, "Cannot resolve keyword '%s' into field" %
> > name
>
> >   TypeError at /admin/pickem/team/1/
> >   Cannot resolve keyword 'team' into field


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Error from python manage.py syncdb

2007-07-16 Thread theju

Your postgresql database is not running.
So
$ su postgres
then go to the postgres user's home directory and then
$ postgres -D data/

The database server starts running...then try your syncdb...it'll
work.


Cheers
Thejaswi Puthraya


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: flatpages issues

2007-07-16 Thread Jacob Kaplan-Moss

On 7/16/07, John-Scott <[EMAIL PROTECTED]> wrote:
> Can someone in the know confirm or deny that adding the catch-all line
> to urls.py is in fact required to invoke flatpages?

No, it's not; the fallback middleware works fine for me. If it's not
working for you, chances are you've got something misconfigured; why
don't you post your settings.py and we'll take a look?

Jacob

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Throwing error in admin using ManyToManyField(Site)

2007-07-16 Thread Jeff

Another note: if I comment out 'sites = models.ManyToManyField(Site)'
from Team, it loads fine.  The same if I use it as a ForeignKey
field.  I'm using the latest stable, 0.96.

On Jul 16, 11:01 am, Jeff <[EMAIL PROTECTED]> wrote:
> I'm throwing an error when loading the admin edit page for an instance
> of a model.  The exception itself is a TypeError, "Cannot resolve
> keyword 'team' into field."  It is being raised at db.models.query
> line 938.  I've included the full trace below.
>
> The model is Team, which has a ManyToMany relationship with Site, and
> a ForeignKey field of Sport.  Both tables are below as well.
>
> I can't for the life of me figure out what the problem is.  The team
> has an entry under app_team_sites, the sport exists, and the site
> listed in app_team_sites for the team exists.  Does anyone have any
> ideas?  I don't see anything relevant on the django bug tracker.
>
> Jeff
>
> --- Models ---
>
> class Sport(models.Model):
> sport_name = models.CharField(maxlength=50, unique=True)
> def __str__(self):
> return self.sport_name
> class Admin:
> save_on_top = True
>
> class Team(models.Model):
> sites = models.ManyToManyField(Site)
> sport = models.ForeignKey(Sport)
> team_name = models.CharField(maxlength=75)
> logo_url = models.URLField(verify_exists=True, blank=True)
> def __str__(self):
> return self.team_name
> class Meta:
> unique_together = (("sport", "team_name"),)
> class Admin:
> list_display = ['sport', 'team_name', 'logo_url']
> list_display_links = ['sport', 'team_name', 'logo_url']
> list_filter = ['sport', 'sites']
> ordering = ['sport', 'team_name']
> search_fields = ['sport', 'team_name']
> save_on_top = True
>
> --- Trace ---
>
> Traceback (most recent call last):
> File "/sw/lib/python2.5/site-packages/django/core/handlers/base.py" in
> get_response
>   77. response = callback(request, *callback_args, **callback_kwargs)
> File "/sw/lib/python2.5/site-packages/django/contrib/admin/views/
> decorators.py" in _checklogin
>   55. return view_func(request, *args, **kwargs)
> File "/sw/lib/python2.5/site-packages/django/views/decorators/
> cache.py" in _wrapped_view_func
>   39. response = view_func(request, *args, **kwargs)
> File "/sw/lib/python2.5/site-packages/django/contrib/admin/views/
> main.py" in change_stage
>   363. new_data = manipulator.flatten_data()
> File "/sw/lib/python2.5/site-packages/django/db/models/
> manipulators.py" in flatten_data
>   248. new_data.update(f.flatten_data(fol, obj))
> File "/sw/lib/python2.5/site-packages/django/db/models/fields/
> related.py" in flatten_data
>   700. instance_ids = [instance._get_pk_val() for instance in
> getattr(obj, self.name).all()]
> File "/sw/lib/python2.5/site-packages/django/db/models/query.py" in
> __iter__
>   108. return iter(self._get_data())
> File "/sw/lib/python2.5/site-packages/django/db/models/query.py" in
> _get_data
>   470. self._result_cache = list(self.iterator())
> File "/sw/lib/python2.5/site-packages/django/db/models/query.py" in
> iterator
>   174. select, sql, params = self._get_sql_clause()
> File "/sw/lib/python2.5/site-packages/django/db/models/query.py" in
> _get_sql_clause
>   484. joins2, where2, params2 = self._filters.get_sql(opts)
> File "/sw/lib/python2.5/site-packages/django/db/models/query.py" in
> get_sql
>   648. joins2, where2, params2 = val.get_sql(opts)
> File "/sw/lib/python2.5/site-packages/django/db/models/query.py" in
> get_sql
>   699. return parse_lookup(self.kwargs.items(), opts)
> File "/sw/lib/python2.5/site-packages/django/db/models/query.py" in
> parse_lookup
>   831. joins2, where2, params2 = lookup_inner(path, lookup_type,
> value, opts, opts.db_table, None)
> File "/sw/lib/python2.5/site-packages/django/db/models/query.py" in
> lookup_inner
>   938. raise TypeError, "Cannot resolve keyword '%s' into field" %
> name
>
>   TypeError at /admin/pickem/team/1/
>   Cannot resolve keyword 'team' into field


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Spawning Subprocesses under mod_python

2007-07-16 Thread Giovanni Giorgi

I have used the subprocess module with success.
I have used it only on command line based script under Linux, but I
think it can work inside mod_python.
If you plan to use it I suggest you to reboot the apache one a day, to
prevent yourself againt resource and/or memory leaks.


On Jul 16, 9:25 am, "Nimrod A. Abing" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm just wondering if anyone has any experiences spawning subprocesses
> under mod_python on Linux/Unix. My specific use case is something in
> the line of an os.system() call with the exception that I will be
> using its replacement using Popen() as detailed here:
>
> http://www.python.org/doc/2.4.3/lib/node243.html
>
> I want to be able to retrieve the results of the subprocess (file
> command) as it is printed on STDOUT and STDERR.
>
> I found this thread from 2006 but it talks about spawning a daemon
> process from mod_python. My case is a bit different I think as I only
> want to execute an external subprocess, capture its output and have
> mod_python go on its merry way.
>
> http://www.modpython.org/pipermail/mod_python/2006-February/020225.html
>
> Anyone else with success/horror stories to tell about spawning
> subprocesses under mod_python please share :)
>
> Thanks in advance.
> --
> _nimrod_a_abing_
>
> http://abing.gotdns.com/http://www.preownedcar.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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Meeting of Python users in Munich

2007-07-16 Thread Marek Kubica

Hi Pythoneers in and around Munich!

On Wednesday the 18th of July there is going to be a Python user meeting
in Munich to which all Django users are invited as well. If you're
interested, here's the original announcement:



I hope to see some of you there :)

regards,
Marek


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: flatpages issues

2007-07-16 Thread John-Scott

Can someone in the know confirm or deny that adding the catch-all line
to urls.py is in fact required to invoke flatpages? I checked out the
source for djangoproject.com and it has this as the last item in
urlpatterns:

(r'', include('django.contrib.flatpages.urls')),

If this is required, should I file a ticket on the documentation to
get this included in the instructions?

Thanks.

j-s


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Throwing error in admin using ManyToManyField(Site)

2007-07-16 Thread Jeff

I'm throwing an error when loading the admin edit page for an instance
of a model.  The exception itself is a TypeError, "Cannot resolve
keyword 'team' into field."  It is being raised at db.models.query
line 938.  I've included the full trace below.

The model is Team, which has a ManyToMany relationship with Site, and
a ForeignKey field of Sport.  Both tables are below as well.

I can't for the life of me figure out what the problem is.  The team
has an entry under app_team_sites, the sport exists, and the site
listed in app_team_sites for the team exists.  Does anyone have any
ideas?  I don't see anything relevant on the django bug tracker.

Jeff

--- Models ---

class Sport(models.Model):
sport_name = models.CharField(maxlength=50, unique=True)
def __str__(self):
return self.sport_name
class Admin:
save_on_top = True

class Team(models.Model):
sites = models.ManyToManyField(Site)
sport = models.ForeignKey(Sport)
team_name = models.CharField(maxlength=75)
logo_url = models.URLField(verify_exists=True, blank=True)
def __str__(self):
return self.team_name
class Meta:
unique_together = (("sport", "team_name"),)
class Admin:
list_display = ['sport', 'team_name', 'logo_url']
list_display_links = ['sport', 'team_name', 'logo_url']
list_filter = ['sport', 'sites']
ordering = ['sport', 'team_name']
search_fields = ['sport', 'team_name']
save_on_top = True

--- Trace ---

Traceback (most recent call last):
File "/sw/lib/python2.5/site-packages/django/core/handlers/base.py" in
get_response
  77. response = callback(request, *callback_args, **callback_kwargs)
File "/sw/lib/python2.5/site-packages/django/contrib/admin/views/
decorators.py" in _checklogin
  55. return view_func(request, *args, **kwargs)
File "/sw/lib/python2.5/site-packages/django/views/decorators/
cache.py" in _wrapped_view_func
  39. response = view_func(request, *args, **kwargs)
File "/sw/lib/python2.5/site-packages/django/contrib/admin/views/
main.py" in change_stage
  363. new_data = manipulator.flatten_data()
File "/sw/lib/python2.5/site-packages/django/db/models/
manipulators.py" in flatten_data
  248. new_data.update(f.flatten_data(fol, obj))
File "/sw/lib/python2.5/site-packages/django/db/models/fields/
related.py" in flatten_data
  700. instance_ids = [instance._get_pk_val() for instance in
getattr(obj, self.name).all()]
File "/sw/lib/python2.5/site-packages/django/db/models/query.py" in
__iter__
  108. return iter(self._get_data())
File "/sw/lib/python2.5/site-packages/django/db/models/query.py" in
_get_data
  470. self._result_cache = list(self.iterator())
File "/sw/lib/python2.5/site-packages/django/db/models/query.py" in
iterator
  174. select, sql, params = self._get_sql_clause()
File "/sw/lib/python2.5/site-packages/django/db/models/query.py" in
_get_sql_clause
  484. joins2, where2, params2 = self._filters.get_sql(opts)
File "/sw/lib/python2.5/site-packages/django/db/models/query.py" in
get_sql
  648. joins2, where2, params2 = val.get_sql(opts)
File "/sw/lib/python2.5/site-packages/django/db/models/query.py" in
get_sql
  699. return parse_lookup(self.kwargs.items(), opts)
File "/sw/lib/python2.5/site-packages/django/db/models/query.py" in
parse_lookup
  831. joins2, where2, params2 = lookup_inner(path, lookup_type,
value, opts, opts.db_table, None)
File "/sw/lib/python2.5/site-packages/django/db/models/query.py" in
lookup_inner
  938. raise TypeError, "Cannot resolve keyword '%s' into field" %
name

  TypeError at /admin/pickem/team/1/
  Cannot resolve keyword 'team' into field


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Error from python manage.py syncdb

2007-07-16 Thread John Dey

Russ,

Thanks for your response.  I changed the django port from 5433 (Linux 
Journal--July 2007) to 5432 and the tables were created.  Thanks again.

John
On Jul 16, 2007, at 9:39 AM, Russell Keith-Magee wrote:

>
> On 7/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>
>> Is the server running locally and accepting
>> connections on Unix domain socket "/tmp/.s.PGSQL.5433"?
>
> This is a Postgres error, telling you that the psycopg can't connect
> to the Postgres DB.
>
> You need to play around with your pg_hba.conf and/or postgres.conf
> files to set up appropriate permissions for access. See the Postgres
> documentation for details on what you need to do.
>
> For Django purposes, the debug check is that you must be able to call:
>
>> psql -U USERNAME -h HOST -p PORT -d DATABASE_NAME
>
> where USERNAME, HOST, PORT, and DATABASE_NAME are the values in your
> Django settings file.
>
> Yours,
> Russ Magee %-)
>
> >


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: HttpResponseRedirect and IE6

2007-07-16 Thread Bob Dively

I'm also having a problem with redirecting and IE6. User enters data
in an HTML form, clicks save button and gets IE's "The page cannot be
displayed" error. In this case the initial URL is /household123/client/
add/ and the browser should be redirected to /household123/. However,
the URL is is still /household123/client/add/ when the IE error page
is displayed. If page is refreshed, a blank HTML form is displayed (as
one would expect). The original record was successfully saved to the
DB. The behavior happens only intermittently - probably 3 times out of
4 the redirection happens as expected. IE 6 on WinXP with Django
running on Win2003 with Apache 2.2 listening on port 8080. Code
below.

I have some suspicion that an Apache misconfiguration is at fault as
I'm also experiencing problems with CSS includes and images not being
properly rendered, as if the browser has requested them but the server
hasn't served them. For example, if I'm on a page that's properly
displayed and refresh that page 5 times in a row, the browser might
not render the CSS one of those times, even though the files are all
there and nothing has changed between refreshes. This problem occurs
with both Firefox and IE, whereas the redirection issue happens only
with IE.

def add(request, household_id):

  ClientForm = forms.models.form_for_model(Client)

 
ClientForm.base_fields['Birth_Dat'].widget=forms.widgets.TextInput(attrs={'class':'w8em
format-m-d-y divider-slash no-transparency' })
 
ClientForm.base_fields['Intake_Dat'].widget=forms.widgets.TextInput(attrs={'class':'w8em
format-m-d-y divider-slash no-transparency' })

  if request.method == 'POST':
f = ClientForm(request.POST)
if f.is_valid():
  f2 = f.save(commit=False)
  f2.Add_Dat = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
  f2.Add_User = request.user.username
  f2.household_id = household_id
  f2.save()
  return HttpResponseRedirect('/household' + household_id + '/')
  else:
f = ClientForm()

  return render_to_response('client_form.html', {'form': f, 'request':
request, 'media_url': settings.MEDIA_URL} )


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



memcached Cookie Problems

2007-07-16 Thread Alexander

Hi,

I'm currently streamlining my django app for speed. I'm using
memcached on my server (apache, django svn trunk version: 5718) with
the following settings.py:
CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
CACHE_MIDDLEWARE_SECONDS = 180
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.cache.CacheMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.doc.XViewMiddleware',
)

>From my understanding should everything work fine, even with
authentication and sessions. But sessions and login/logout does not
work properly, which means that I can login and logout once ... but if
I try to login a second time (within the 180 secs cache timeout)
django won't set a session (test) cookie for the first request and
therefore failing to authenticate the user at the 2nd request (the
actual POST with the login data), because it thinks the browser does
not support cookies. As you can see below at  "Debug Header 1, 2".

The debug log output from funkload (very good web app testing tool by
the way) is the following:
 snip 
test_app (test_app.app) ...
test_app: Starting ---
test_app: setUp
test_app: GET: http://www.myapp.intern/account/login/
Page 1: LOGIN: Get login page ...
test_app:  Done in 0.021s
test_app:  Load css and images...
test_app:   Done in 0.303s

Debug Header 1:

Date: Mon, 16 Jul 2007 15:39:17 GMT
Server: Apache/2.2.3 (Ubuntu) mod_wsgi/1.0-TRUNK Python/2.5.1
Content-Language: en
Expires: Mon, 16 Jul 2007 15:39:31 GMT
Vary: Cookie
Last-Modified: Mon, 16 Jul 2007 15:36:31 GMT
ETag: a0110f933c8d33582ef250825805e763
Cache-Control: max-age=180
Connection: close
Content-Type: text/html; charset=utf-8

test_app: POST: http://www.myapp.intern/account/login/ [('username',
'alex'), ('password', 'passwd'), ('this_is_the_login_form', '1'),
('post_data', ''), ('submit', 'Log in')]
Page 2: LOGIN: log in user alex ...
test_app:  Done in 0.053s
test_app:  Load css and images...
test_app:   Done in 0.000s

Debug Header 2:

Date: Mon, 16 Jul 2007 15:39:17 GMT
Server: Apache/2.2.3 (Ubuntu) mod_wsgi/1.0-TRUNK Python/2.5.1
Vary: Cookie
Content-Language: en
Set-Cookie:  sessionid=a494250077597d75ac89b65061982616;
Domain=.myapp.intern; expires=Tue, 17-Jul-2007 15:39:17 GMT; Max-
Age=86400; Path=/
Connection: close
Content-Type: text/html; charset=utf-8
---
 snap 


After waiting for 180 secs (or until my cache is expired) everything
works correctly again ... (just for the first request)
The questions here is: Is it a bug ... or is it feature?

Thanks for helping

  Best regards

   Alexander


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



generic views and selection for foreignkey

2007-07-16 Thread Przemek Gawronski

Hi, in the model I've got:

class Client(models.Model):
   name = models.CharField(maxlength=200)

class Workorder(models.Model):
   client = models.ForeignKey(Client)
   name = models.CharField(maxlength=200)

As for input I'm using generic views (create_update.create_object,..).
How can I get an selection widget in the form for Workorders with a list
of clients? Is there an automatic way to do it (like in the admin panel)?

Przemek
-- 
AIKIDO TANREN DOJO  -   Poland - Warsaw - Mokotow - Ursynow - Natolin
info: http://www.tanren.pl/ phone: +4850151 email: [EMAIL PROTECTED]

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Error from python manage.py syncdb

2007-07-16 Thread Russell Keith-Magee

On 7/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Is the server running locally and accepting
> connections on Unix domain socket "/tmp/.s.PGSQL.5433"?

This is a Postgres error, telling you that the psycopg can't connect
to the Postgres DB.

You need to play around with your pg_hba.conf and/or postgres.conf
files to set up appropriate permissions for access. See the Postgres
documentation for details on what you need to do.

For Django purposes, the debug check is that you must be able to call:

> psql -U USERNAME -h HOST -p PORT -d DATABASE_NAME

where USERNAME, HOST, PORT, and DATABASE_NAME are the values in your
Django settings file.

Yours,
Russ Magee %-)

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: ip to location

2007-07-16 Thread cesco

Thanks but I was asking for something more precise, like latitude and
longitude (approximated, of course) rather than the country which
would be too vague for my application. Any other suggestion?

Thanks again

On Jul 16, 1:07 pm, xaranduu <[EMAIL PROTECTED]> wrote:
> cesco schrieb:
>
> > Hi,
>
> > does anyone in the django community know of a public algorithm to get
> > the location from the ip.
> > If such a thing doesn't exist do you know of a service with an API
> > which does it?
> > Or maybe such a functionality will be available with the upcoming
> > Geodjango?
>
> > Many thanks
> > Francesco
>
> Coulix has a cool solution to your topic. He has small apllication
> that can handle the mapping.
> And he points to some files which provide a ip2country mapping and
> country flags for you.
>
> http://coulix.net/blog/2006/aug/17/ip-country-flags-django-comments/


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Efficient reverse access on ForeignKey?

2007-07-16 Thread Russell Keith-Magee

On 7/16/07, jj <[EMAIL PROTECTED]> wrote:
>
> Excellent, this works!
>
> Now, probably the documentation is misleading. From documentation/db-
> api:
>
> 
> You cannot access a reverse ForeignKey Manager from the class; it
> must be accessed from an instance. Example:
> Blog.entry_set # Raises AttributeError: "Manager must be
> accessed via instance".
> 

You're looking at the wrong bit of documentation. Your problem isn't
about accessing data via a manager - it's about composing queries. The
relevant bit is here:

http://www.djangoproject.com/documentation/db-api/#lookups-that-span-relationships

Yours,
Russ Magee %-)

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Error from python manage.py syncdb

2007-07-16 Thread jsdey

Can't set tables using 'python manage.py syncdb'.  -- Version .96 of
django; server started on 8080; can see django page from browser.
Created postgresql database 'aft' for user 'robo7' now password; set
settings.py error from syncdb option:

[EMAIL PROTECTED] mysite]$ python manage.py syncdb
Traceback (most recent call last):
  File "manage.py", line 11, in 
execute_manager(settings)
  File "/usr/lib/python2.5/site-packages/django/core/management.py",
line 1672, in execute_manager
execute_from_command_line(action_mapping, argv)
  File "/usr/lib/python2.5/site-packages/django/core/management.py",
line 1571, in execute_from_command_line
action_mapping[action](int(options.verbosity),
options.interactive)
  File "/usr/lib/python2.5/site-packages/django/core/management.py",
line 504, in syncdb
cursor = connection.cursor()
  File "/usr/lib/python2.5/site-packages/django/db/backends/postgresql/
base.py", line 80, in cursor
self.connection = Database.connect(conn_string, **self.options)
psycopg.OperationalError: could not connect to server: No such file or
directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5433"?

I am new to django and would appreciate any assistance.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Efficient reverse access on ForeignKey?

2007-07-16 Thread jj

Excellent, this works!

Now, probably the documentation is misleading. From documentation/db-
api:


You cannot access a reverse ForeignKey Manager from the class; it
must be accessed from an instance. Example:
Blog.entry_set # Raises AttributeError: "Manager must be
accessed via instance".


I don't think I saw elsewhere that '_set' had not to be used.

Anyway, thanks Russ,

JJ.

On Jul 16, 1:13 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On 7/16/07, jj <[EMAIL PROTECTED]> wrote:
>
>
>
> > Now I'd like to restrict the query to books which have been printed in
> > 'Holland':
> > q = q.filter(foreign_print_set__country='Holland')
>
> Try:
>
>  q = q.filter(foreignprint__country='Holland')
>
> foreignprint doesn't get an underscore unless it is defined that way;
> the _set suffix is not used when composing queries.
>
> Yours,
> Russ Magee %-)


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: How to make dictionary out of model instance

2007-07-16 Thread [EMAIL PROTECTED]

On Jul 16, 11:53 am, Eratothene <[EMAIL PROTECTED]> wrote:
> I need to make dictionary out of django.auth.model.User instance in
> such format:

What about using vars()

>>> from foo.main.models import *
>>> d = District()
>>> vars(d)
{'id': None, 'borough_id': None, 'name': ''}
>>>

L.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Flash Message template tag

2007-07-16 Thread James Bennett

On 7/15/07, rtconner <[EMAIL PROTECTED]> wrote:
> So one of the (very few) things I had not been happy with regarding
> Django is its flash message handling. So I wrote something that would
> make me happy. Its just a template tag add-on. Since so far Django has
> been so great to me, I wanted to give a little bit back. So I don't
> know where to post this but I thought I'd post a message letting you
> all know about it.

Out of curiosity, what were you disappointed with? The common
complaint (and one that needs to be fixed) is that the current system
only works with authenticated users, but if there are more problems
I'd be interested to hear them.


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Improve the dynamic generation of a form with newforms library

2007-07-16 Thread yml

Hello Djangonauts,

After spending sometimes to learn using the test/fail/correct cycle I
have finally reach a point where I have something that more or less do
what I want. However since one of the objectives of the project I am
working on was to improve my knowledge on django I would like to read
from you how to improve what I have done.

The goal is to generate dynamically a form using the newforms
library.
This forms should all the user to create an Interview
(models.py:http://dpaste.com/hold/14560/ )
What I have done so far is create this custom form:

class AnswerPollForm(forms.Form):
def __init__(self, poll_id, *args, **kwargs):
super(AnswerPollForm, self).__init__(*args, **kwargs)
self.poll = Poll.objects.get(id=poll_id)
for c in self.poll.choice_set.iterator():
self.fields[c.id] =
forms.BooleanField(label=c.choice,required=False)

  That I use in this view (http://dpaste.com/hold/14562/). The
interesting part is that I create a list of tuple made with the polls
and the forms representing them. This allow  me to create a single
form that I can use to collect the interview to a survey.

list_answer_forms =[]
for poll in survey.poll_set.iterator():
list_answer_forms.append((poll,AnswerPollForm(poll.id)))
[...]
return render_to_response('dj_survey/template/
add_interview_forms.html',
  {'list_answer_forms':
list_answer_forms,
  'survey': survey,
  'request': request})

This list of forms is then used in the following template:
Welcome to {{ survey.name }}
{{ survey.description }} 

{% for poll,form in list_answer_forms %}
{{ poll.title }} | {{ poll.question }}

{{ form.as_ul }}

{% endfor %}
 



 This is not bat but i would prefer if instead of the list of tuple
containing my forms could directly instantiate a "all in one" form.
 This would avoid the loop on list_answer_forms. This is were I get
stuck. Could you please let me know how to add html text between the
field?
 like "{{ poll.title }} | {{ poll.question }}"

 Any other improvement is more than welcome.
 Thank you for your time.

 Regards,


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: About create a database table dynamicly

2007-07-16 Thread Ned Batchelder
Nick, if all of your dynamically-created tables in fact have the same 
schema (set of columns), then you definitely should make one table for 
all your users to share.  Be sure to index the columns that will be used 
in your WHERE clauses, and your table will perform fine.

--Ned.

Malcolm Tredinnick wrote:
> On Sun, 2007-07-15 at 23:37 +0800, nick feng wrote:
>   
>> Hi Ned,
>>  
>> Thanks for your reply.
>> First, your question is my doubt.
>> And my problem is, if I did the same thing as you said, I will create
>> a table contains a great deal of data in it, this may cause the
>> "select" operation very slow, the users may feel it hard to suffer
>> from
>> 
>
> Database tables can contain millions and millions of rows and they will
> still perform quickly. You are trying to do something that is very
> fragile to avoid doing something that databases are designed to handle.
> Don't optimise prematurely.
>
> Regards,
> Malcolm
>
>
>   

-- 
Ned Batchelder, http://nedbatchelder.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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: How to make dictionary out of model instance

2007-07-16 Thread Russell Keith-Magee

On 7/16/07, Eratothene <[EMAIL PROTECTED]> wrote:
>
> I need to make dictionary out of django.auth.model.User instance in
> such format:
>
> {'username':'val1', 'password':'val2', 'email':'',
> 'first_name':'val3', 'last_name':'val4' ...}
>
> In order to populate this data in to the custom form. I have read all
> documentation available in order to resolve this simple task, how to
> make it?

The __dict__ option described elsewhere will work, but could introduce
some interesting name clashes (depending on the exact names in use).

Another option is to use the values() clause on a queryset. This
modifies a query set to return a dictionary of values, rather than a
list of objects (or a single object, in the case of get):

>>> User.objects.values('username','email').get(pk=1)
{'username': u'freakboy', 'email': u'[EMAIL PROTECTED]'}

Yours,
Russ Magee %-)

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Efficient reverse access on ForeignKey?

2007-07-16 Thread Russell Keith-Magee

On 7/16/07, jj <[EMAIL PROTECTED]> wrote:
>
> Now I'd like to restrict the query to books which have been printed in
> 'Holland':
> q = q.filter(foreign_print_set__country='Holland')

Try:

 q = q.filter(foreignprint__country='Holland')

foreignprint doesn't get an underscore unless it is defined that way;
the _set suffix is not used when composing queries.

Yours,
Russ Magee %-)

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: ip to location

2007-07-16 Thread xaranduu


cesco schrieb:
> Hi,
>
> does anyone in the django community know of a public algorithm to get
> the location from the ip.
> If such a thing doesn't exist do you know of a service with an API
> which does it?
> Or maybe such a functionality will be available with the upcoming
> Geodjango?
>
> Many thanks
> Francesco


Coulix has a cool solution to your topic. He has small apllication
that can handle the mapping.
And he points to some files which provide a ip2country mapping and
country flags for you.

http://coulix.net/blog/2006/aug/17/ip-country-flags-django-comments/


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: permalink decorator

2007-07-16 Thread Robert

On 16 Lip, 11:51, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> Although you give the traceback, you don't say what exception is raised.
> So it's hard to guess.
>
> A first step to debug this would be to try it at the interactive prompt
> ("manage.py shell") and see what happens when you call
> get_absolute_url() on some model instances.

Thank you Malcolm! It's fixed!

The exception was:

Exception Type: SyntaxError
Exception Value:invalid syntax (urls.py, line 24)

Caught an exception while rendering: invalid syntax (urls.py, line 24)

I've looked into the post urls.py many times!!


I've used the manage.py shell and there I could see a full path to the
urls.py
which was my user_details/urls.py.

Weird.. it worked fine when not using permalink..

Also, I've had some regexp errors in urls.py (urlresolve() couldn't
resolve it).
All fixed, and working.

Will look into the manage.py shell next time before posting :-)

Thanks again for help, and for unicode branch.

--
Robert





--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: How to make dictionary out of model instance

2007-07-16 Thread Eratothene

Really dirty way! But IT DOES WORK, and it is so simple.

Thanks a lot Ben van Staveren


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: How to make dictionary out of model instance

2007-07-16 Thread Ben van Staveren

If you have an instance, you could just do:

myUserModelInstance.__dict__ -- that'll get you the data you want,  
and a bunch of extra stuff you most likely don't want. I don't really  
recommend doing this either, since it's not "the right way" IMO, but  
it solves your problem.

On 16/07/2007, at 4:53 PM, Eratothene wrote:

>
> I need to make dictionary out of django.auth.model.User instance in
> such format:
>
> {'username':'val1', 'password':'val2', 'email':'',
> 'first_name':'val3', 'last_name':'val4' ...}
>
> In order to populate this data in to the custom form. I have read all
> documentation available in order to resolve this simple task, how to
> make it?
>
>
> >


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



How to make dictionary out of model instance

2007-07-16 Thread Eratothene

I need to make dictionary out of django.auth.model.User instance in
such format:

{'username':'val1', 'password':'val2', 'email':'',
'first_name':'val3', 'last_name':'val4' ...}

In order to populate this data in to the custom form. I have read all
documentation available in order to resolve this simple task, how to
make it?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: permalink decorator

2007-07-16 Thread Malcolm Tredinnick

On Mon, 2007-07-16 at 09:41 +, Robert wrote:
> Hello,
> 
> I would like to use the permalink decorator for get_absolute_url
> method.
> 
> Here's the code:
> 
> There's a 'Post' model with 'created' -> models.DateTimeField()
> field.. (and others)
> 
> @models.permalink
> get_absolute_url(sefl):
>  return (post_detail, None, {
> 'year'  : self.created.year,
> 'month' : self.created.month,
> 'day'   : self.created.day,
> })
> 
> 
> urls.py
> 
> (r'^(?P\d{4})/(?P\d{2})/(?P\d{2})/(?P[-\w]+)/
> $', post_detail, dict(post_date_dict, slug_field='slug'))
> 
> 
> when trying to use get_absolute_url in my template
> {{ post.get_absolute_url }} I get:
> 
> Traceback (most recent call last):
[...]
>   245. self._urlconf_module = __import__(self.urlconf_name, {}, {},
> [''])

Although you give the traceback, you don't say what exception is raised.
So it's hard to guess.

A first step to debug this would be to try it at the interactive prompt
("manage.py shell") and see what happens when you call
get_absolute_url() on some model instances.

Regards,
Malcolm

-- 
I've got a mind like a... a... what's that thing called? 
http://www.pointy-stick.com/blog/


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



permalink decorator

2007-07-16 Thread Robert

Hello,

I would like to use the permalink decorator for get_absolute_url
method.

Here's the code:

There's a 'Post' model with 'created' -> models.DateTimeField()
field.. (and others)

@models.permalink
get_absolute_url(sefl):
 return (post_detail, None, {
'year'  : self.created.year,
'month' : self.created.month,
'day'   : self.created.day,
})


urls.py

(r'^(?P\d{4})/(?P\d{2})/(?P\d{2})/(?P[-\w]+)/
$', post_detail, dict(post_date_dict, slug_field='slug'))


when trying to use get_absolute_url in my template
{{ post.get_absolute_url }} I get:

Traceback (most recent call last):
File "c:\django_src\django\template\__init__.py" in render_node
  754. result = node.render(context)
File "c:\django_src\django\template\defaulttags.py" in render
  134. nodelist.append(node.render(context))
File "c:\django_src\django\template\__init__.py" in render
  790. return self.filter_expression.resolve(context)
File "c:\django_src\django\template\__init__.py" in resolve
  582. obj = resolve_variable(self.var, context)
File "c:\django_src\django\template\__init__.py" in resolve_variable
  680. current = current()
File "c:\django_src\django\utils\functional.py" in _curried
  3. return _curried_func(*(args+moreargs), **dict(kwargs,
**morekwargs))
File "c:\django_src\django\db\models\base.py" in get_absolute_url
  457. return settings.ABSOLUTE_URL_OVERRIDES.get('%s.%s' %
(opts.app_label, opts.module_name), func)(self)
File "c:\django_src\django\db\models\__init__.py" in inner
  27. return reverse(bits[0], None, *bits[1:3])
File "c:\django_src\django\core\urlresolvers.py" in reverse
  290. return iri_to_uri(u'/' +
get_resolver(urlconf).reverse(viewname, *args, **kwargs))
File "c:\django_src\django\core\urlresolvers.py" in reverse
  275. if lookup_view in self.reverse_dict:
File "c:\django_src\django\core\urlresolvers.py" in _get_reverse_dict
  212. for key, value in pattern.reverse_dict.iteritems():
File "c:\django_src\django\core\urlresolvers.py" in _get_reverse_dict
  209. if not self._reverse_dict and hasattr(self.urlconf_module,
'urlpatterns'):
File "c:\django_src\django\core\urlresolvers.py" in
_get_urlconf_module
  245. self._urlconf_module = __import__(self.urlconf_name, {}, {},
[''])

Where's the problem ?

Thanks!

Robert


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Site framework

2007-07-16 Thread Glebb

On 12 heinä, 05:30, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On 7/11/07, Glebb <[EMAIL PROTECTED]> wrote:
>
>
> I'm not aware of anything that would be causing this sort of problem.
> To help you debug, we will need to see some actual code - 'it
> complains' isn't really that helpful as debugging information.

It seems the problem mysteriously went away. Now it works just like I
imagined it would. I have no idea why it didn't work at first. I
obviously changed something but I just don't understand what it was.
Oh well, nevermind.. but thank you anyway.

Glebb


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Make Money through Internet

2007-07-16 Thread [EMAIL PROTECTED]

http://www.makemoneyadsense.bravehost.com

Check out this website. It is a free guide to create a free website
and make money through Google adsense and some other simillar ad
programs. It also tells about sites for get paid to click ADs, get
paid to post discussions, blogs, comments and photos.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Efficient reverse access on ForeignKey?

2007-07-16 Thread jj

Suppose I'm building a large complex query on a Book (via the HTTP
query string -details omitted):
q = Book.objects
if year:
q = q.filter(publication_date__year=year)
if month:
q = q.filter(publication_date__month=month)
etc. (more complex queries in practice)

Now I'd like to restrict the query to books which have been printed in
'Holland':
q = q.filter(foreign_print_set__country='Holland')

where:
class ForeignPrint(models.Model):
book = ForeignKey(Book)
country = CharField()

But this is not possible on ForeignKeys. Reverse access only works for
instances, not managers.

How can I do this efficiently?

JJ.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



ip to location

2007-07-16 Thread cesco

Hi,

does anyone in the django community know of a public algorithm to get
the location from the ip.
If such a thing doesn't exist do you know of a service with an API
which does it?
Or maybe such a functionality will be available with the upcoming
Geodjango?

Many thanks
Francesco


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Two huge forms delema

2007-07-16 Thread Eratothene

It did worked!

class A(forms.Form)
  a = field
  b = field

class B(A)
  c = field
  def __init__(self):
super(B, self).__init__()
del self.fields[a]


On Jul 15, 7:49 pm, Nathaniel Whiteinge <[EMAIL PROTECTED]> wrote:
> I don't have much experience with sub-classing forms, but I suspect
> `del self.fields[a]` should do the trick. Let us know!
>
> - whiteinge
>


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: is there any host servers that supports Django based sites?

2007-07-16 Thread Nicola Larosa

> Michael wrote:
>> I can convince him to use other hosting service (ie - webfraction)

Carl Karsten wrote:
> at the final location (webfraction)

Il looks like a few people need to look up the difference between "faction"
and "fRaction". ;-)


> Not sure I would recommend installing apache on your 
> client's computer, but that is between you and them.

...and about, what, other five thousand people? No, make that the whole
intarweb! ;-)


-- 
Nicola Larosa - http://www.tekNico.net/



--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: About create a database table dynamicly

2007-07-16 Thread Malcolm Tredinnick

On Sun, 2007-07-15 at 23:37 +0800, nick feng wrote:
> Hi Ned,
>  
> Thanks for your reply.
> First, your question is my doubt.
> And my problem is, if I did the same thing as you said, I will create
> a table contains a great deal of data in it, this may cause the
> "select" operation very slow, the users may feel it hard to suffer
> from

Database tables can contain millions and millions of rows and they will
still perform quickly. You are trying to do something that is very
fragile to avoid doing something that databases are designed to handle.
Don't optimise prematurely.

Regards,
Malcolm


-- 
Borrow from a pessimist - they don't expect it back. 
http://www.pointy-stick.com/blog/


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Spawning Subprocesses under mod_python

2007-07-16 Thread Nimrod A. Abing

Hello,

I'm just wondering if anyone has any experiences spawning subprocesses
under mod_python on Linux/Unix. My specific use case is something in
the line of an os.system() call with the exception that I will be
using its replacement using Popen() as detailed here:

http://www.python.org/doc/2.4.3/lib/node243.html

I want to be able to retrieve the results of the subprocess (file
command) as it is printed on STDOUT and STDERR.

I found this thread from 2006 but it talks about spawning a daemon
process from mod_python. My case is a bit different I think as I only
want to execute an external subprocess, capture its output and have
mod_python go on its merry way.

http://www.modpython.org/pipermail/mod_python/2006-February/020225.html

Anyone else with success/horror stories to tell about spawning
subprocesses under mod_python please share :)

Thanks in advance.
-- 
_nimrod_a_abing_

http://abing.gotdns.com/
http://www.preownedcar.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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---