Re: how to set default value as current time in TimeField

2010-02-15 Thread Masklinn
On 16 Feb 2010, at 08:37 , Masklinn wrote:
> 
> On 16 Feb 2010, at 08:13 , harryos wrote:
>> 
>> hi
>> I am using a TimeField and want to set the default value as current
>> time.I know the field normalizes to a datetime.time object.In a
>> DateField ,I can put (default=datetime.date.today) and this will set
>> the current day .Similarly I tried (default=datetime.now().time) for
>> TimeField ..and can get a default time value when the page is
>> loaded.But after waiting for a couple of minutes,I   loaded the page
>> again(without restarting the server) and the timevalue shown was the
>> old one ,not current time.
> 
> Argument are only evaluated once, so `default=datetime.now().time` sets the 
> default to the `datetime.now().time` as it is when evaluated. Once.
> 
> Just wrap the thing in a `lambda` and you should be good to go: 
> `default=(lambda:datetime.now().time)`


*defaults*, not arguments of course.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: how to set default value as current time in TimeField

2010-02-15 Thread harryos
thanks ,that worked..

any idea about calculating the duration? I can do a - between two
datetime.datetime objects to get a timedelta.. but that doesn't work
with datetime.time objects

harry


On Feb 16, 12:37 pm, Masklinn  wrote:
> Just wrap the thing in a `lambda` and you should be good to go: 
> `default=(lambda:datetime.now().time)`

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: how to set default value as current time in TimeField

2010-02-15 Thread Masklinn
On 16 Feb 2010, at 08:13 , harryos wrote:
> 
> hi
> I am using a TimeField and want to set the default value as current
> time.I know the field normalizes to a datetime.time object.In a
> DateField ,I can put (default=datetime.date.today) and this will set
> the current day .Similarly I tried (default=datetime.now().time) for
> TimeField ..and can get a default time value when the page is
> loaded.But after waiting for a couple of minutes,I   loaded the page
> again(without restarting the server) and the timevalue shown was the
> old one ,not current time.

Argument are only evaluated once, so `default=datetime.now().time` sets the 
default to the `datetime.now().time` as it is when evaluated. Once.

Just wrap the thing in a `lambda` and you should be good to go: 
`default=(lambda:datetime.now().time)`

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



how to set default value as current time in TimeField

2010-02-15 Thread harryos

hi
I am using a TimeField and want to set the default value as current
time.I know the field normalizes to a datetime.time object.In a
DateField ,I can put (default=datetime.date.today) and this will set
the current day .Similarly I tried (default=datetime.now().time) for
TimeField ..and can get a default time value when the page is
loaded.But after waiting for a couple of minutes,I   loaded the page
again(without restarting the server) and the timevalue shown was the
old one ,not current time.
While using the django admin I can set the time using the javascript
clock,but that is not an option when I use my own (beginner
level)code..Can anyone tell me how I can get the current time as
default value in the field?

Also ,how do I get the duration between two datetime.time objects ?I
tried to create two instances of these and can compare them using > or
<  ,but found that - operation is not supported.Any tips are most
welcome

thanks

harry

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Union of two querysets?

2010-02-15 Thread rebus_
On 16 February 2010 03:28, ydjango  wrote:
> I have two query sets with two different where clauses on same table
> and same columns in select. Is it possible to have their union.
>
> I tried qryset = qryset1 + qryset2
>  It gave me - "+ unsupported operand"
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>

Perhaps you could try to use OR lookup using Q objects?

http://docs.djangoproject.com/en/dev/topics/db/queries/#complex-lookups-with-q-objects

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Union of two querysets?

2010-02-15 Thread ydjango
I have two query sets with two different where clauses on same table
and same columns in select. Is it possible to have their union.

I tried qryset = qryset1 + qryset2
 It gave me - "+ unsupported operand"

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Union of two query sets?

2010-02-15 Thread ydjango
I have two query sets with two different where clause on same table
and same columns. Is it possible to have their union.

I tried qryset = qryset1 + qryset2 - It gave me - "+ unsupported
argument"

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: strip html tags

2010-02-15 Thread Joel Stransky
nm, found it. :) just data.from.model|striptags. How cool.

On Mon, Feb 15, 2010 at 9:16 PM, Joel Stransky wrote:

> I have a piece of data coming back from a model that is wrapped in 
> tags. How do I remove these in the template?
>
> For instance I have something like:
> {{ data.from.model }}
>
> and it will render like this
> *some text from the model*
>
> --
> --Joel Stransky
> stranskydesign.com
>



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



strip html tags

2010-02-15 Thread Joel Stransky
I have a piece of data coming back from a model that is wrapped in  tags.
How do I remove these in the template?

For instance I have something like:
{{ data.from.model }}

and it will render like this
*some text from the model*

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



Re: Noob question: Templates: How to count for loop?

2010-02-15 Thread mhulse
> You could do it like this. There was a discussion recently about mod
> operator and what happens when you want to do something every N times
> but can't find it now for some reason :(

Ah, interesting! Thanks for the code sample, I really appreciate your
assistance.

I will search around for the mod operator discussion... Sounds like it
could be a good read for me. :)

Thanks again!

Micky

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Noob question: Templates: How to count for loop?

2010-02-15 Thread rebus_
On 16 February 2010 02:58, mhulse  wrote:
>> Hrmm, forloop.counter. It is one of those days. :P
>
> But, how can I tell if it is every third item?
>
> Also, is there a way to check if the current number is even?
>
> In a PHP template, I might do this:
>
> ... forloop ...
> 
> ... endforloop ...
>
> Sorry if silly question.
>
> Thanks!
> M
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>

http://docs.djangoproject.com/en/dev/ref/templates/builtins/#divisibleby
http://groups.google.com/group/django-developers/browse_thread/thread/20c309376c46590d?hl=en#

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Noob question: Templates: How to count for loop?

2010-02-15 Thread rebus_
On 16 February 2010 02:58, mhulse  wrote:
>> Hrmm, forloop.counter. It is one of those days. :P
>
> But, how can I tell if it is every third item?
>
> Also, is there a way to check if the current number is even?
>
> In a PHP template, I might do this:
>
> ... forloop ...
> 
> ... endforloop ...
>
> Sorry if silly question.
>
> Thanks!
> M
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>

{% for photo in photos %}

stuff
{% endfor %}

You could do it like this. There was a discussion recently about mod
operator and what happens when you want to do something every N times
but can't find it now for some reason :(

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Noob question: Templates: How to count for loop?

2010-02-15 Thread mhulse
> Check out "cycle"  template tag too.
> http://docs.djangoproject.com/en/dev/ref/templates/builtins/#cycle

Thanks rebus_! I have played with that just a little bit. I will
explore it further.

Cheers,
Micky

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Noob question: Templates: How to count for loop?

2010-02-15 Thread mhulse
> Hrmm, forloop.counter. It is one of those days. :P

But, how can I tell if it is every third item?

Also, is there a way to check if the current number is even?

In a PHP template, I might do this:

... forloop ...

... endforloop ...

Sorry if silly question.

Thanks!
M

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Noob question: Templates: How to count for loop?

2010-02-15 Thread rebus_
On 16 February 2010 02:52, mhulse  wrote:
>> Is this possible? I am sure it is... Any tips ya'll could send my way
>> would be spectacular!
>
> Hrmm, forloop.counter. It is one of those days. :P
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>

Check out "cycle"  template tag too.

http://docs.djangoproject.com/en/dev/ref/templates/builtins/#cycle

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Noob question: Templates: How to count for loop?

2010-02-15 Thread mhulse
> Is this possible? I am sure it is... Any tips ya'll could send my way
> would be spectacular!

Hrmm, forloop.counter. It is one of those days. :P

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Noob question: Templates: How to count for loop?

2010-02-15 Thread mhulse
Hi,

In my template:

{% for photo in photos %}

stuff
{% endfor %}

Is this possible? I am sure it is... Any tips ya'll could send my way
would be spectacular!

Thanks!
Micky

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: admin template object context

2010-02-15 Thread rebus_
On 15 February 2010 20:11, jb  wrote:
> im editing admin/change_form.html for one of my models and i need to
> access the context of the object being edited, eg. admin/hotel/
> change_form.html and in the template i need to call
> {{ actual_hotel.its_value }}
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>

Try {{ original.its_value }}

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: how to handle Winsock TCP\IP in Django

2010-02-15 Thread Keyan
Thank you .  actually i need to take RDC(Remote DesckTop Connection)
to my client system is it possible using Django framework.

On Feb 15, 3:34 pm, Baurzhan Ismagulov  wrote:
> On Sun, Feb 14, 2010 at 08:36:25PM -0800, Keyan wrote:
> > Please let me know is it possible to handle Winsock TCP\IP concepts in
> > Django. & is there any tutorials to follow.
>
> Some ways are discussed 
> here:http://groups.google.com/group/django-users/browse_thread/thread/536b...
>
> Regarding "how" -- look for python socket tutorials; there is also
> twisted, which may or may not suit your needs.
>
> With kind regards,
> --
> Baurzhan Ismagulovhttp://www.kz-easy.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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Dictionary Model Merge

2010-02-15 Thread Andy McKay

On 2010-02-15, at 2:31 PM, cootetom wrote:

> Thanks Javier but I'm having problems with that. I do want to create a
> dictionary from the model first then override with the POST values.
> But when I try to make a dictionary from the model I get an 'object is
> not iterable' error.

Without the code that generates that error or the traceback, we can't provide 
much help.

One thing that is useful is model_to_dict, eg:

http://www.djangozen.com/blog/useful-django-apis
--
  Andy McKay, @clearwind
  http://clearwind.ca/djangoski

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Dictionary Model Merge

2010-02-15 Thread cootetom
Thanks Javier but I'm having problems with that. I do want to create a
dictionary from the model first then override with the POST values.
But when I try to make a dictionary from the model I get an 'object is
not iterable' error.





On Feb 15, 9:41 pm, Javier Guerra  wrote:
> On Mon, Feb 15, 2010 at 4:27 PM, cootetom  wrote:
> > I'm looking for something in the framework that I think must exist
> > somewhere but can't seem to find anything. I'm after a bit of code
> > that takes a dictionary (a.k.a the POST dictionary) and a model
> > instance, then merges the two into a new dictionary. The new
> > dictionary then contains all values from the POST plus any missing
> > values added from the model.
>
> try:
>
> new=dict (request.POST)
> new.update (modelInstance)
>
> or the other way around, if you want the POST to override the model:
>
> new=dict(modelInstance)
> new.update (request.POST)
>
> --
> Javier

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How do I manually set the "GROUP BY" for a django queryset?

2010-02-15 Thread Greg Brown
That's a good point, but then the ird_number field (on UserProfile) is
inaccessible. I'd need to do something like

User.objects.values('first_name', 'last_name', 'pk',
'userprofile__ird_number').annotate(
   Max('application__creation_date'),
).order_by('-application__creation_date__max').select_related()

but that raises

FieldError: Invalid field name: 'userprofile__ird_number'

Greg




On 16 February 2010 10:13, Dj Gilcrease  wrote:
> On Mon, Feb 15, 2010 at 1:43 PM, Greg Brown  wrote:
>> The queryset giving the problem is
>>
>> UserProfile.objects.values(
>>        'ird_number', 'user__first_name', 'user__last_name', 'user__pk',
>>    ).annotate(
>>        Max('user__application__creation_date'),
>>    ).order_by('-user__application__creation_date__max')
>
>
> It looks to me like you are trying to get more info from the User
> model then then UserProfile model, so maybe change your query to be
> based on the User not the UserProfile
>
>
> User.objects.values('first_name', 'last_name', 'pk').annotate(
>    Max('application__creation_date'),
> ).order_by('-application__creation_date__max').select_related()
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
http://gregbrown.co.nz/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Dictionary Model Merge

2010-02-15 Thread Javier Guerra
On Mon, Feb 15, 2010 at 4:27 PM, cootetom  wrote:
> I'm looking for something in the framework that I think must exist
> somewhere but can't seem to find anything. I'm after a bit of code
> that takes a dictionary (a.k.a the POST dictionary) and a model
> instance, then merges the two into a new dictionary. The new
> dictionary then contains all values from the POST plus any missing
> values added from the model.

try:

new=dict (request.POST)
new.update (modelInstance)

or the other way around, if you want the POST to override the model:

new=dict(modelInstance)
new.update (request.POST)

-- 
Javier

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



send_mail not sending e-mail in view, but does send e-mail in shell

2010-02-15 Thread Heleen
Hi,

I hope this question hasn't been asked before, if so please link me to
the answer (I couldn't find it).
I have the following problem. When I try to send an e-mail  using
send_mail() trough the Django website (so via a view function), it
does not deliver the e-mail. However when on the same server I use
'python manage.py shell' it does deliver the e-mail. I'm using Postfix
(and earlier I tried Exim as well) to handle e-mails. When I send the
e-mail using the shell it shows up in the logs. When I try sending it
through the website it does not show up in any log. Postfix really is
set-up correctly and I am also certain that the code in the view is
correct. Sending e-mail does work on a similar server which has an
earlier version of Python and Django.

I'm running Django 1.1 on a Debian server with Python 2.5.2 running
spawning with Nginx. I use the following startup script:
#!/bin/sh

PROJNAME=website
PROJDIR=/var/www/heleen/website
PORT=9001

cd ${PROJDIR}/../
/usr/bin/spawn --factory=spawning.django_factory.config_factory $
{PROJNAME}.settings --port=$PORT --threads=0 --processes=1   --access-
log-file=/var/log/django/${PROJNAME} &

Is there anyone who has any idea what I'm missing?

Thank very much in advance for your help!
Heleen

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: problem with mod_wsgi+apache and Unicode

2010-02-15 Thread Karen Tracey
On Mon, Feb 15, 2010 at 2:05 PM, Robert  wrote:

> hello,
>
> I am trying to configure apache on a new server, but just getting 500
> errors due a UnicodeEncodeError (in fact is on the photologue
> application but the problem is extended wherever I use unicode
> strings).
>
> My problem is that when the application tries to access to the file
> name of a photo, which is unicode encoded I get this error:
>
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in
> position 68: ordinal not in range(128)
>
>
See:
http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#if-you-get-a-unicodeencodeerror

Though in the mod_python doc, it applies to mod_wsgi as well. (That section
should really be put somewhere common.)

Though the noted envvars file is OS-specific, changing it works on my Ubuntu
machine (though I've not updated to karmic yet, I'd assume this hasn't
changed).

Karen

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Dictionary Model Merge

2010-02-15 Thread cootetom
I'm looking for something in the framework that I think must exist
somewhere but can't seem to find anything. I'm after a bit of code
that takes a dictionary (a.k.a the POST dictionary) and a model
instance, then merges the two into a new dictionary. The new
dictionary then contains all values from the POST plus any missing
values added from the model.

The reason I need this is because I have a form to modify a model but
the form is a cut down form. When I save the form it blanks out any
values that it didn't contain for the model. I don't want to blank out
those it didn't contain, I just want to save the ones it did contain.

Hope that makes sense.

- Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How do I manually set the "GROUP BY" for a django queryset?

2010-02-15 Thread Dj Gilcrease
On Mon, Feb 15, 2010 at 1:43 PM, Greg Brown  wrote:
> The queryset giving the problem is
>
> UserProfile.objects.values(
>        'ird_number', 'user__first_name', 'user__last_name', 'user__pk',
>    ).annotate(
>        Max('user__application__creation_date'),
>    ).order_by('-user__application__creation_date__max')


It looks to me like you are trying to get more info from the User
model then then UserProfile model, so maybe change your query to be
based on the User not the UserProfile


User.objects.values('first_name', 'last_name', 'pk').annotate(
Max('application__creation_date'),
).order_by('-application__creation_date__max').select_related()

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How do I manually set the "GROUP BY" for a django queryset?

2010-02-15 Thread Greg Brown
Ok, here goes:

First, some background - UserProfile is the
settings.AUTH_PROFILE_MODULE and the Application model has a
ForeignKey to User. There's ~90,000 users/userprofiles, ~110,000
applications (most have only one application, some have 2). The
database is mysql. If that's not enough info, let me know and I'll see
if I can put together a simple reproduce-able test case.

The queryset giving the problem is

UserProfile.objects.values(
'ird_number', 'user__first_name', 'user__last_name', 'user__pk',
).annotate(
Max('user__application__creation_date'),
).order_by('-user__application__creation_date__max')

I'm beginning to think it might be a bug - because UserProfile and
User are joined by a one-to-one relationship, it's sufficient to group
by one of their primary keys, and I think the ORM should know this.

Should I open a ticket for this?

Greg




On 15 February 2010 13:07, Russell Keith-Magee  wrote:
> On Mon, Feb 15, 2010 at 6:30 AM, Greg  wrote:
>> I have a large-ish query which is taking ~10 seconds to run, but I can
>> get it down to less than a second by changing the group by part of the
>> query from
>>
>>    GROUP BY `refunds_userprofile`.`ird_number` ,
>> `auth_user`.`first_name` , `auth_user`.`last_name` ,
>> `refunds_userprofile`.`user_id` , `auth_user`.`id` ,
>> `auth_user`.`username` , `auth_user`.`first_name` ,
>> `auth_user`.`last_name` , `auth_user`.`email` ,
>> `auth_user`.`password` , `auth_user`.`is_staff` ,
>> `auth_user`.`is_active` , `auth_user`.`is_superuser` ,
>> `auth_user`.`last_login` , `auth_user`.`date_joined`
>>
>> to
>>
>>    GROUP BY `refunds_userprofile`.`ird_number`
>>
>> (note this doesn't change the query results)
>>
>> I figured I might have to use some undocumented methods to do this,
>> but I couldn't figure it out - I've tried explicitly setting the
>> query.group_by attribute with no success. Does anyone know how I could
>> do this?
>
> The short answer is  "you don't". Django doesn't expose any way to
> manually control GROUP BY because that is a relational construct, and
> Django is attempting to provide an Object-like wrapper.
>
> As for why dropping GROUP BY clauses is faster - remember, t's always
> possible to get the wrong answer in O(1) time :-) Daniel has asked the
> more important question - what are you trying to do? Django is
> generally pretty careful about adding GROUP BY clauses; arbitrarily
> dropping them make me a little nervous. It's possible you're found a
> bug, but it's impossible to confirm that without more details.
>
> 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-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
http://gregbrown.co.nz/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



admin template object context

2010-02-15 Thread jb
im editing admin/change_form.html for one of my models and i need to
access the context of the object being edited, eg. admin/hotel/
change_form.html and in the template i need to call
{{ actual_hotel.its_value }}

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



problem with mod_wsgi+apache and Unicode

2010-02-15 Thread Robert
hello,

I am trying to configure apache on a new server, but just getting 500
errors due a UnicodeEncodeError (in fact is on the photologue
application but the problem is extended wherever I use unicode
strings).

My problem is that when the application tries to access to the file
name of a photo, which is unicode encoded I get this error:

UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in
position 68: ordinal not in range(128)


I don't get this error on my local machine, neither when I use fastcgi
on another server.

My server is an ubuntu karmic, with apache 2 and mod_wsgi. when I get
the locale of the machine I got this:

de...@ip-10-227-118-79:/srv/www$ locale
LANG=es_ES.UTF-8
LC_CTYPE="es_ES"
LC_NUMERIC="es_ES"
LC_TIME="es_ES"
LC_COLLATE="es_ES"
LC_MONETARY="es_ES"
LC_MESSAGES="es_ES"
LC_PAPER="es_ES"
LC_NAME="es_ES"
LC_ADDRESS="es_ES"
LC_TELEPHONE="es_ES"
LC_MEASUREMENT="es_ES"
LC_IDENTIFICATION="es_ES"
LC_ALL=es_ES

I just don't get how can I know or change the default charset so
mod_wsgi knows that the string is an unicode string and don't try to
encode it again.

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



Re: URLs and Regex Question for passing email address?

2010-02-15 Thread Karen Tracey
On Mon, Feb 15, 2010 at 6:06 AM, Jonathan Sutcliffe <
jonosutcli...@googlemail.com> wrote:

>
> I want to pass a URL of the following form, containing an email
> address that I will later look up contact information from.
>
> e.g.  http://localhost:8000/contact/ronald.ninnis%40cdu.edu.au/
>
> I don't care about whether this is a valid email string I simple want
> to pass the parameter across to the view and do the look up here.
>
> I notice the @ is already %40 which has been escaped by the Javascript
> in the calling application.
>
> In my urls.py I have the following regex.
>
> urls.py
>
>  (r'^contact/(?P\[a-z0-9._%+...@[a-z0-9.-]+\.[a-z]{2,4})/$',
> 'entitlements.sfdc.views.contactdetail'),
>
> But no match is found. Could someone point out the error of my ways?
>

If you do not care if it is a valid email string why are you attempting any
kind of 'looks like an email' matching in the url pattern?

As for what, specifically, is wrong with that pattern -- the \ after 
looks wrong, and the fact that you've specified all uppercase letters to
match yet the sample URL you show has lowercase letters looks like a
problem, for starters. But really I would hesitate to try to 'fix' that
pattern, particularly if you really don't care if it is a valid email
address at this point in the code. Just switch it to something that accepts
anything between the two slashes in the url, and if you do care about
checking validity later in processing, use some other pre-existing email
validation code to check the value once you've got it in the view.

Karen

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: dynamic variable in templates

2010-02-15 Thread Bill Freeman
Or a method on the project model, maybe called chain, that looks the
project instance's
name up in chains.  The you could say "for item in project.chain", for example.

On Sat, Feb 13, 2010 at 3:31 PM, Daniel Roseman  wrote:
> On Feb 13, 7:20 pm, Madis  wrote:
>> http://push.cx/2007/django-template-tag-for-dictionary-access
>>
>> This is basically what I'm looking for but I'm not sure that this is
>> the best way to do this.
>
> Yes, this is the right way to do it.
> --
> DR.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: nested lists

2010-02-15 Thread Bill Freeman
A list (or queryset or other iterable) of objects, each of which has an
attribute named "city_list" which contains a list(or queryset or other
iterable of strings (or objects with a unicode representation that is
meaningfully represented as a string) such as the name of a city.

On Sat, Feb 13, 2010 at 4:57 PM, Madis  wrote:
> Could someone please explain what kind of a list would make this work:
>
> {% for country in countries %}
>    
>    {% for city in country.city_list %}
>        
>        Country #{{ forloop.parentloop.counter }}
>        City #{{ forloop.counter }}
>        {{ city }}
>        
>    {% endfor %}
>    
> {% endfor %}
>
> Example is taken from is taken from 
> http://www.djangobook.com/en/1.0/chapter04/
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django IDE

2010-02-15 Thread Dan Ostrowski
Thanks for the recommendation of PyCharm, Joe.  Jetbrains products are
excellent and I've had a lot of luck with their "other" foray into
targeted web framework IDEs: RubyMine. I'm definitely going to give
PyCharm a go and I'd +1 any Jetbrains products.

Cheers,
Dan

On Feb 15, 7:40 am, Joe Kueser  wrote:
> If you don't mind the horrors of beta software, I'd highly recommend
> PyCharm.  It's JetBrain's latest IDE, which is growing up to be Python
> and Django-specific.  It's still a little rough at this point, but
> usable, especially if you are using the Django default structure,
> etc.  The 1.0 version isn't due out for several months, but I
> definitely like what I see so far.
>
> http://www.jetbrains.com/pycharm/index.html
>
> Joe
>
> On Feb 14, 10:59 pm, dj_vishal <2009vis...@gmail.com> wrote:
>
>
>
> > Hello
>
> >    Hi to all am new to the Django Framework.am learning django
> >    Which IDE is suitable for Django ..plz help me in right way
>
> >    Thanks in Advance
> >    vishal
> >    2009vis...@gmail.com
> > --
> > View this message in 
> > context:http://old.nabble.com/Django-IDE-tp27589650p27589650.html
> > Sent from the django-users mailing list archive at Nabble.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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: looping over dictionaries

2010-02-15 Thread Karen Tracey
On Mon, Feb 15, 2010 at 2:54 AM, Javier Rivera wrote:

> Karen Tracey wrote:
>
>>Now in a template I want to iterate over them as follows:
>>{% for project in projects %}
>>{{ project }}
>> {% for chain in project.chains %}
>> -- {{ chain }}
>> {% endfor %}
>>{% endfor %}
>>
>
>
Note what you've posted above is the original non-working template block.
What I posted to take its place was:

{% for project, chains_dict in projects.items %}
{{ project }}
 {% for chain in chains_dict.chains %}
 -- {{ chain }}
 {% endfor %}
{% endfor %}

And recall the value of projects that was posted:

projects = {u'NetMinutes': {'chains': [u'Arendus', u'Uuslahendus']},
u'Veel': {'chains': []}}



I'm usually use the values() property to iteract dictionary values. I find
> it more readable than items(), and usually, as I need to sort the output,
> the fact that it returns a list is quite useful.


If all you need to iterate over are the dictionary values, and you do not
care what the keys are, then using values() is appropriate.  That's not the
case for the originally posted block.


> {% for project in projects %}
>{{ project }}
>{% for chain in project.chains.values %}
> -- {{ chain }}
>{% endfor %}
> {% endfor %}
>
>
This block suffers from the same problem as the original.  Iterating over
'project in projects' just gives you the keys from projects, as strings. For
the posted projects value, project will take on the values u'NetMinutes' and
u'Veel' (not necessarily in that order) during successive iterations of the
loop. u'NetMinutes', or u'' does not have an attribute
chains, so the inner 'for chain in project.chains.values' has nothing to
iterate over.

For the originally posted block, it was clear that the intent was to use
both the keys and the values from the projects dictionary, that's why the
replacement proposed using items() when iterating over the projects dict.
Replacing 'for project in projects' with 'for project in projects.values'
would also not work since then the inclusion of {{ project }} in the 
header would not produce the desired output.

Karen

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django IDE

2010-02-15 Thread Joe Kueser
If you don't mind the horrors of beta software, I'd highly recommend
PyCharm.  It's JetBrain's latest IDE, which is growing up to be Python
and Django-specific.  It's still a little rough at this point, but
usable, especially if you are using the Django default structure,
etc.  The 1.0 version isn't due out for several months, but I
definitely like what I see so far.

http://www.jetbrains.com/pycharm/index.html

Joe

On Feb 14, 10:59 pm, dj_vishal <2009vis...@gmail.com> wrote:
> Hello
>
>    Hi to all am new to the Django Framework.am learning django
>    Which IDE is suitable for Django ..plz help me in right way
>
>    Thanks in Advance
>    vishal
>    2009vis...@gmail.com
> --
> View this message in 
> context:http://old.nabble.com/Django-IDE-tp27589650p27589650.html
> Sent from the django-users mailing list archive at Nabble.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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Extra model attributes.

2010-02-15 Thread Shawn Milochik
My application stores information about clinical trial and patients. We have a 
model for the patient which has the usual fields, such as name, date of birth, 
etc. One of the fields is patient_id, which is optional and is used by some of 
our clients but not others. As such, the ModelForm will validate if this is 
left blank.

I have a requirement from a new client that the patient_id field be required. 
The easiest thing to do would be to add a boolean field to the Study model the 
patient is related to. In fact, I have done this already with the social 
security number, but I think SSN is important enough to justify the field. I 
don't want to keep adding arbitrary fields, especially when they may only be 
used by one client.

My co-developer and I have discussed adding a text field to the Study model in 
which we'll store serialized JSON, then create a property() with the getter and 
setter functions to return value by key. So if we call 
instance.extra_params('patient_id_required') we'd get back the value. One 
potential issue I have with that is that, for a Study instance which doesn't 
have the value already, I'd want the correct default value to be returned. In 
addition, what if we want to implement this solution for other models besides 
Study? That would be code duplication. 

So I'm trying to think of a clever way to have some kind of config model, with 
a generic foreign key, which stores arbitrary settings for model instances and 
the defaults for that model type. 

Do any of you know of an existing elegant solution to this kind of problem? Am 
I being hard-headed by not just adding fields, considering the fact that I have 
South and it's easy to add them and set sane defaults? Something in my lizard 
brain just tells me that's a bad idea.


Thanks,
Shawn


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



converting month string

2010-02-15 Thread harryos
hi
In my view I am taking user input string for month( like 'jan','feb')
and want to search the db for objects with those months as published
time.

def entry_archive_for_month(request,year,month):
 
entryset=Entry.objects.filter(pub_time__year=year,pub_time__month=month)


obviously this will cause ValueError since month='jan' but
pub_time__month should be an integer

Is there any way I can convert the month string into integer?Do I have
to create a dictionary with all lowercase month strings and then call
a function to return the matching integer?I would like to know if
there is a better way.

thanks
harry

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django IDE

2010-02-15 Thread Ovnicraft
2010/2/14 dj_vishal <2009vis...@gmail.com>

>
> Hello
>
>   Hi to all am new to the Django Framework.am learning django
>   Which IDE is suitable for Django ..plz help me in right way
>

http://www.gnu.org/software/emacs/


>
>   Thanks in Advance
>   vishal
>   2009vis...@gmail.com
> --
> View this message in context:
> http://old.nabble.com/Django-IDE-tp27589650p27589650.html
> Sent from the django-users mailing list archive at Nabble.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-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Cristian Salamea
CEO GnuThink Software Labs
Software Libre / Open Source
(+593-8) 4-36-44-48

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: strange 404 on favicon.ico in the admin

2010-02-15 Thread andreas schmid
thx for that, i have a favicon for the frontend of my site and i really
dont understand why and where its searching for /favicon.ico it should
be /media/favicon.ico for the admin anyway.

i solved it by putting a django.views.generic.simple.redirect_to to
rewrite the url for the favicon.

Shawn Milochik wrote:
> The browser looks for a favicon (the little image that appears in the address 
> bar next to the URL). I got those errors on my WebFaction account until I 
> created a favico.ico file and added its location to the Apache config.
>
> A quick Google search will find various Web sites which will take an image 
> and convert it into a valid .ico file. 
>
> Then, assuming you're using Apache, add this to httpd.conf:
>
> 
> SetHandler None
> 
>
> alias /favicon.ico /full/path/to/favicon.ico
>
>
>
>
> Shawn
>
>   

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: strange 404 on favicon.ico in the admin

2010-02-15 Thread Shawn Milochik
The browser looks for a favicon (the little image that appears in the address 
bar next to the URL). I got those errors on my WebFaction account until I 
created a favico.ico file and added its location to the Apache config.

A quick Google search will find various Web sites which will take an image and 
convert it into a valid .ico file. 

Then, assuming you're using Apache, add this to httpd.conf:


SetHandler None


alias /favicon.ico /full/path/to/favicon.ico




Shawn

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: URLs and Regex Question for passing email address?

2010-02-15 Thread Shawn Milochik
It sounds like this might be a good case for a GET (querystring).

As in:

 http://localhost:8000/contact/?email=ronald.ninnis%40cdu.edu.au/

Then use something like request.GET.get('email', '') to get the value.
That seems easier and cleaner than trying to have a URL pattern regex match 
every valid e-mail address.

Shawn

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django IDE

2010-02-15 Thread Massimiliano Bertinetti
I have the professional (since I use for work).

But if you want to create an open source project you can ask for a
license for free.

See their site for more info.

Max-B

Il giorno lun, 15/02/2010 alle 23.34 +1100, Tran Cao Thai ha scritto:
> i used to use wingware for a while. It 's cool, fast but not free (i
> used the trial version). Stick with Eclipse + pydev for a while also.
> IMO, it 's the best, however, eclipse is always slow (because it 's a
> java application), and don't have the integrated terminal ( i know
> that there are some plugins for the terminal but don't want to spend
> much time on that). Currently, i go back to my favourite one: Geany
> which doesn't have many plugins but very fast and free also
> 
> On Mon, Feb 15, 2010 at 10:46 PM, bruno desthuilliers
>  wrote:
> On Feb 15, 11:18 am, rebus_  wrote:
> (snip)
> > But as Bruno pointed out, any decent code editor will do,
> just a
> > matter of preference.
> 
> 
> Well, the point is that Django is about web programming, which
> usually
> imply using quite a few languages - html + whatever template
> system,
> javascript, css, quite often bits of SQL, the usual
> config-file
> formats, probably some shell scripting here and there, and (of
> course)
> a server-side language - in this case Python, but as far as
> I'm
> concerned (and I bet most web programmers will have this
> pattern) I
> often have to deal with PHP or other scripting languages. Also
> and
> FWIW, I also have to maintain Python apps based on other
> frameworks
> (mostly Zope/Plone to my regret). Not talking about the bits
> and
> pieces of C or other lower level languages...
> 
> Having to learn a distinct "IDE" for each and any possible
> text
> format / language / framework / combination of...  would be
> rather
> tedious. I find it better to master one good code editor that
> handle
> them all. My editor of choice happens to be Emacs, but there's
> no
> shortage of good code editors to choose from.
> 
> My 2 cents...
> 
> --
> 
> You received this message because you are subscribed to the
> Google Groups "Django users" group.
> To post to this group, send email to
> django-us...@googlegroups.com.
> To unsubscribe from this group, send email to django-users
> +unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
> 
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to django-users
> +unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django IDE

2010-02-15 Thread Massimiliano Bertinetti
WingIDE, EricIDE

Il giorno dom, 14/02/2010 alle 20.59 -0800, dj_vishal ha scritto:
> Hello
> 
>Hi to all am new to the Django Framework.am learning django
>Which IDE is suitable for Django ..plz help me in right way
> 
>Thanks in Advance
>vishal
>2009vis...@gmail.com
> -- 
> View this message in context: 
> http://old.nabble.com/Django-IDE-tp27589650p27589650.html
> Sent from the django-users mailing list archive at Nabble.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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Templates design question

2010-02-15 Thread andreas schmid
you could create a template module where you put in the logic to dipslay
the content of the post:

 Hello,
>
> I'm writing some simple webblog, just for self teaching, and I have a
> question how to do better. Here is the situation, I have base.html, I
> have blog.html which extends base. Now in that blog I would like to
> put posts, full text posts, without comments, and link to the post
> only with comments. And I run out of ideas how to make it without
> repeating html. For e.g. in blog.html I have:
>
> {% extends "base.html" %}
> {% for entry in entries %}
>
> 
> http://groups.google.com/group/django-users?hl=en.



how to reload the head tag using jquery ajax and django

2010-02-15 Thread kirian
Hi,

This might sound a bit like a jquery question. But since I'm pretty
sure that my jquery code is okay, it seems for me that my problem has
to do with django.

I try to reload a form and the head of the page with a jquery ajax
call:

$("#id_is_active").change(function(){
   url = '{{ url_start_manage_plan_days }}?is_active=' + $
(this).val();
$.get(url, function(results){
  var head = $('head', $(results));
  $("head", $(results)).each (
 function() {
 alert("got a match ");
 });

  var form = $("form.ajax_form_result", results);
  //update the ajax_form_result div with the return value
"form"
  $('head').html(head);
  $('#ajax_form_result').html(form);
}, "html");
});


The form update is working properly. But the  update always
results in an empty head. I'm sure that my view returns a complete
html page.

context = {
'manage_plan_days_form' : manage_plan_days_form,
'url_start_manage_plan_days' : url_start_manage_plan_days,
'json_data_handler' : json_data_handler,
'get_param_year' : get_param_year,
'get_param_project_id' : get_param_project_id,
'is_active_param' : is_active_param,
}
template = 'project_management/manage_plan_days.html'
if not get_param_project_id:
request.user.message_set.create(message='Please select a
project.')
return render_to_response(template, context,
   context_instance=RequestContext(request))

The manage_plan_days.html' extends a base.html which has the head tag
I want to select with my jquery.
The page renders fine when I just call it with a "normal" GET call.

I really have no clue which could be the problem. I hope I will find
some help here.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: moving to Django 1.1 problem

2010-02-15 Thread knight
Thanks,

You are great. It also solves my problem. :)

On Feb 15, 3:32 pm, bruno desthuilliers
 wrote:
> On Feb 15, 1:30 pm, knight  wrote:
>
> Don't know if it has anything to do with your problem, but there's an
> error in your form:
>
>
>
> > My form:
>
> > class UploadImageForm(ModelForm):
> >     class Meta:
> >         model = ImageUpload
> >         fields = ('thumb')
>
> Python gotcha here: what defines a tuple is the comma, not the parens.
> You want:
>
>          fields = ('thumb', ) # required trailing comma
>
> HTH

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Object data change approvals.

2010-02-15 Thread bruno desthuilliers
On Feb 15, 5:36 am, iliveinapark 
wrote:
> Thanks very much, Bruno, this is a pretty simple way of doing what I
> want.

Q example, really. A robust working solution will probably be a bit
more involved.

> Now I just have to figure out to apply it generically over multiple
> levels of inheritance =/
>

Mmm ORMs and deep inheritance trees often don't work that well
together :-/

If it's still time, and if of course the context allow it, you might
be better refactoring as much as possible as "mixin" abstract classes.

My 2 cents.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Templates design question

2010-02-15 Thread R. K.
Hello,

I'm writing some simple webblog, just for self teaching, and I have a
question how to do better. Here is the situation, I have base.html, I
have blog.html which extends base. Now in that blog I would like to
put posts, full text posts, without comments, and link to the post
only with comments. And I run out of ideas how to make it without
repeating html. For e.g. in blog.html I have:

{% extends "base.html" %}
{% for entry in entries %}

http://groups.google.com/group/django-users?hl=en.



Re: eValueError: Cannot assign "'pluto'": "listurl.servicetypelist" must be a "servicetype" instance.

2010-02-15 Thread bruno desthuilliers
On Feb 15, 12:25 pm, luupux  wrote:
> Hello , i have a big problem  for my little  know
> for simple diagnostic  python manage.py shell
>
> where am I wrong?
>
> >>> from siteupdate.proxy.models import  listurl
> >>> a=listurl()
> >>> a.urlip="pippo"
> >>> a.servicetypelist="pluto"
>
> Traceback (most recent call last):
>  File "", line 1, in 
>  File "/usr/lib/python2.5/site-packages/django/db/models/fields/
> related.py", line 273, in __set__
>    self.field.name, self.field.rel.to._meta.object_name))
> ValueError: Cannot assign "'pluto'": "listurl.servicetypelist" must be
> a "servicetype" instance.

> il mio file model.py
> from django.db import models
> class listurl(models.Model):
>        servicetypelist = models.ForeignKey('servicetype')
>        urlip=models.CharField(max_length=200,verbose_name="domino/ip
> da gestire")


Err... I don't know how to explain it better than the above traceback
did : you're trying to assign a string to a foreignkey field which
expects a "servicetype" instance.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: moving to Django 1.1 problem

2010-02-15 Thread bruno desthuilliers
On Feb 15, 1:30 pm, knight  wrote:

Don't know if it has anything to do with your problem, but there's an
error in your form:
>
> My form:
>
> class UploadImageForm(ModelForm):
>     class Meta:
>         model = ImageUpload
>         fields = ('thumb')


Python gotcha here: what defines a tuple is the comma, not the parens.
You want:

 fields = ('thumb', ) # required trailing comma



HTH

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django IDE

2010-02-15 Thread Andrew Davison
Komodo is a very nice IDE for dynamic languages in general, so can be
used for both Python and Javascript, for example. It also has syntax
highlighting, autocomplete, etc. for the Django template language. The
full version costs a couple of hundred euros, but there is a very
useable free version, Komodo Edit (http://www.activestate.com/
komodo_edit/), which, of the features I use in the full version, is
only missing the regexp tool and the code navigation tool. It also
offers vi emulation and emacs key-bindings.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django IDE

2010-02-15 Thread Abdel Bolaños Martí­nez
I have got good results with Eclipse + Pydev pluging + Aptana and 
working on Ubuntu GNU/Linux or Centos (RedHat)




Mike Ramirez wrote:

On Sunday 14 February 2010 20:59:22 dj_vishal wrote:
  

Hello

   Hi to all am new to the Django Framework.am learning django
   Which IDE is suitable for Django ..plz help me in right way

   Thanks in Advance
   vishal
   2009vis...@gmail.com




eric4 has a nice django plugin that you might like...

http://eric-ide.python-projects.org/

It's mainly for pyqt but the django plugin works as expected.
  



--- 
This message was processed by Kaspersky Mail Gateway 5.6.28/RELEASE running at host imx2.etecsa.cu

Visit our web-site: , 
  
--- 
This message was processed by Kaspersky Mail Gateway 5.6.28/RELEASE running at 
host imx2.etecsa.cu
Visit our web-site: , 
<>-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



strange 404 on favicon.ico in the admin

2010-02-15 Thread andreas schmid
hi,

i cant understand why but when i access my projects admin interface i
continiously get a 404 error on the favicon. everything works fine but i
get a lot of error mails from django everytime i access the site on
production.

[15/Feb/2010 12:34:07] "GET /de/admin/ HTTP/1.1" 200 7758
[15/Feb/2010 12:34:07] "GET /de/favicon.ico HTTP/1.1" 302 0
[15/Feb/2010 12:34:07] "GET /de/favicon.ico/ HTTP/1.1" 404 1714

and why is it trying to get the favicon in the admin? if i look at the
pages source there is no favicon set in the header for the admin interface.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django IDE

2010-02-15 Thread Tran Cao Thai
i used to use wingware for a while. It 's cool, fast but not free (i used
the trial version). Stick with Eclipse + pydev for a while also. IMO, it 's
the best, however, eclipse is always slow (because it 's a java
application), and don't have the integrated terminal ( i know that there are
some plugins for the terminal but don't want to spend much time on that).
Currently, i go back to my favourite one: Geany which doesn't have many
plugins but very fast and free also

On Mon, Feb 15, 2010 at 10:46 PM, bruno desthuilliers <
bruno.desthuilli...@gmail.com> wrote:

> On Feb 15, 11:18 am, rebus_  wrote:
> (snip)
> > But as Bruno pointed out, any decent code editor will do, just a
> > matter of preference.
>
> Well, the point is that Django is about web programming, which usually
> imply using quite a few languages - html + whatever template system,
> javascript, css, quite often bits of SQL, the usual config-file
> formats, probably some shell scripting here and there, and (of course)
> a server-side language - in this case Python, but as far as I'm
> concerned (and I bet most web programmers will have this pattern) I
> often have to deal with PHP or other scripting languages. Also and
> FWIW, I also have to maintain Python apps based on other frameworks
> (mostly Zope/Plone to my regret). Not talking about the bits and
> pieces of C or other lower level languages...
>
> Having to learn a distinct "IDE" for each and any possible text
> format / language / framework / combination of...  would be rather
> tedious. I find it better to master one good code editor that handle
> them all. My editor of choice happens to be Emacs, but there's no
> shortage of good code editors to choose from.
>
> My 2 cents...
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



moving to Django 1.1 problem

2010-02-15 Thread knight
Hi,

I'm trying to move from django 1.0.2 to 1.1 and I am getting the
following error in one of my templates:

Request Method: GET
Request URL:http://localhost:8000/conserv/media_assets/vod/
Exception Type: TemplateSyntaxError
Exception Value:Caught an exception while rendering: 'NoneType'
object has no attribute 'label'
Exception Location: /opt/local/Library/Frameworks/Python.framework/
Versions/2.6/lib/python2.6/site-packages/django/template/debug.py in
render_node, line 81
Python Executable:  /opt/local/Library/Frameworks/Python.framework/
Versions/2.6/Resources/Python.app/Contents/MacOS/Python
Python Version: 2.6.2

The error is on the line with the "for" tag.
My template:

{% for field in upload_image_form %}


{{field.name}}


{{field}}


{% endfor %}

My form:

class UploadImageForm(ModelForm):
class Meta:
model = ImageUpload
fields = ('thumb')

My model:

class ImageUpload(models.Model):
thumb = models.FileField(upload_to='thumbs', blank=True,
null=True)


Does anyone know how can I solve it?

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



Re: Django IDE

2010-02-15 Thread bruno desthuilliers
On Feb 15, 11:18 am, rebus_  wrote:
(snip)
> But as Bruno pointed out, any decent code editor will do, just a
> matter of preference.

Well, the point is that Django is about web programming, which usually
imply using quite a few languages - html + whatever template system,
javascript, css, quite often bits of SQL, the usual config-file
formats, probably some shell scripting here and there, and (of course)
a server-side language - in this case Python, but as far as I'm
concerned (and I bet most web programmers will have this pattern) I
often have to deal with PHP or other scripting languages. Also and
FWIW, I also have to maintain Python apps based on other frameworks
(mostly Zope/Plone to my regret). Not talking about the bits and
pieces of C or other lower level languages...

Having to learn a distinct "IDE" for each and any possible text
format / language / framework / combination of...  would be rather
tedious. I find it better to master one good code editor that handle
them all. My editor of choice happens to be Emacs, but there's no
shortage of good code editors to choose from.

My 2 cents...

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: HEALTH

2010-02-15 Thread chadwickbailey71

nice guide. is it true that eating to much protein will make you slim ?

-
Learn an  http://automatedsocialnetworking.com/ Automated Social Marketing 
technique WITHOUT Spending More than 5 Minutes Per Month at your Computer
:working:

-- 
View this message in context: 
http://old.nabble.com/HEALTH-tp15569700p27591975.html
Sent from the django-users mailing list archive at Nabble.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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django IDE

2010-02-15 Thread Шей
Real IDE fo Python/Django - Netbeans and Eclipse with Python plugins. But
IMHO it's overhead.

Use any text editor. Vim with python support is good.

WingIDE has good python support, but it's UI that is written in XUL anyoing
me, so I use Netbeans / Vim depending on task I have.

On Mon, Feb 15, 2010 at 12:45 PM, Anton Bessonov wrote:

> http://www.vim.org/
>
> dj_vishal schrieb:
>
>  Hello
>>
>>   Hi to all am new to the Django Framework.am learning django
>>   Which IDE is suitable for Django ..plz help me in right way
>>
>>   Thanks in Advance
>>   vishal
>>   2009vis...@gmail.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-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



URLs and Regex Question for passing email address?

2010-02-15 Thread Jonathan Sutcliffe
Hi,

I am new to Django and Python and have what must be a basic question.

I want to pass a URL of the following form, containing an email
address that I will later look up contact information from.

e.g.  http://localhost:8000/contact/ronald.ninnis%40cdu.edu.au/

I don't care about whether this is a valid email string I simple want
to pass the parameter across to the view and do the look up here.

I notice the @ is already %40 which has been escaped by the Javascript
in the calling application.

In my urls.py I have the following regex.

urls.py

  (r'^contact/(?P\[a-z0-9._%+...@[a-z0-9.-]+\.[a-z]{2,4})/$',
'entitlements.sfdc.views.contactdetail'),

But no match is found. Could someone point out the error of my ways?

Many Thanks,
Jono

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django IDE

2010-02-15 Thread Steven Elliott Jr
TextMate! 

On Feb 15, 2010, at 5:45 AM, Anton Bessonov wrote:

> http://www.vim.org/
> 
> dj_vishal schrieb:
>> Hello
>> 
>>   Hi to all am new to the Django Framework.am learning django
>>   Which IDE is suitable for Django ..plz help me in right way
>> 
>>   Thanks in Advance
>>   vishal
>>   2009vis...@gmail.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-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



eValueError: Cannot assign "'pluto'": "listurl.servicetypelist" must be a "servicetype" instance.

2010-02-15 Thread luupux

Hello , i have a big problem  for my little  know
for simple diagnostic  python manage.py shell

where am I wrong?

>>> from siteupdate.proxy.models import  listurl
>>> a=listurl()
>>> a.urlip="pippo"
>>> a.servicetypelist="pluto"
Traceback (most recent call last):
 File "", line 1, in 
 File "/usr/lib/python2.5/site-packages/django/db/models/fields/
related.py", line 273, in __set__
   self.field.name, self.field.rel.to._meta.object_name))
ValueError: Cannot assign "'pluto'": "listurl.servicetypelist" must be
a "servicetype" instance.

il mio file model.py
from django.db import models
class listurl(models.Model):
   servicetypelist = models.ForeignKey('servicetype')
   urlip=models.CharField(max_length=200,verbose_name="domino/ip
da gestire")


Thanks you

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: AJAX Autocompletion Field

2010-02-15 Thread Massimiliano della Rovere
I'd use http://dajaxproject.com/


On Sun, Feb 14, 2010 at 06:36, Margie Roginski  wrote:
> Hi Jon,
>
> I have used this very successfully:
>
> http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/
>
> The demo is here:
>
> http://loopj.com/tokeninput/demo.html
>
> One thing that differentiates it from the jquery autocomplete package
> is that it allows you to specify multiple selections, which was
> something I needed.  It also comes with css that gives it a very nice
> look and feel.
>
> I had almost no jquery experience at the time I started with it and
> was able to get it to work very well.  That said, there are a bunch of
> people that continue to ask for help or report problems, and the
> author doesn't really seem to respond, so it is not well supported and
> if you need enhancements, you have to dive in and understand the code.
>
> Margie
>
>
>
>
> On Feb 13, 2:46 pm, Jon Loeliger  wrote:
>> Folks,
>>
>> For likely the umpteenth time, can someone recommend a good
>> AJAX auto completion tutorial or example that I might use
>> to crib-together a text-field selection that would otherwise
>> be a very large drop-down selection field?
>>
>> My use case would be essentially like having a table full
>> of say, recipie ingredients, and letting the user select
>> which one to add into a recipe.  I'd like to have the user
>> simply start typing a few first characters and then let an
>> autocompleter search for matches and present them to the user.
>> The source of the matches would be a "Name" TextField in
>> some model.
>>
>> What is the current Best Practice or even Good Advice? :-)
>> Pros and cons for jQuery or extjs or something else?
>> A good "How To" or a pointer to a write up?
>>
>> Thanks,
>> jdl
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django IDE

2010-02-15 Thread Anton Bessonov

http://www.vim.org/

dj_vishal schrieb:

Hello

   Hi to all am new to the Django Framework.am learning django
   Which IDE is suitable for Django ..plz help me in right way

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



Re: how to handle Winsock TCP\IP in Django

2010-02-15 Thread Baurzhan Ismagulov
On Sun, Feb 14, 2010 at 08:36:25PM -0800, Keyan wrote:
> Please let me know is it possible to handle Winsock TCP\IP concepts in
> Django. & is there any tutorials to follow.

Some ways are discussed here:
http://groups.google.com/group/django-users/browse_thread/thread/536b6f4f6baf654b/d7bf03f08ae828c3

Regarding "how" -- look for python socket tutorials; there is also
twisted, which may or may not suit your needs.

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



Re: Django IDE

2010-02-15 Thread rebus_
On 15 February 2010 10:29, bruno desthuilliers
 wrote:
> On Feb 15, 5:59 am, dj_vishal <2009vis...@gmail.com> wrote:
>> Hello
>>
>>    Hi to all am new to the Django Framework.am learning django
>>    Which IDE is suitable for Django ..plz help me in right way
>
> IDE ??? What's that ?-)
>
> More seriously : any decent code editor will do.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>

I find WingIDE to be a really cool thingy.

http://www.wingware.com/

But as Bruno pointed out, any decent code editor will do, just a
matter of preference.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django IDE

2010-02-15 Thread bruno desthuilliers
On Feb 15, 5:59 am, dj_vishal <2009vis...@gmail.com> wrote:
> Hello
>
>    Hi to all am new to the Django Framework.am learning django
>    Which IDE is suitable for Django ..plz help me in right way

IDE ??? What's that ?-)

More seriously : any decent code editor will do.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.