Re: Some thoughts on a package/stack compile system for easy distribution of webapps..

2011-07-07 Thread Roberto De Ioris

> 2011/7/8 Bjarni Rúnar Einarsson 
>
>>
>>http://pagekite.net/wiki/Floss/PyBreeder/
>>https://github.com/pagekite/PyBreeder
>>
>> It's basically a small tool for combining multiple .py files into one.
>> It's trivial I know, but I looked all over and couldn't find anything
>> quite
>> like it, so I ended up writing my own.  Breeder is not very smart and it
>> does not handle any binary dependencies, but it might still be capable
>> of
>> packaging up a working django server in some cases. :-)
>>
>
> Nice script; but i (and also i guess Cal) were thinking more in the terms
> of
> having a single binary.
>
>

[DISCLAIMER] i still have not tried pybreeder

Having a single blob file (the .py file generated by pybreeder) will allow
us to "link" it to the uwsgi binary generating another binary with python
code embedded. This is pretty easy to accomplish. I will try it in the
next few days.

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



Re: anybody using PhoneGap with Django

2011-07-07 Thread John Fabiani
On Thursday, July 07, 2011 08:48:51 pm Andy McKay wrote:
> On 2011-07-07, at 2:22 PM, John Fabiani wrote:
> > I'm wondering if anyone has had any success with PhoneGap and Django?
> 
> Yes.
> --
>   Andy McKay
>   a...@clearwind.ca
>   twitter: @andymckay

LOL - I guess I could have asked a better question.  Can I assume you have had 
success with Django and PhoneGap?  If so would you take the time to explain in 
a general your experience with PhoneGap.  I have been told that the 
combination is very slow - although I don't see any reason that it would be.  
I was also told that debugging was very difficult.

Johnf

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



Re: Some thoughts on a package/stack compile system for easy distribution of webapps..

2011-07-07 Thread Venkatraman S
2011/7/8 Bjarni Rúnar Einarsson 

>
>http://pagekite.net/wiki/Floss/PyBreeder/
>https://github.com/pagekite/PyBreeder
>
> It's basically a small tool for combining multiple .py files into one.
> It's trivial I know, but I looked all over and couldn't find anything quite
> like it, so I ended up writing my own.  Breeder is not very smart and it
> does not handle any binary dependencies, but it might still be capable of
> packaging up a working django server in some cases. :-)
>

Nice script; but i (and also i guess Cal) were thinking more in the terms of
having a single binary.

-V

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



Re: Django Knowledge Strorehouse

2011-07-07 Thread Venkatraman S
On Fri, Jul 8, 2011 at 5:20 AM, Russell Keith-Magee  wrote:

> So -- my humble suggestion: If you think there is a need for improving
> Django documentation, I wholeheartedly agree. There's plenty of room
> for improvement in Django's docs. But the place to start isn't to
> write a massive technical site to host new documentation. You start by
> *writing documentation*.
>

Agreed. Charity begins at home. To start with i am going to atleast start
posting some of my articles on both my blog and also
in the wiki. I have been working on a django project and have learnt quiet a
lot in the recent past - which i
think is essential for any website. I am going to start documenting the
knowledge from now on.

It would be great if the other in this group can join in and start
contributing.
*
Lets start this "Documentation Drive" for the next 6 months and see how we
are doing. It would be great if
all in the community can spread the word. * I would call it "Django
Documentation Drive" (#3d).
[ http://twitter.com/venkasub/status/89179595714203649 ] Please RT.

On the other hand, i was thinking that we dont actually need another
site(project?), *if at all* we have to do
something of this sort, then django-snippets can be improved or used. But,
looks to me that wiki is a better place.

So lets start sharing the knowledge :)

-V

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



Re: anybody using PhoneGap with Django

2011-07-07 Thread Andy McKay

On 2011-07-07, at 2:22 PM, John Fabiani wrote:
> I'm wondering if anyone has had any success with PhoneGap and Django?

Yes.
--
  Andy McKay
  a...@clearwind.ca
  twitter: @andymckay
 

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



Re: KeyError in UnitTests

2011-07-07 Thread Daniel França
Problem solved: nose.tools.set_trace :)

2011/7/8 Daniel França 

> but my set_trace still freezes =/ If anyone have any idea what could be
> that.
>
> I'm on a Mac OS 10.6
>
>
> 2011/7/8 Daniel França 
>
>> yeah, thanks a lot, it's not 'BR' but I passed the ID of country and state
>> and it worked. =)
>>
>>
>> On Fri, Jul 8, 2011 at 12:15 AM, Shawn Milochik wrote:
>>
>>> Could it be because the test is passing 'Brasil' instead of 'BR'? I'm
>>> assuming 'BR' is a valid choice and 'Brasil' is invalid. That's why you're
>>> passing 'PR' instead of 'Paraná' in your data dictionary.
>>>
>>> If the field isn't a required field, then your form.is_valid() would be
>>> true, but there wouldn't be a value in cleaned_data['country'] when you got
>>> to your form's clean().
>>>
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Django users" group.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to django-users+unsubscribe@*
>>> *googlegroups.com .
>>> For more options, visit this group at http://groups.google.com/**
>>> group/django-users?hl=en
>>> .
>>>
>>>
>>
>

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



Re: KeyError in UnitTests

2011-07-07 Thread Daniel França
but my set_trace still freezes =/ If anyone have any idea what could be
that.

I'm on a Mac OS 10.6

2011/7/8 Daniel França 

> yeah, thanks a lot, it's not 'BR' but I passed the ID of country and state
> and it worked. =)
>
>
> On Fri, Jul 8, 2011 at 12:15 AM, Shawn Milochik wrote:
>
>> Could it be because the test is passing 'Brasil' instead of 'BR'? I'm
>> assuming 'BR' is a valid choice and 'Brasil' is invalid. That's why you're
>> passing 'PR' instead of 'Paraná' in your data dictionary.
>>
>> If the field isn't a required field, then your form.is_valid() would be
>> true, but there wouldn't be a value in cleaned_data['country'] when you got
>> to your form's clean().
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to django-users+unsubscribe@**
>> googlegroups.com .
>> For more options, visit this group at http://groups.google.com/**
>> group/django-users?hl=en
>> .
>>
>>
>

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



Re: KeyError in UnitTests

2011-07-07 Thread Daniel França
yeah, thanks a lot, it's not 'BR' but I passed the ID of country and state
and it worked. =)

On Fri, Jul 8, 2011 at 12:15 AM, Shawn Milochik  wrote:

> Could it be because the test is passing 'Brasil' instead of 'BR'? I'm
> assuming 'BR' is a valid choice and 'Brasil' is invalid. That's why you're
> passing 'PR' instead of 'Paraná' in your data dictionary.
>
> If the field isn't a required field, then your form.is_valid() would be
> true, but there wouldn't be a value in cleaned_data['country'] when you got
> to your form's clean().
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to django-users+unsubscribe@**
> googlegroups.com .
> For more options, visit this group at http://groups.google.com/**
> group/django-users?hl=en
> .
>
>

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



Re: KeyError in UnitTests

2011-07-07 Thread Shawn Milochik
Could it be because the test is passing 'Brasil' instead of 'BR'? I'm 
assuming 'BR' is a valid choice and 'Brasil' is invalid. That's why 
you're passing 'PR' instead of 'Paraná' in your data dictionary.


If the field isn't a required field, then your form.is_valid() would be 
true, but there wouldn't be a value in cleaned_data['country'] when you 
got to your form's clean().



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



Re: KeyError in UnitTests

2011-07-07 Thread Daniel França
Here's the verbosity result of tests running (using nose), the most
important part, I guess

Creating table cadastroav_country

==
ERROR: Tests Novo Usuario Cliente
--
Traceback (most recent call last):
  File
"/Users/danielfranca/Workspace/geminimedia/geminiav/apps/usuarios/tests/tests.py",
line 66, in test_new_user_client
resp = self.c.post(reverse('novo_cliente'), values)
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.3-py2.7.egg/django/test/client.py",
line 455, in post
response = super(Client, self).post(path, data=data,
content_type=content_type, **extra)
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.3-py2.7.egg/django/test/client.py",
line 256, in post
return self.request(**r)
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.3-py2.7.egg/django/core/handlers/base.py",
line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
  File
"/Users/danielfranca/Workspace/geminimedia/geminiav/apps/usuarios/views.py",
line 170, in new_edit_user
if validate_user(form, profile, logged_profile):
  File
"/Users/danielfranca/Workspace/geminimedia/geminiav/apps/usuarios/views.py",
line 76, in validate_user
if form.is_valid():
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.3-py2.7.egg/django/forms/forms.py",
line 121, in is_valid
return self.is_bound and not bool(self.errors)
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.3-py2.7.egg/django/forms/forms.py",
line 112, in _get_errors
self.full_clean()
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.3-py2.7.egg/django/forms/forms.py",
line 268, in full_clean
self._clean_form()
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.3-py2.7.egg/django/forms/forms.py",
line 296, in _clean_form
self.cleaned_data = self.clean()
  File
"/Users/danielfranca/Workspace/geminimedia/geminiav/apps/usuarios/forms.py",
line 59, in clean
country = self.cleaned_data['country']
KeyError: 'country'
 >> begin captured logging << 
root: DEBUG: New User - Start
root: DEBUG: New User - Profile Id None
root: DEBUG: usuarios.views.prepare_forms - Start C
root: DEBUG: usuarios.views.prepare_forms - End
root: DEBUG: New User - End
root: DEBUG: New User - Start
root: DEBUG: New User - Profile Id None
root: DEBUG: usuarios.views.validate_user - Start
django.request: ERROR: Internal Server Error: /usuarios/cliente/novo/
Traceback (most recent call last):
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.3-py2.7.egg/django/core/handlers/base.py",
line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
  File
"/Users/danielfranca/Workspace/geminimedia/geminiav/apps/usuarios/views.py",
line 170, in new_edit_user
if validate_user(form, profile, logged_profile):
  File
"/Users/danielfranca/Workspace/geminimedia/geminiav/apps/usuarios/views.py",
line 76, in validate_user
if form.is_valid():
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.3-py2.7.egg/django/forms/forms.py",
line 121, in is_valid
return self.is_bound and not bool(self.errors)
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.3-py2.7.egg/django/forms/forms.py",
line 112, in _get_errors
self.full_clean()
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.3-py2.7.egg/django/forms/forms.py",
line 268, in full_clean
self._clean_form()
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.3-py2.7.egg/django/forms/forms.py",
line 296, in _clean_form
self.cleaned_data = self.clean()
  File
"/Users/danielfranca/Workspace/geminimedia/geminiav/apps/usuarios/forms.py",
line 59, in clean
country = self.cleaned_data['country']
KeyError: 'country'
- >> end captured logging << -

The Models:
class Country(models.Model):
"""
Countries list
"""
name = models.CharField(_('name'), max_length=200, null=False)

class Meta:
verbose_name = _('country')
verbose_name_plural = _('countries')

def __unicode__(self):
return self.name

The form
class ProfileForm(forms.ModelForm):

first_name = forms.CharField(
label=_(u'*Nome'),error_messages = { 'required':'Campo Nome é obrigatório'
})
last_name  = forms.CharField(
label=_(u'*Sobrenome'),error_messages = { 'required':'Campo Sobrenome é
obrigatório' })

Re: KeyError in UnitTests

2011-07-07 Thread Daniel França
I was thinking, if country isn't created, so this test should fail, but
that's not what happen when I was using nose

*country = Country.objects.get(pk=35)*
*self.assertEqual( country.name, 'Brasil' )*
*
*

On Thu, Jul 7, 2011 at 11:47 PM, Shawn Milochik  wrote:

> On 07/07/2011 10:44 PM, Daniel França wrote:
>
>> I changed the test runner to default and the error message is a lot more
>> clear.
>> I got a DatabaseError: no such table: cadastroav_country
>>
>> but this should be created by tests, right?
>> I'm using South, maybe it's a problem?
>>
>>
> The problem could be with your migrations. I use South and my unit tests
> work fine. Are you sure your migrations all run, and run properly, when your
> test database is built? A lot of info scrolls by pretty quickly; it's
> possible you missed some errors.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to django-users+unsubscribe@**
> googlegroups.com .
> For more options, visit this group at http://groups.google.com/**
> group/django-users?hl=en
> .
>
>

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



Re: KeyError in UnitTests

2011-07-07 Thread Shawn Milochik

On 07/07/2011 10:44 PM, Daniel França wrote:
I changed the test runner to default and the error message is a lot 
more clear.

I got a DatabaseError: no such table: cadastroav_country

but this should be created by tests, right?
I'm using South, maybe it's a problem?



The problem could be with your migrations. I use South and my unit tests 
work fine. Are you sure your migrations all run, and run properly, when 
your test database is built? A lot of info scrolls by pretty quickly; 
it's possible you missed some errors.


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



Re: KeyError in UnitTests

2011-07-07 Thread Daniel França
I changed the test runner to default and the error message is a lot more
clear.
I got a DatabaseError: no such table: cadastroav_country

but this should be created by tests, right?
I'm using South, maybe it's a problem?

2011/7/7 Daniel França 

> I did some tests
> I put self.cleaned_data['X']
> where X I change to all the fields of my form, it in *def clean() *
> function
> and it seems only 2 fields aren't available, state and country, I believe
> that it's not a coincidence that both of them are foreign key(objects).
>
> I'm using a sqlite database and nose for tests, when I tried to put
> pdb.set_trace my tests freezes like this:
>
> nosetests --verbosity 1 usuarios
> Creating test database for alias 'default'...
>
>
> On Thu, Jul 7, 2011 at 11:34 PM, Shawn Milochik wrote:
>
>> You should be able to use pdb and then examine variables in scope. Aren't
>> you getting a pdb prompt? Are you redirecting your output?
>>
>> You can also using logging and put a bunch of debug statements in to
>> narrow down where the problem lies.
>>
>> If you can make a bare-bones copy of your app that duplicates your problem
>> and provide it I'm sure someone would take a look. Also, paring down your
>> code to the smallest broken piece is likely to reveal the source of the
>> problem to 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-users@googlegroups.com.
>> To unsubscribe from this group, send email to django-users+unsubscribe@**
>> googlegroups.com .
>> For more options, visit this group at http://groups.google.com/**
>> group/django-users?hl=en
>> .
>>
>>
>

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



Serving static files weirdness

2011-07-07 Thread neridaj
I had my static files being served form media i.e., the tree looked
like this:

media/
/css
/js
/images

with this in my url conf:
if settings.SERVE_MEDIA_FROM_DJANGO:
urlpatterns += patterns('',
(r'^media/(?P.*)$', 'django.views.static.serve',
{'document_root': r'media'}),
(r'^tiny_mce/(?P.*)$', 'django.views.static.serve',
{ 'document_root': r'media/js/tiny_mc' }),
)

I then switched it to this:

static/
/css
/js
/images

with this in my url conf:
if settings.SERVE_MEDIA_FROM_DJANGO:
urlpatterns += patterns('',
(r'^static/(?P.*)$', 'django.views.static.serve',
{'document_root': r'static'}),
(r'^tiny_mce/(?P.*)$', 'django.views.static.serve',
{ 'document_root': r'static/js/tiny_mc' }),
)

I don't understand why changing media to static has stopped django
from serving static files, any ideas?

Cheers,

J

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



Re: KeyError in UnitTests

2011-07-07 Thread Daniel França
I did some tests
I put self.cleaned_data['X']
where X I change to all the fields of my form, it in *def clean() *function
and it seems only 2 fields aren't available, state and country, I believe
that it's not a coincidence that both of them are foreign key(objects).

I'm using a sqlite database and nose for tests, when I tried to put
pdb.set_trace my tests freezes like this:

nosetests --verbosity 1 usuarios
Creating test database for alias 'default'...


On Thu, Jul 7, 2011 at 11:34 PM, Shawn Milochik  wrote:

> You should be able to use pdb and then examine variables in scope. Aren't
> you getting a pdb prompt? Are you redirecting your output?
>
> You can also using logging and put a bunch of debug statements in to narrow
> down where the problem lies.
>
> If you can make a bare-bones copy of your app that duplicates your problem
> and provide it I'm sure someone would take a look. Also, paring down your
> code to the smallest broken piece is likely to reveal the source of the
> problem to 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-users@googlegroups.com.
> To unsubscribe from this group, send email to django-users+unsubscribe@**
> googlegroups.com .
> For more options, visit this group at http://groups.google.com/**
> group/django-users?hl=en
> .
>
>

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



Re: KeyError in UnitTests

2011-07-07 Thread Shawn Milochik
You should be able to use pdb and then examine variables in scope. 
Aren't you getting a pdb prompt? Are you redirecting your output?


You can also using logging and put a bunch of debug statements in to 
narrow down where the problem lies.


If you can make a bare-bones copy of your app that duplicates your 
problem and provide it I'm sure someone would take a look. Also, paring 
down your code to the smallest broken piece is likely to reveal the 
source of the problem to 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-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: KeyError in UnitTests

2011-07-07 Thread Daniel França
I already tried to put the code in def clean(), same error,
and I did this change you suggested andré, but same error again.

as I said using the manual process the validation works fine

I don't know how to debug this in unit tests, pdb.set_trace simply freeze my
running tests =/

On Thu, Jul 7, 2011 at 10:24 PM, Andre Terra  wrote:

> My guess is that the input for the country field in the test is not
> the same as when a user POSTs the form.
>
> This is probably because you're passing a Country instance rather than
> country.name in your 'values' variable.
>
> Furthermore, if country can be blank, you should use
>
> if cleaned_data.get('country', None):
>do_stuff()
>
> to avoid that KeyError.
>
> Try that and if it doesn't work, post your complete form with
> validation and the relevant view.
>
> Boa sorte!
>
> Abraço,
> André
>
> On 7/7/11, Daniel França  wrote:
> > Hi,
> > I'm starting to use unit tests in Django, I got stuck in a client test I
> > can't figure out the solution,
> > As I don't have much experience in Django unit tests maybe the error is
> easy
> > to solve
> >
> >
> > I got this error message executing unit tests
> >apps/usuarios/forms.py", line 95, in clean_document
> > country  = self.cleaned_data['country']
> > KeyError: 'country'
> >
> > this is the line (here's cleaning country, but whatever, there's no data
> at
> > all)
> > def clean_document(self):
> >  country  = self.cleaned_data['country']
> >
> > If I do the manual process of inserting values in form, it works fine,
> the
> > problem is in the unit tests, here's my class and function that the
> problem
> > happens
> >
> > class UsersTestCase(TestCase):
> > fixtures = ['initial_data.yaml',]
> >
> > def test_new_user_client(self):
> > """
> > Testing new user client
> > """
> > country = Country.objects.get(pk=35)
> > self.assertEqual( country.name, 'Brasil' )
> >
> > state = State.objects.get(abrev_name='RJ')
> > self.assertEqual( state.full_name, 'Rio de Janeiro' )
> >
> > c = Client()
> > values = {
> > 'first_name': 'Teste',
> > 'last_name': 'Sobrenome',
> > 'address': 'Avenida de Teste',
> > 'number': 9876,
> > 'city': 'Rio de Janeiro',
> > 'postal_code': '12345-000',
> > 'state': state,
> > 'country': country,
> > 'telephone': '+55 21 2345 9841',
> > 'email': 'test...@mailinator.com',
> > 'reg_type': 'PF',
> > 'document': '692.694.115-75',
> > }
> >
> > resp = c.get( reverse('new_client'), { 'extra_context':
> > {'user_type':'C',}})
> >
> > self.assertEqual(resp.context['user_type'], 'C')
> > self.assertEqual(resp.context['title'], 'Cliente')
> > self.assertFalse(resp.context['aprov'])
> >
> > *resp = c.post(reverse('new_client'), values) #HERE'S THE ERROR*
> >
> >
> > Any idea of what's the problem?
> > And how can I use pdb/ipdb together with django unit tests? I tried to
> use
> > that, but the tests simply stuck and no shell appears for me.
> >
> >
> > Att,
> > Daniel França
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-users@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/django-users?hl=en.
> >
> >
>
> --
> Sent from my mobile device
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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



Re: KeyError in UnitTests

2011-07-07 Thread Andre Terra
My guess is that the input for the country field in the test is not
the same as when a user POSTs the form.

This is probably because you're passing a Country instance rather than
country.name in your 'values' variable.

Furthermore, if country can be blank, you should use

if cleaned_data.get('country', None):
do_stuff()

to avoid that KeyError.

Try that and if it doesn't work, post your complete form with
validation and the relevant view.

Boa sorte!

Abraço,
André

On 7/7/11, Daniel França  wrote:
> Hi,
> I'm starting to use unit tests in Django, I got stuck in a client test I
> can't figure out the solution,
> As I don't have much experience in Django unit tests maybe the error is easy
> to solve
>
>
> I got this error message executing unit tests
>apps/usuarios/forms.py", line 95, in clean_document
> country  = self.cleaned_data['country']
> KeyError: 'country'
>
> this is the line (here's cleaning country, but whatever, there's no data at
> all)
> def clean_document(self):
>  country  = self.cleaned_data['country']
>
> If I do the manual process of inserting values in form, it works fine, the
> problem is in the unit tests, here's my class and function that the problem
> happens
>
> class UsersTestCase(TestCase):
> fixtures = ['initial_data.yaml',]
>
> def test_new_user_client(self):
> """
> Testing new user client
> """
> country = Country.objects.get(pk=35)
> self.assertEqual( country.name, 'Brasil' )
>
> state = State.objects.get(abrev_name='RJ')
> self.assertEqual( state.full_name, 'Rio de Janeiro' )
>
> c = Client()
> values = {
> 'first_name': 'Teste',
> 'last_name': 'Sobrenome',
> 'address': 'Avenida de Teste',
> 'number': 9876,
> 'city': 'Rio de Janeiro',
> 'postal_code': '12345-000',
> 'state': state,
> 'country': country,
> 'telephone': '+55 21 2345 9841',
> 'email': 'test...@mailinator.com',
> 'reg_type': 'PF',
> 'document': '692.694.115-75',
> }
>
> resp = c.get( reverse('new_client'), { 'extra_context':
> {'user_type':'C',}})
>
> self.assertEqual(resp.context['user_type'], 'C')
> self.assertEqual(resp.context['title'], 'Cliente')
> self.assertFalse(resp.context['aprov'])
>
> *resp = c.post(reverse('new_client'), values) #HERE'S THE ERROR*
>
>
> Any idea of what's the problem?
> And how can I use pdb/ipdb together with django unit tests? I tried to use
> that, but the tests simply stuck and no shell appears for me.
>
>
> Att,
> Daniel França
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
Sent from my mobile device

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



Re: KeyError in UnitTests

2011-07-07 Thread Shawn Milochik
If you want to mess with 'country' then you write a clean_country(self) 
function. If you want to mess with 'document' you write a 
clean_document(self) function.


If you want to do something with one and be sure the other is also 
available, you write a clean(self) function, which executes after all 
the clean_fieldname functions.


You're getting an error in your clean_document function because you're 
trying to access 'country,' which isn't available just then.


Also, ensure that your custom clean functions return values, because 
otherwise you're losing them. So your clean_country() function should 
return whatever value you expect cleaned_data['country'] to contain.



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



Re: How to use the django-users mailing list properly and doing your homework..

2011-07-07 Thread Kenneth Gonsalves
On Thu, 2011-07-07 at 10:46 -0400, Shawn Milochik wrote:
> > mentioned.  With a threaded mail client, I use Mutt, they're much
> > easier to keep up with than anything web based.
> >
> 
> +1
> 
> I prefer this mailing list to anything else. It's far superior to IRC
> and a forum site (such as Stack Overflow) in my opinion, because I
> don't have to "go looking for it."
> 
> If I even filter a mailing list so it doesn't go into my inbox I end
> up falling behind and deleting all the messages unread. The only way I
> actively participate in this list is because it hits my inbox. 

+1
-- 
regards
KG
http://lawgon.livejournal.com
Coimbatore LUG rox
http://ilugcbe.techstud.org/

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



Re: Django Knowledge Strorehouse

2011-07-07 Thread Russell Keith-Magee
On Thu, Jul 7, 2011 at 9:30 PM, Venkatraman S  wrote:
>
>
>
> On Thu, Jul 7, 2011 at 6:50 PM, Tom Evans  wrote:
>>
>> Thinking 'but we can make our own Q site' is foolish. See Jeff
>> Attwood's post on the same subject:
>
> I wouldnt do this and am in no way going to be doing this. Instead, i am
> suggesting an ArticleBase.
>
>
>>
>> OP:
>> Noble aims. How do you aim to achieve 'highly curated' articles and
>> snippets?
>> One of the principle problems with djangosnippets is that the snippets
>> often tend to work only at the version of django the user developed
>> them at.
>> Do you intend to revalidate every article and snippet on every django
>> release?
>> How will you do that, will each snippet/article be required to have
>> testcases?
>> Who will write the testcases?
>> Will you validate against latest current release, or a variety of
>> releases?
>
> All the release information and etc etc will be mentioned clearly. What is
> supported and what not.
> I will try to write up a sample article on this and share to give you a
> flavour of what i have in mind.
>
> Who will write? Good q - anyone. But for it to appear in the article base,
> it has to be approved - the article should
> contain all the relevant information. Think in terms of wikibase for django
> tips/tricks/articles. ONE place.
>
> Though, I would still like this to be part of the djangoproject article
> storehouse than we hosting this independently.

Elaborating on Tom's comments, I would point out the following:

 * We already have a wiki that supports prose text, code snippets,
search and versioning.
 * We already have documentation, which is curated, and also has an
open policy of accepting new contributions.

This isn't a technical problem. It's a resource problem. Writing good
documentation is hard. This is a volunteer project, so we can't compel
anyone to curate anything (or do anything else for that matter).

I put it to you that developing an ArticleBase would be putting the
cart before the horse. The articles need to come *first*, and they
could be happily hosted on the wiki. Developing a massive warehouse
before you have something to put in it is getting the priorities
completely bass ackwards.

Once there's a solid collection of articles, and evidence that the
wiki isn't providing all the features that are needed, *then* it's
worth developing an improved document store. And *if* we get to that
point, you can count on the support of the core team and the DSF to
get you whatever resources you need.

So -- my humble suggestion: If you think there is a need for improving
Django documentation, I wholeheartedly agree. There's plenty of room
for improvement in Django's docs. But the place to start isn't to
write a massive technical site to host new documentation. You start by
*writing documentation*.

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



KeyError in UnitTests

2011-07-07 Thread Daniel França
Hi,
I'm starting to use unit tests in Django, I got stuck in a client test I
can't figure out the solution,
As I don't have much experience in Django unit tests maybe the error is easy
to solve


I got this error message executing unit tests
   apps/usuarios/forms.py", line 95, in clean_document
country  = self.cleaned_data['country']
KeyError: 'country'

this is the line (here's cleaning country, but whatever, there's no data at
all)
def clean_document(self):
 country  = self.cleaned_data['country']

If I do the manual process of inserting values in form, it works fine, the
problem is in the unit tests, here's my class and function that the problem
happens

class UsersTestCase(TestCase):
fixtures = ['initial_data.yaml',]

def test_new_user_client(self):
"""
Testing new user client
"""
country = Country.objects.get(pk=35)
self.assertEqual( country.name, 'Brasil' )

state = State.objects.get(abrev_name='RJ')
self.assertEqual( state.full_name, 'Rio de Janeiro' )

c = Client()
values = {
'first_name': 'Teste',
'last_name': 'Sobrenome',
'address': 'Avenida de Teste',
'number': 9876,
'city': 'Rio de Janeiro',
'postal_code': '12345-000',
'state': state,
'country': country,
'telephone': '+55 21 2345 9841',
'email': 'test...@mailinator.com',
'reg_type': 'PF',
'document': '692.694.115-75',
}

resp = c.get( reverse('new_client'), { 'extra_context':
{'user_type':'C',}})

self.assertEqual(resp.context['user_type'], 'C')
self.assertEqual(resp.context['title'], 'Cliente')
self.assertFalse(resp.context['aprov'])

*resp = c.post(reverse('new_client'), values) #HERE'S THE ERROR*


Any idea of what's the problem?
And how can I use pdb/ipdb together with django unit tests? I tried to use
that, but the tests simply stuck and no shell appears for me.


Att,
Daniel França

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



Re: Some thoughts on a package/stack compile system for easy distribution of webapps..

2011-07-07 Thread Bjarni Rúnar Einarsson
I actually just wrote a similar tool for solving a (very limited) subset of
this problem:

   http://pagekite.net/wiki/Floss/PyBreeder/
   https://github.com/pagekite/PyBreeder

It's basically a small tool for combining multiple .py files into one.  It's
trivial I know, but I looked all over and couldn't find anything quite like
it, so I ended up writing my own.  Breeder is not very smart and it does not
handle any binary dependencies, but it might still be capable of packaging
up a working django server in some cases. :-)

I'd love to review patches to make it smarter...

Another related thing I wanted to point out though, was that recent versions
of Python have support for executing Python code directly out of .zip
archives, which accomplishes the same thing as my breeder but in a more
elegant way - Breeder's main advantage is that it's compatible all the way
back to Python 2.2 and people know what .py means.

People haven't yet learned that running 'python foobar.zip' may actually do
something useful. :-)

-- 
Bjarni R. Einarsson
Founder, lead developer of PageKite.

Make localhost servers visible to the world: http://pagekite.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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Django model with 3 many to many fields

2011-07-07 Thread shwetanka
I have these models

class User(models.Model):
user_name = models.CharField()
ph_number = models.CharField()

class ExamPaper(models.Model):
paper_name = models.CharField()
paper_subject = models.CharField()

class Questions(models.Model):
paper = models.ManyToManyField(ExamPaper,
related_name='question_set')
question_num = models.IntegerField()
question_text = models.TextField()
Now I want to store the results of each question by each user for each
paper. Paper will have multiple questions and a question may also
belong to multiple papers. User may give multiple papers and multiple
questions.

I want mysql table to have user, paper and question to define primary
key taken all together and two more fields 'marks' and 'result'. I'm
not able to understand how to do this in django models. Will this
work:

class Result(models.Model):
 user = models.ManyToManyField(User)
 paper = models.ManyToManyField(ExamPaper)
 question = models.ManyToManyField(Question)
 marks = models.IntegerField()
 result = models.CharField()
Please anyone can anyone explain?

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



anybody using PhoneGap with Django

2011-07-07 Thread John Fabiani
Hi guys,
I'm wondering if anyone has had any success with PhoneGap and Django?

Johnf

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



Re: cropping of an image

2011-07-07 Thread jaspreet kaur
On Fri, Jul 8, 2011 at 2:01 AM, Jonas Geiregat  wrote:
>
>
>>
>> I want the code for including an image with crop feature.
>
> Django doesn't come with any image handling libraries.
> I've done this before and have used PIL (Python Image Library) for it.
>
> It might be advised to use this in combination with celery if you're handling 
> large files.
> That way it wouldn't slow down the request.
Ok, thanks
> Regards,
>
> Jonas
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>

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



Re: Django Debug Toolbar

2011-07-07 Thread Cal Leeming [Simplicity Media Ltd]
+1 DDT is a great thing. Altho if you are doing data intensive applications,
you might need to disable it for some pages. For example ,one of our webapps
increases to 55s loading time from 5s (its a heavy data reporting page).
Other than that, its a lovely thing :)
On 7 Jul 2011 17:42, "Venkatraman S"  wrote:
> If you are *not* developing RIA applications, then this is a MUST app in
> your workspace.
> I have reduced the number of queries in some of my pages from 40+ to 4+
and
> i can see HUGE performance benefits.
> Also, more importantly, this has *significantly* improved my design
skills.
>
> -V
>
> --
> You received this message because you are subscribed to the Google Groups
"Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.
>

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



Re: error on django-admin.py startproject

2011-07-07 Thread jaspreet kaur
Your problem is solved or not?

On Fri, Jul 8, 2011 at 12:39 AM, Phil  wrote:
>
> Thanks for advice everyone.
>
> I had installed python2.7 the normal way using "wget
> http://www.python.org/ftp/python/2.7/Python-2.7.tar.bz2;
>
> I am reading up a bit more on it and will give it another go hopefully
> with more success.
>
> Thanks again.
>
>
> On Jul 4, 10:15 am, Tim Diggins  wrote:
> > I think it helps you to use virtualenv when using django on a machine
> > with multiple pythons (it's a great tool anyway, but this is an extra
> > reason).
> >
> > the trick is to use virtualenv's -p argument when creating the
> > environment, to specify the path to the python executable.
> > so, in summary:
> >
> > 1) install virtualenv[1] (in any python - whatever one works on the
> > command line - maybe by installing the python-virtualenv package on
> > your packaging system. Depending on your packaging system, you may
> > need to then upgrade it (using pip, which virtualenv automatically
> > installs: pip install --upgrade virtualenv)
> > 2) create a virtualenv
> > virtualenv -p /path/to/python2.7 /some/new/path/for/env
> > 3) activate the virtualenv in your shell
> > /some/new/path/for/env/bin/activate
> > 4) install django using that environment
> > (it will pick up the python in the shell - you can also I think use
> > pip with a subversion repos[2], but I haven't done that).
> > [1]http://pypi.python.org/pypi/virtualenv
> > [2]http://www.pip-installer.org/en/latest/requirement-format.html
> >
> > On Jul 4, 9:26 am, bruno desthuilliers 
> > wrote:
> >
> >
> >
> >
> >
> >
> >
> > > On Jul 3, 5:46 pm, Phil  wrote:
> >
> > > > Thanks for all the comments everyone, it's a great help.
> >
> > > > Yes I have more than one python installed, when I got the server it
> > > > had python2.4 and I read the latest django stopped supporting 2.4 so I
> > > > installed python2.7 after reading this(also it said not to delete
> > > > python2.4 because 'yum' needs it to survive).
> >
> > > Yeps, uninstalling your system's Python is usually a *very* bad idea
> > > (unless you want a broken system, of course).
> >
> > > > But I had already
> > > > installed django when I just had 2.4. So I reinstalled django after
> > > > installing python2.7, but it is still obviously pointing to wrong
> > > > python version.
> > > > Is it now just a matter of me changing the top line in my 'django-
> > > > admin.py' file to point to correct python version, something like?...
> >
> > > > #! /path/to/python2.7/env python2.7
> >
> > > > If yes, how do I find correct path to python2.7
> >
> > > how did you install python 2.7 ?
> >
> > > Also and FWIW, this has nothing to do with django so this discussion
> > > would be better on comp.lang.python
> >
> > > 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-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>

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



Re: cropping of an image

2011-07-07 Thread Jonas Geiregat


> 
> I want the code for including an image with crop feature.

Django doesn't come with any image handling libraries.
I've done this before and have used PIL (Python Image Library) for it.

It might be advised to use this in combination with celery if you're handling 
large files. 
That way it wouldn't slow down the request.

Regards,

Jonas

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



Re: How to use the django-users mailing list properly and doing your homework..

2011-07-07 Thread Cal Leeming [Simplicity Media Ltd]
To be honest, there is no reason why someone cant make something which they
believe will be useful, and use the django-users archive as db filler. If it
doesnt catch on in the community, at least you'd learn a bunch of new stuff
and get the opportunity to try out new things outside of a typical
production/work environment.

The other thing to consider, is how far should we go to making info easily
accessible. I personally feel that being a coder isnt just about writing
code ,its about solving problems, self learning, the thrill of tackling
problems.. and Google+django docs + django snippets gives me all the answers
i could ever need.. do we really need to make it easier?? Takes away some of
the fun :X (i have found SO very helpful before - but i always enter from
google ,i never search directly in SO)

On 7 Jul 2011 18:28, "Micky Hulse"  wrote:

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



Re: How to use the django-users mailing list properly and doing your homework..

2011-07-07 Thread Cal Leeming
To be honest, there is no reason why someone cant make something which they
believe will be useful, and use the django-users archive as db filler. If it
doesnt catch on in the community, at least you'd learn a bunch of new stuff
and get the opportunity to try out new things outside of a typical
production/work environment.

The other thing to consider, is how far should we go to making info easily
accessible. I personally feel that being a coder isnt just about writing
code ,its about solving problems, self learning, the thrill of tackling
problems.. and Google+django docs + django snippets gives me all the answers
i could ever need.. do we really need to make it easier?? Takes away some of
the fun :X (i have found SO very helpful before - but i always enter from
google ,i never search directly in SO)
On 7 Jul 2011 18:28, "Micky Hulse"  wrote:

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



NoReverseMatch in django production server

2011-07-07 Thread mf
The project is working fine in the dev server but when I try to use it
in the production sv(Gunicorn + Nginx), NoReverseMatch error appears.
I checked the code several times and I can't find the error.

urls.py:

from django.conf.urls.defaults import patterns, include, url
from django.conf import settings

urlpatterns = patterns('',
(r'^obras/', include('obras.urls')),
)
obras urls.py:

from django.conf.urls.defaults import *
from obras import views

urlpatterns = patterns('',
url(r'^presobra/$', views.pres_obra, name='pres_obra'),
)
Error message:

Request URL: http://127.0.0.1:/admin/

Python Path:
['/srv/www/antingprojects.com.ar/gobras', ... ']

Exception Value:
Caught NoReverseMatch while rendering: Reverse for 'pres_obra' with
arguments '()' and keyword arguments '{}' not found.

Template error

In template /srv/www/antingprojects.com.ar/gobras/templates/admin/
index.html, error at line 75 Caught NoReverseMatch while rendering:
Reverse for 'pres_obra' with arguments '()' and keyword arguments '{}'
not found.

75  Presupuestos-Obras
settings.py:

import os.path
PROJECT_DIR = os.path.dirname(__file__)
ROOT_URLCONF = 'gobras.urls'
Project structure:

-gobras
--obras
--media

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



cropping of an image

2011-07-07 Thread jaspreet kaur
Hello everyone
I want the code for including an image with crop feature.
Please help me
Thanks in advance
Jaspreet

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



Re: django/python performance vs play/java

2011-07-07 Thread Jason
I recommend you give this a shot:

http://backslashn.com/post/505601626/profiling-execution-with-the-django-debug-toolbar

It might give some clues and is VERY fast to setup.

On Jul 6, 8:44 am, drakkan  wrote:
> You can download the code here:
>
> http://77.43.75.110/temp/cinquestelle.tar.gz
>
> you need sorl as dependencies too:
>
> http://pypi.python.org/pypi/sorl-thumbnail/3.2.5
>
> On 6 Lug, 15:57, Björn Lindqvist  wrote:
>
>
>
>
>
>
>
> > 2011/7/6 drakkan :
>
> > > Bruno, I'm talking about an high level framework such as play (http://
> > >www.playframework.org/). Develop an application with play is as simple
> > > as a django one, until now I used django and I like python more than
> > > java and I want to understand if I'm doing something wrong or if is
> > > the framework/programming language that is performing so bad. I sent
> > > my code to Xavier, I noticed now I sent a private email, if someone
> > > other would like to see my test code I can resend the link to download
> > > it, however is a really simple app that make two db queries and render
> > > a template I cannot see anything wrong in it
>
> > Please send the link. Just because you can't see anything wrong with
> > the code, doesn't mean there isn't anything wrong with it. Likely, you
> > are doing something wrong which eats up the performance but without
> > seeing the source, one can only speculate on what that may be. Your
> > "simple" app aren't as simple as you think it is.
>
> > There are dozens of similar threads created on the python related
> > mailing lists each year. In some cases python is slower than language
> > X, in other cases it is faster (because much of the core is
> > implemented in C, for example) other times it does not matter because
> > the task is IO bound anyway.
>
> > --
> > mvh/best regards Björn Lindqvisthttp://www.footballexperts.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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: error on django-admin.py startproject

2011-07-07 Thread Phil
Thanks for advice everyone.

I had installed python2.7 the normal way using "wget
http://www.python.org/ftp/python/2.7/Python-2.7.tar.bz2;

I am reading up a bit more on it and will give it another go hopefully
with more success.

Thanks again.


On Jul 4, 10:15 am, Tim Diggins  wrote:
> I think it helps you to use virtualenv when using django on a machine
> with multiple pythons (it's a great tool anyway, but this is an extra
> reason).
>
> the trick is to use virtualenv's -p argument when creating the
> environment, to specify the path to the python executable.
> so, in summary:
>
> 1) install virtualenv[1] (in any python - whatever one works on the
> command line - maybe by installing the python-virtualenv package on
> your packaging system. Depending on your packaging system, you may
> need to then upgrade it (using pip, which virtualenv automatically
> installs: pip install --upgrade virtualenv)
> 2) create a virtualenv
> virtualenv -p /path/to/python2.7 /some/new/path/for/env
> 3) activate the virtualenv in your shell
> /some/new/path/for/env/bin/activate
> 4) install django using that environment
> (it will pick up the python in the shell - you can also I think use
> pip with a subversion repos[2], but I haven't done that).
> [1]http://pypi.python.org/pypi/virtualenv
> [2]http://www.pip-installer.org/en/latest/requirement-format.html
>
> On Jul 4, 9:26 am, bruno desthuilliers 
> wrote:
>
>
>
>
>
>
>
> > On Jul 3, 5:46 pm, Phil  wrote:
>
> > > Thanks for all the comments everyone, it's a great help.
>
> > > Yes I have more than one python installed, when I got the server it
> > > had python2.4 and I read the latest django stopped supporting 2.4 so I
> > > installed python2.7 after reading this(also it said not to delete
> > > python2.4 because 'yum' needs it to survive).
>
> > Yeps, uninstalling your system's Python is usually a *very* bad idea
> > (unless you want a broken system, of course).
>
> > > But I had already
> > > installed django when I just had 2.4. So I reinstalled django after
> > > installing python2.7, but it is still obviously pointing to wrong
> > > python version.
> > > Is it now just a matter of me changing the top line in my 'django-
> > > admin.py' file to point to correct python version, something like?...
>
> > > #! /path/to/python2.7/env python2.7
>
> > > If yes, how do I find correct path to python2.7
>
> > how did you install python 2.7 ?
>
> > Also and FWIW, this has nothing to do with django so this discussion
> > would be better on comp.lang.python
>
> > 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-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django/python performance vs play/java

2011-07-07 Thread Jason
Good catch.

Drakkan, I suggest trying out this ProfilingPanel for the Django Debug
Toolbar (very easy to setup).

http://backslashn.com/post/505601626/profiling-execution-with-the-django-debug-toolbar

I'd be very curious to know what you find.

On Jul 7, 8:16 am, akaariai  wrote:
> On Jul 6, 6:44 pm, drakkan  wrote:
>
> > You can download the code here:
>
> >http://77.43.75.110/temp/cinquestelle.tar.gz
>
> > you need sorl as dependencies too:
>
> >http://pypi.python.org/pypi/sorl-thumbnail/3.2.5
>
> I took a quick look of the source. I think the limiting factor for you
> is template rendering speed. If I read the code correctly, you are
> generating thumbnails for every request. That could be the limiting
> factor, too. Activating cached template loading could help you a
> little.
>
>  - Anssi

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



Re: delete unnecessarily fields =D

2011-07-07 Thread Kase
i have 30 gb disk and meaby 15 webs... some dont use, so
delete it

my problem is not the space of disk,  my problem is the count of
fileds  =/  only 50 000  > in this momento in have 39 000 so i delete
webs dont in use, and i like delete fields dont in use too an i
think  that a  field for lenguages are  unecesarilys... i know is not
much space... meaby 200kb?   put i think meaby have 1000 fields



On 7 jul, 05:48, Calvin Spealman  wrote:
> It deleting "the language files that do not use" will save you any
> significant portion of your storage quota, then you seriously need a
> new hosting provider.
>
> On Thu, Jul 7, 2011 at 4:18 AM, Kase  wrote:
> > I need to lower the amount of files on my server becouse is a shared
> > server.
>
> > so I wonder if I can delete the folder that uses django during
> > instalaccion (where the setup.py) and I also wonder if I can delete
> > the language files that do not use, and where I can find
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Django users" group.
> > To post to this group, send email to django-users@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/django-users?hl=en.
>
> --
> Read my blog! I depend on your acceptance of my opinion! I am 
> interesting!http://techblog.ironfroggy.com/
> Follow me if you're into that sort of thing:http://www.twitter.com/ironfroggy

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



Re: How to use the django-users mailing list properly and doing your homework..

2011-07-07 Thread Micky Hulse
I personally have a dedicated gMail account for lists, which forwards
everything to my main gMail account, and then all list e-mails get
filtered into a "lists" label/folder.



Here's some (random) thoughts from a (self proclaimed) listserv
veteran and Django/Python noob:

1.

Am I the only one that likes to read list e-mails via his smartphone?

Does SO have an app?

I love SO when I am using my desktop, but I don't think I have ever
visited that site on my iPhone. Granted, all my coding is done on my
desktop, so surfing/searching the net is easier, but still... Mail.app
is just easy. :)

2.

I work at a company where my computer monitor is visible to anyone
walking by... Having my e-mail client open (Gmail) is much less risky
than having to constantly surf SO (or other forums) to keep updated.

3.

Related to above, having to dedicate yet another browser "app" tab to
another site does not sound optimal.

4.

Folks interested in improving existing Django resources might contact
Charles Leifer:

http://charlesleifer.com/blog/django-snippets-site-improvements-what-would-you-see/

Looks like he is open to suggestions.

5.

I think the former jQuery Google group is a prime example of what I
would /not/ like to see:

https://groups.google.com/forum/#!forum/jquery-en

They moved the Google group to a dedicated forum:

http://forum.jquery.com/

Personally, I am not a fan of the jQuery forum software; if I have to
use a forum, I much prefer the standard vBulletin software.

What frustrated me most about the jQuery move is that they turned off
the Google Group list... I just don't visit the jQuery forum unless I
have an urgent question. I hate to admit it, but I never hang out to
help.

It makes me wonder how many folks left the jQuery scene because of the
move to forums?

6.

As I said above, I think SO is great, but is it just me, or has anyone
else found the barrier to participation an annoyance?

I can't count the number of times I could have "chipped in" to help
out, but because I did not have a "reputation" or "points", I moved on
with my life without sharing an answer.

I  personally don't have time to worry about gaining points and/or
voting for things (see #2 above).

.

For me, I think the moral of the story is this: The more resources the
merrier



Thanks for listening.

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



Re: django/python performance vs play/java

2011-07-07 Thread Venkatraman S
On Wed, Jul 6, 2011 at 7:21 PM, akaariai  wrote:

>
> The best way to check where your performance problems come from is
> using profiling.
>
> In my experience, the most likely things to cause you performance
> problems in Django are database queries and template rendering. If
> template rendering is a problem for you, try Jinja2. Depending on the
> complexness of your template this can give you up to 10x performance
> gains. Jinja2 template language is almost like Django's. There are
> minor differences which can be annoying if you use both template
> engines at the same time.
>
>
How do you compare template rendering performances?
Also, is there any good free loadtesting tool which can be used in
django-devserver?

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



Django Debug Toolbar

2011-07-07 Thread Venkatraman S
If you are *not* developing RIA applications, then this is a MUST app in
your workspace.
I have reduced the number of queries in some of my pages from 40+ to 4+ and
i can see HUGE performance benefits.
Also, more importantly, this has *significantly* improved my design skills.

-V

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



Re: How to use the django-users mailing list properly and doing your homework..

2011-07-07 Thread Venkatraman S
On Thu, Jul 7, 2011 at 8:42 PM, Andre Terra  wrote:

> So basically, if SO emailed you new questions tagged as 'django' and
> your replies were posted as answers, you would be okay?
>


Guys,

SO, mailing lists, IRC etc are different channels for communication; and no
ONE channel alone can be useful and survive.
Every channel has its own etiquette and is useful based on the situation the
dev is in.

What the django community lacks is a good knowledge document base, and i am
trying to target this problem *alone*.
This knowledge base can have links to other data sources too - as long as it
presents it right when searched.

On IRC, we lack a good bot. Anyone wants to contribute in here?

-V

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



Re: How to use the django-users mailing list properly and doing your homework..

2011-07-07 Thread Shawn Milochik

On 07/07/2011 11:21 AM, Kevin Monceaux wrote:

On Thu, Jul 07, 2011 at 10:46:47AM -0400, Shawn Milochik wrote:


If I even filter a mailing list so it doesn't go into my inbox I end
up falling behind and deleting all the messages unread. The only way I
actively participate in this list is because it hits my inbox.

I'm on too many mailing lists to do that.  Mail from each list I'm on
gets sorted into a separate inbox.  I don't follow all of the lists
I'm on regularly, but I like to have the local list archives at my
fingertips if needed.  For unread messages Mutt distinguishes between
old messages that were in the mailbox the last time it was accessed
and new messages that were added after the mailbox was last accessed.
It's easy to skim through and zero in on new topics that are of
interest, and/or old threads that I've been following.





I'm on too many mailing lists for that also, but I also don't care 
enough about most of them to want to stay current.


The django-users list is the only one (with notable volume) that goes 
into the inbox of my primary e-mail account. When I'm having a really 
busy period at work or something I'll sometimes filter it for a while. 
You can tell when I'm not filtering because I tend to reply a fair amount.



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



Re: How to use the django-users mailing list properly and doing your homework..

2011-07-07 Thread Kevin Monceaux
On Thu, Jul 07, 2011 at 10:46:47AM -0400, Shawn Milochik wrote:

> If I even filter a mailing list so it doesn't go into my inbox I end
> up falling behind and deleting all the messages unread. The only way I
> actively participate in this list is because it hits my inbox.

I'm on too many mailing lists to do that.  Mail from each list I'm on
gets sorted into a separate inbox.  I don't follow all of the lists
I'm on regularly, but I like to have the local list archives at my
fingertips if needed.  For unread messages Mutt distinguishes between
old messages that were in the mailbox the last time it was accessed
and new messages that were added after the mailbox was last accessed.
It's easy to skim through and zero in on new topics that are of
interest, and/or old threads that I've been following.



-- 

Kevin
http://www.RawFedDogs.net
http://www.WacoAgilityGroup.org
Bruceville, TX

What's the definition of a legacy system?  One that works! 
Errare humanum est, ignoscere caninum.

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



Re: How to use the django-users mailing list properly and doing your homework..

2011-07-07 Thread Shawn Milochik

On 07/07/2011 11:12 AM, Andre Terra wrote:

So basically, if SO emailed you new questions tagged as 'django' and
your replies were posted as answers, you would be okay?

Cheers,
André


I think my answer to that is 'yes.' It might be even better that way, 
because of the ability to vote questions up and down and a much better 
search system than Google Groups. Also, the ability to paste in 
formatted code recently discussed is built in.



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



Re: django/python performance vs play/java

2011-07-07 Thread akaariai
On Jul 6, 6:44 pm, drakkan  wrote:
> You can download the code here:
>
> http://77.43.75.110/temp/cinquestelle.tar.gz
>
> you need sorl as dependencies too:
>
> http://pypi.python.org/pypi/sorl-thumbnail/3.2.5
>

I took a quick look of the source. I think the limiting factor for you
is template rendering speed. If I read the code correctly, you are
generating thumbnails for every request. That could be the limiting
factor, too. Activating cached template loading could help you a
little.

 - Anssi

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



Re: How to use the django-users mailing list properly and doing your homework..

2011-07-07 Thread Andre Terra
So basically, if SO emailed you new questions tagged as 'django' and
your replies were posted as answers, you would be okay?

Cheers,
André

On 7/7/11, Shawn Milochik  wrote:
> On Thu, Jul 7, 2011 at 10:41 AM, Kevin Monceaux 
> wrote:
>> On Wed, Jul 06, 2011 at 08:38:42PM -0300, Andre Terra wrote:
>>
>>> If we could move the questions to a specific site, everyone would
>>> benefit.
>>
>> Not everyone.  I much prefer mailing lists to any of the other options
>> mentioned.  With a threaded mail client, I use Mutt, they're much
>> easier to keep up with than anything web based.
>>
>
> +1
>
> I prefer this mailing list to anything else. It's far superior to IRC
> and a forum site (such as Stack Overflow) in my opinion, because I
> don't have to "go looking for it."
>
> If I even filter a mailing list so it doesn't go into my inbox I end
> up falling behind and deleting all the messages unread. The only way I
> actively participate in this list is because it hits my inbox.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
Sent from my mobile device

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



Re: Display FK List

2011-07-07 Thread Venkatraman S
On Thu, Jul 7, 2011 at 7:19 PM, urukay  wrote:

> maybe autocomplete will user frendly solution.
>

Yup - i just got this working with ajax-selects. Thanks.

-V
http://blizzardzblogs.blogspot.com/

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



Re: How to use the django-users mailing list properly and doing your homework..

2011-07-07 Thread Shawn Milochik
On Thu, Jul 7, 2011 at 10:41 AM, Kevin Monceaux  wrote:
> On Wed, Jul 06, 2011 at 08:38:42PM -0300, Andre Terra wrote:
>
>> If we could move the questions to a specific site, everyone would
>> benefit.
>
> Not everyone.  I much prefer mailing lists to any of the other options
> mentioned.  With a threaded mail client, I use Mutt, they're much
> easier to keep up with than anything web based.
>

+1

I prefer this mailing list to anything else. It's far superior to IRC
and a forum site (such as Stack Overflow) in my opinion, because I
don't have to "go looking for it."

If I even filter a mailing list so it doesn't go into my inbox I end
up falling behind and deleting all the messages unread. The only way I
actively participate in this list is because it hits my inbox.

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



Re: How to use the django-users mailing list properly and doing your homework..

2011-07-07 Thread Kevin Monceaux
On Wed, Jul 06, 2011 at 08:38:42PM -0300, Andre Terra wrote:

> If we could move the questions to a specific site, everyone would
> benefit.

Not everyone.  I much prefer mailing lists to any of the other options
mentioned.  With a threaded mail client, I use Mutt, they're much
easier to keep up with than anything web based.  


-- 

Kevin
http://www.RawFedDogs.net
http://www.WacoAgilityGroup.org
Bruceville, TX

What's the definition of a legacy system?  One that works! 
Errare humanum est, ignoscere caninum.

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



Re: Issue with saving user information during django_registration

2011-07-07 Thread CareerDhaba tech
Yep, that solved the problem. Very stupid mistake on my part, but this is a
mistake I will learn from. I am a newbie at HTML as well, and I thought the
action was the redirect page, not the page to submit form data.

Thanks for your help André.

On Thu, Jul 7, 2011 at 6:27 PM, Andre Terra  wrote:

> I'm mostly guessing, but try this for your registration_form.html template
> instead http://dpaste.com/hold/564305/
>
>
> Cheers,
> André
>
> On Thu, Jul 7, 2011 at 12:03 AM, CareerDhaba tech wrote:
>
>> Hi André,
>>
>> Thanks for the feedback.
>>
>> Here is the relevant code:
>>
>> registration_form view:
>>
>> http://dpaste.com/564165/
>>
>> my views.py file directly from the django_registration app code:
>>
>> http://dpaste.com/564166/
>>
>> Here is my form class:
>>
>> http://dpaste.com/564167/
>>
>> - Harshil
>>
>>
>> On Thu, Jul 7, 2011 at 3:52 AM, Andre Terra  wrote:
>>
>>> Start by pasting relevant code. Views, forms and possibly the backend
>>> logic. Use dpaste.com
>>>
>>> And quit bumping or you'll never get an answer, not from most of us.
>>>
>>> Regards,
>>> André Terra
>>>
>>> On 7/6/11, CareerDhaba tech  wrote:
>>> > Bumping once more. Can anyone shine some light on this issue? Would be
>>> > extremely helpful.
>>> >
>>> >
>>> > On Wed, Jul 6, 2011 at 6:24 PM, CareerDhaba tech
>>> > wrote:
>>> >
>>> >> Bump - anyone has any insight into this?
>>> >>
>>> >> I am happy to post my code, just not sure where I am going wrong.
>>> >>
>>> >> On Wed, Jul 6, 2011 at 2:35 PM, CareerDhaba tech
>>> >> wrote:
>>> >>
>>> >>> Hey folks,
>>> >>>
>>> >>> Django newbie here and I need some help. I am using
>>> django_registration
>>> >>> v0.8 and using the docs here:
>>> >>> http://readthedocs.org/docs/django-registration/en/latest/index.html
>>> >>>
>>> >>> I have successfully installed the app, and I am using the default
>>> backend
>>> >>> for my registration purposes.
>>> >>>
>>> >>> I have tested this and I can get the form to show up properly at
>>> >>> '/accounts/register'
>>> >>>
>>> >>> However, one problem is that if I try and break the form input
>>> (different
>>> >>> password1 and password2 or improper username), no validation errors
>>> are
>>> >>> being invoked.
>>> >>>
>>> >>> The issue also, is that the username, email, and password data is not
>>> >>> being stored in auth_user, and the activation email isn't being sent.
>>> >>>
>>> >>> From the default backend doc, "During registration, a new instance of
>>> >>> django.contrib.auth.models.User is created to represent the new
>>> account,
>>> >>> with the is_active field set to False. An email is then sent to the
>>> email
>>> >>> address of the account, containing a link the user must click to
>>> activate
>>> >>> the account; at that point the is_active field is set to True, and
>>> the
>>> >>> user may log in normally."
>>> >>>
>>> >>> I believe this new instance of django.contrib.auth.models.User is not
>>> >>> being created.
>>> >>>
>>> >>> I have also included the necessary email settings:
>>> >>> EMAIL_USE_TLS = True
>>> >>> EMAIL_HOST = "smtp.gmail.com"
>>> >>> EMAIL_HOST_USER = "Email"
>>> >>> EMAIL_HOST_PASSWORD = "Password"
>>> >>> EMAIL_PORT = 587
>>> >>>
>>> >>> Any help on getting this straight? I am pretty sure I am missing
>>> >>> something
>>> >>> simple, but been trying to figure it out without any progress. Any
>>> help
>>> >>> is
>>> >>> greatly appreciated.
>>> >>>
>>> >>> Thanks,
>>> >>> Harshil
>>> >>>
>>> >>>
>>> >>
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> Groups
>>> > "Django users" group.
>>> > To post to this group, send email to django-users@googlegroups.com.
>>> > To unsubscribe from this group, send email to
>>> > django-users+unsubscr...@googlegroups.com.
>>> > For more options, visit this group at
>>> > http://groups.google.com/group/django-users?hl=en.
>>> >
>>> >
>>>
>>> --
>>> Sent from my mobile device
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Django users" group.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To 

Re: Any Polling/Survey Examples?

2011-07-07 Thread Shawn Milochik
Hi Gagiel,

I'm happy that you're getting interested in Django. You'll find a lot
of smart people here willing to help you out as you get started, but
it would help us a lot if you customize your approach to the list a
bit to help us help you.

Please check this out:
https://code.djangoproject.com/wiki/UsingTheMailingList

Once you've read that, do some research on your problem and try to ask
a question that would be easier for us to answer.

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



Re: Display FK List

2011-07-07 Thread urukay
Hi,

maybe autocomplete will user frendly solution.

Radovan
http://www.yau.sk

On 7. Júl, 10:39 h., Venkatraman S  wrote:
> i have 2 models: Items and a Transactions .
>
> Transactions has a fk to Items. Now, there can be millions of Items, and
> when i render Transaction as a modelform, i see that all the Items are being
> fetched - and this is quiet a lot of txt being sent over the wire. Is there
> an efficient way of associating this txn with an item without displaying it
> as a HUGE model form?
>
> What i can think of is :
> 1. suppress/exclude the Item while rendering the form, and instead show
> another form when the User mentions that he wants to associate this Item
> with a Txn.
> 2. Show an ajax field in Items, so that only a subset of the Items are shown
> as the user progressively types.
>
> However, i am looking for more efficient solutions.
>
> -V

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



Re: Django Knowledge Strorehouse

2011-07-07 Thread Venkatraman S
On Thu, Jul 7, 2011 at 6:50 PM, Tom Evans  wrote:

> Do you intend to revalidate every article and snippet on every django
> release?
> How will you do that, will each snippet/article be required to have
> testcases?
> Who will write the testcases?
>

Test cases are required only when they *are* required for sure.

-V

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



Re: Django Knowledge Strorehouse

2011-07-07 Thread Venkatraman S
On Thu, Jul 7, 2011 at 6:50 PM, Tom Evans  wrote:

> Thinking 'but we can make our own Q site' is foolish. See Jeff
> Attwood's post on the same subject:
>

I wouldnt do this and am in no way going to be doing this. Instead, i am
suggesting an ArticleBase.

  

> OP:
> Noble aims. How do you aim to achieve 'highly curated' articles and
> snippets?
> One of the principle problems with djangosnippets is that the snippets
> often tend to work only at the version of django the user developed
> them at.
> Do you intend to revalidate every article and snippet on every django
> release?
> How will you do that, will each snippet/article be required to have
> testcases?
> Who will write the testcases?
> Will you validate against latest current release, or a variety of releases?
>

All the release information and etc etc will be mentioned clearly. What is
supported and what not.
I will try to write up a sample article on this and share to give you a
flavour of what i have in mind.

Who will write? Good q - anyone. But for it to appear in the article base,
it has to be approved - the article should
contain all the relevant information. Think in terms of wikibase for django
tips/tricks/articles. ONE place.

Though, I would still like this to be part of the djangoproject article
storehouse than we hosting this independently.

-V

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



Re: Django Knowledge Strorehouse

2011-07-07 Thread Cal Leeming [Simplicity Media Ltd]
Hmm, Tom does have a point :/

On Thu, Jul 7, 2011 at 2:20 PM, Tom Evans  wrote:
> On Thu, Jul 7, 2011 at 2:04 PM, Cal Leeming [Simplicity Media Ltd]
>  wrote:
>> +1 SO (stackoverflow) style interface on the mailing list..
>>
>> +1 searchable code snippet database
>>
>> +1 importing of all existing django-users topics with smart topic linkage
>>
>> +1 ability to link related topics to each other.
>>
>
> No. Mailing lists are mailing lists, not forums or Q sites. These
> things already exist, if you want django SO, its here:
>
> http://stackoverflow.com/questions/tagged/django
>
> Thinking 'but we can make our own Q site' is foolish. See Jeff
> Attwood's post on the same subject:
>
> http://www.codinghorror.com/blog/2009/07/code-its-trivial.html
>
> OP:
> Noble aims. How do you aim to achieve 'highly curated' articles and snippets?
> One of the principle problems with djangosnippets is that the snippets
> often tend to work only at the version of django the user developed
> them at.
> Do you intend to revalidate every article and snippet on every django release?
> How will you do that, will each snippet/article be required to have testcases?
> Who will write the testcases?
> Will you validate against latest current release, or a variety of releases?
>
> Cheers
>
> 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-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>

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



Re: Complex Query help - get items from the org to which the user belongs

2011-07-07 Thread Venkatraman S
On Thu, Jul 7, 2011 at 3:49 PM, DrBloodmoney  wrote:

> On Thu, Jul 7, 2011 at 12:04 AM, Venkatraman S  wrote:
> > I am doing some bechmarking on the performance of both the versions of
> the
> > query:
> > 1.
> >
> Item.objects.filter(created_by__employees__org__in=u.employees_set.all().values_list('org'))
> > and
> > 2. Items.objects.extra(where=['created_by_id in (select e.user_id from
> > myapp_employees e, myapp_organization o where e.org_id = o.id and o.id =
> > (select o2.id from myapp_organization o2, myapp_employees e2 where
> e2.org_id
> > = o2.id and e2.user_id=3 and e2.deleted=False)) '])
> >
> > I am seeing #1 to be faster(when i view from DDT). Will update in the
> next
> > few days or probably early next week.
> >
> > -V
>
> Personally, I'd add a FK on the Item to the Employee, particularly if
> they're in the same app (Actually I'd replace the FK to User with one
> to Employee). I suspect that is a simplified models.py so I don't
> actually know if there would be a requirement to FK to User. (I also
> try to limit my code touching django.contrib.auth since using it is my
> biggest pain point for django).
>
>
Cant actually, as the Item can be created by both employees, and
'outsiders'.

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



Re: Django Knowledge Strorehouse

2011-07-07 Thread Tom Evans
On Thu, Jul 7, 2011 at 2:04 PM, Cal Leeming [Simplicity Media Ltd]
 wrote:
> +1 SO (stackoverflow) style interface on the mailing list..
>
> +1 searchable code snippet database
>
> +1 importing of all existing django-users topics with smart topic linkage
>
> +1 ability to link related topics to each other.
>

No. Mailing lists are mailing lists, not forums or Q sites. These
things already exist, if you want django SO, its here:

http://stackoverflow.com/questions/tagged/django

Thinking 'but we can make our own Q site' is foolish. See Jeff
Attwood's post on the same subject:

http://www.codinghorror.com/blog/2009/07/code-its-trivial.html

OP:
Noble aims. How do you aim to achieve 'highly curated' articles and snippets?
One of the principle problems with djangosnippets is that the snippets
often tend to work only at the version of django the user developed
them at.
Do you intend to revalidate every article and snippet on every django release?
How will you do that, will each snippet/article be required to have testcases?
Who will write the testcases?
Will you validate against latest current release, or a variety of releases?

Cheers

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



Re: Django Knowledge Strorehouse

2011-07-07 Thread Andre Terra
This is what I was talking about. We *definitely* need something like this
as the docs don't cover a lot of gotchas that impose a steeper learning
curve for newcomers.

I'm willing to write articles and contribute with some useful snippets, as
well as testing the code.

+1 on having per-release versions of snippets.


Cheers,
André

On Thu, Jul 7, 2011 at 10:04 AM, Cal Leeming [Simplicity Media Ltd] <
cal.leem...@simplicitymedialtd.co.uk> wrote:

> +1 SO (stackoverflow) style interface on the mailing list..
>
> +1 searchable code snippet database
>
> +1 importing of all existing django-users topics with smart topic linkage
>
> +1 ability to link related topics to each other.
>
>
> On Thu, Jul 7, 2011 at 2:02 PM, Cal Leeming [Simplicity Media Ltd]
>  wrote:
> > I'd be willing to put some time into this, for sure.
> >
> > Not sure how much code I could contribute (as I'm already involved in
> > a few other long term projects), but could certainly offer up
> > feedback/testing/resources etc.
> >
> > Cal
> >
> > On Thu, Jul 7, 2011 at 4:26 AM, Venkatraman S 
> wrote:
> >> Hi All,
> >>
> >> Probably i am jumping the gun, but i am very much ready to volunteer to
> >> develop and host a django article repository.
> >> The repository would be HIGHLY curated and store extremely useful
> articles
> >> and snippets.
> >>
> >> We already have djangosnippets - so was wondering if we can index this
> and
> >> use it in the storehouse.
> >>  (OR)
> >> Transform djangosnippets to contain curated articles along with snippets
> and
> >> build the articlebase on top of it. Make searching and browsing much
> more
> >> efficient.
> >>
> >> What do you guys think?
> >>
> >> -V
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "Django users" group.
> >> To post to this group, send email to django-users@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> django-users+unsubscr...@googlegroups.com.
> >> For more options, visit this group at
> >> http://groups.google.com/group/django-users?hl=en.
> >>
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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



Re: Dreamhost Virtualenv Question

2011-07-07 Thread Andre Terra
A few more important things to note:

Your projects shouldn't live within your virtualenv directory. You can
create projects and virtualenvs with the same name (I often do), but it's
not mandatory.

So here's an example setup

~/virtual/djangotrunk
~/virtual/socialwebzone

~/projects/socialwebzone
~/projects/polls
~/projects/csvimporter

The projects listed can run in any of the virtual environments, although
their behavior would probably vary (for example, if you have django 1.1 in
~/virtual/socialwebzone).

What you *must do* is customize the PYTHONPATH variable upon activating an
environment. This can be done in many ways. For example, by manually editing
the activate script[1] in each virtualenv. Or, if using
virtualenvwrapper[2], by creating a postactivate hook script[3]. This is
where having the same name for a project and virtualenv can come in handy,
because then you can programatically add ~/projects/ to the
PYTHONPATH.


Cheers,
André Terra


[1] example activate script on windows (not perfect):
http://dpaste.com/hold/564313/
[2] http://www.doughellmann.com/docs/virtualenvwrapper/index.html
[3]
http://www.doughellmann.com/docs/virtualenvwrapper/scripts.html#postactivate



On Wed, Jul 6, 2011 at 7:18 AM, DrBloodmoney  wrote:

> On Wed, Jul 6, 2011 at 3:31 AM, i...@webbricks.co.uk
>  wrote:
> > oh yeah
> >
> http://www.saltycrane.com/blog/2009/05/notes-using-pip-and-virtualenv-django/
> >
> > that page is my goto reference on building a virtualenv, you might
> > have already found it, but if not...
> >
> > On Jul 5, 10:28 pm, Jeremy  wrote:
> >> AHHH, that makes a little more sense.  I'm trying to install apps from
> >> Github.  Things like Pinax, and different individual blogging apps so
> >> that I can "plug" them into one Django project to give it multiple
> >> bits of social functionality.  Obviously I'm having a lot of trouble
> >> (some of it being that it sounds like I don't even know what I'm
> >> saying).  I've tried to install these apps through PIP and other forms
> >> on Dreamhost, but it keeps saying that I don't have permission.  The
> >> way that I believed to get around this is to set up virtualenv on my
> >> shared server space, and create the project inside of that, correct?
> >> But if I do this, how can I view the project that I creating live?
> >>
> >> Again, if this all sounds foolish, keep in mind I'm incredibly new to
> >> all these concepts and my not understand them enough.  I've been
> >> looking for someone locally to give me some Django lessons, but I keep
> >> coming up dry.
> >>
> >> Let me know if anyone can assist me.  Thanks guys.
> >>
>
> The two most important things to concern yourself with regarding
> starting developing with virtualenv (which is a must):
>
> - source /path/to/venv/bin/activate: this command tells the shell
> (bash, zsh, etc) to use the python interpreter located at
> /path/to/venv/bin/python instead of the system python interpreter (eg.
> /usr/bin/python)
>
> - the pythonpath for your virtualenv is going to be
> /path/to/venv/lib/python/site-packages. I usually maintain a separate
> directory containing packages I need (either at ~/libraries for global
> libraries, third-party apps, etc on my dev box) and
> /path/to/venv/libraries on production boxes. Then I symlink python
> modules that I need to the /path/to/venv/lib/python/site-packages
> directory. Then they'll be on your PYTHONPATH.
>
> The above applies to developing on a *nix box. If you are developing
> on windows, stop what you are doing and install virtualbox and ubuntu
> or go fully over to a *nix box. You'll appreciate it this.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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



Re: Django Knowledge Strorehouse

2011-07-07 Thread Cal Leeming [Simplicity Media Ltd]
+1 SO (stackoverflow) style interface on the mailing list..

+1 searchable code snippet database

+1 importing of all existing django-users topics with smart topic linkage

+1 ability to link related topics to each other.


On Thu, Jul 7, 2011 at 2:02 PM, Cal Leeming [Simplicity Media Ltd]
 wrote:
> I'd be willing to put some time into this, for sure.
>
> Not sure how much code I could contribute (as I'm already involved in
> a few other long term projects), but could certainly offer up
> feedback/testing/resources etc.
>
> Cal
>
> On Thu, Jul 7, 2011 at 4:26 AM, Venkatraman S  wrote:
>> Hi All,
>>
>> Probably i am jumping the gun, but i am very much ready to volunteer to
>> develop and host a django article repository.
>> The repository would be HIGHLY curated and store extremely useful articles
>> and snippets.
>>
>> We already have djangosnippets - so was wondering if we can index this and
>> use it in the storehouse.
>>  (OR)
>> Transform djangosnippets to contain curated articles along with snippets and
>> build the articlebase on top of it. Make searching and browsing much more
>> efficient.
>>
>> What do you guys think?
>>
>> -V
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>

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



Re: Django Knowledge Strorehouse

2011-07-07 Thread Cal Leeming [Simplicity Media Ltd]
I'd be willing to put some time into this, for sure.

Not sure how much code I could contribute (as I'm already involved in
a few other long term projects), but could certainly offer up
feedback/testing/resources etc.

Cal

On Thu, Jul 7, 2011 at 4:26 AM, Venkatraman S  wrote:
> Hi All,
>
> Probably i am jumping the gun, but i am very much ready to volunteer to
> develop and host a django article repository.
> The repository would be HIGHLY curated and store extremely useful articles
> and snippets.
>
> We already have djangosnippets - so was wondering if we can index this and
> use it in the storehouse.
>  (OR)
> Transform djangosnippets to contain curated articles along with snippets and
> build the articlebase on top of it. Make searching and browsing much more
> efficient.
>
> What do you guys think?
>
> -V
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

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



Re: Issue with saving user information during django_registration

2011-07-07 Thread Andre Terra
I'm mostly guessing, but try this for your registration_form.html template
instead http://dpaste.com/hold/564305/


Cheers,
André

On Thu, Jul 7, 2011 at 12:03 AM, CareerDhaba tech wrote:

> Hi André,
>
> Thanks for the feedback.
>
> Here is the relevant code:
>
> registration_form view:
>
> http://dpaste.com/564165/
>
> my views.py file directly from the django_registration app code:
>
> http://dpaste.com/564166/
>
> Here is my form class:
>
> http://dpaste.com/564167/
>
> - Harshil
>
>
> On Thu, Jul 7, 2011 at 3:52 AM, Andre Terra  wrote:
>
>> Start by pasting relevant code. Views, forms and possibly the backend
>> logic. Use dpaste.com
>>
>> And quit bumping or you'll never get an answer, not from most of us.
>>
>> Regards,
>> André Terra
>>
>> On 7/6/11, CareerDhaba tech  wrote:
>> > Bumping once more. Can anyone shine some light on this issue? Would be
>> > extremely helpful.
>> >
>> >
>> > On Wed, Jul 6, 2011 at 6:24 PM, CareerDhaba tech
>> > wrote:
>> >
>> >> Bump - anyone has any insight into this?
>> >>
>> >> I am happy to post my code, just not sure where I am going wrong.
>> >>
>> >> On Wed, Jul 6, 2011 at 2:35 PM, CareerDhaba tech
>> >> wrote:
>> >>
>> >>> Hey folks,
>> >>>
>> >>> Django newbie here and I need some help. I am using
>> django_registration
>> >>> v0.8 and using the docs here:
>> >>> http://readthedocs.org/docs/django-registration/en/latest/index.html
>> >>>
>> >>> I have successfully installed the app, and I am using the default
>> backend
>> >>> for my registration purposes.
>> >>>
>> >>> I have tested this and I can get the form to show up properly at
>> >>> '/accounts/register'
>> >>>
>> >>> However, one problem is that if I try and break the form input
>> (different
>> >>> password1 and password2 or improper username), no validation errors
>> are
>> >>> being invoked.
>> >>>
>> >>> The issue also, is that the username, email, and password data is not
>> >>> being stored in auth_user, and the activation email isn't being sent.
>> >>>
>> >>> From the default backend doc, "During registration, a new instance of
>> >>> django.contrib.auth.models.User is created to represent the new
>> account,
>> >>> with the is_active field set to False. An email is then sent to the
>> email
>> >>> address of the account, containing a link the user must click to
>> activate
>> >>> the account; at that point the is_active field is set to True, and the
>> >>> user may log in normally."
>> >>>
>> >>> I believe this new instance of django.contrib.auth.models.User is not
>> >>> being created.
>> >>>
>> >>> I have also included the necessary email settings:
>> >>> EMAIL_USE_TLS = True
>> >>> EMAIL_HOST = "smtp.gmail.com"
>> >>> EMAIL_HOST_USER = "Email"
>> >>> EMAIL_HOST_PASSWORD = "Password"
>> >>> EMAIL_PORT = 587
>> >>>
>> >>> Any help on getting this straight? I am pretty sure I am missing
>> >>> something
>> >>> simple, but been trying to figure it out without any progress. Any
>> help
>> >>> is
>> >>> greatly appreciated.
>> >>>
>> >>> Thanks,
>> >>> Harshil
>> >>>
>> >>>
>> >>
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups
>> > "Django users" group.
>> > To post to this group, send email to django-users@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > django-users+unsubscr...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/django-users?hl=en.
>> >
>> >
>>
>> --
>> Sent from my mobile device
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

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



Re: Some thoughts on a package/stack compile system for easy distribution of webapps..

2011-07-07 Thread Andre Terra
THIS. IS. SPARTA!!!

On 7/7/11, Cal Leeming [Simplicity Media Ltd]
 wrote:
> Hydra is already a used package name in Pypi, and a few other code
> related projects (would prefer to use a name which isn't already used
> in a similar area). :/
>
> On Thu, Jul 7, 2011 at 5:28 AM, Venkatraman S  wrote:
>>
>> On Thu, Jul 7, 2011 at 9:40 AM, Roberto De Ioris  wrote:
>>>
>>> http://cloudsilverlining.org/
>>
>> This looks more like a deployment configuration script than compiling into
>> a
>> binary.
>> I would be very much interested in the latter.
>>
>> Thanks for sharing though.
>>
>> -V
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
Sent from my mobile device

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



Re: Some thoughts on a package/stack compile system for easy distribution of webapps..

2011-07-07 Thread Cal Leeming [Simplicity Media Ltd]
Hydra is already a used package name in Pypi, and a few other code
related projects (would prefer to use a name which isn't already used
in a similar area). :/

On Thu, Jul 7, 2011 at 5:28 AM, Venkatraman S  wrote:
>
> On Thu, Jul 7, 2011 at 9:40 AM, Roberto De Ioris  wrote:
>>
>> http://cloudsilverlining.org/
>
> This looks more like a deployment configuration script than compiling into a
> binary.
> I would be very much interested in the latter.
>
> Thanks for sharing though.
>
> -V
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

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



Re: Some thoughts on a package/stack compile system for easy distribution of webapps..

2011-07-07 Thread Cal Leeming [Simplicity Media Ltd]
Also, thanks Roberto for suggesting Silver Lining, it's certainly
given me some food for thought :)

On Thu, Jul 7, 2011 at 1:28 PM, Cal Leeming [Simplicity Media Ltd]
 wrote:
> Hi Roberto,
>
> As Venkatraman said, Silver Lining seems to be aimed more at distribution.
>
> Also, they have stated in the docs that it is locked down heavily to
> the host OS, and it would appear that the whole thing is tied into
> libcloud (which is completely the opposite from the direction we want
> to go in).
>
> However, as vain as this sounds, I really do like the documentation
> style they have used, so I'll probably nab that ;D
>
> I'm going to draw up an outline of what we want the project to
> achieve, and the principles behind it, so everyone can get a chance to
> have some input into the initial design.
>
> Cal
>
>
> On Thu, Jul 7, 2011 at 5:10 AM, Roberto De Ioris  wrote:
>>
>> Il giorno 06/lug/2011, alle ore 21.03, Cal Leeming [Simplicity Media Ltd] ha 
>> scritto:
>>
>>> Hi all,
>>>
>>> After seeing the Facebook video about how their development team
>>> compiles everything into a single binary for easy distribution between
>>> thousands of servers, I totally fell in love with the idea. Although
>>> their approach is to compile PHP into C, the same principle applies.
>>>
>>> The end result will be a single binary which will contain your webapp
>>> + static resources + web server + application server, easily
>>> deployable to many servers, and reduced time spent in managing the
>>> stack (YMMV). Although I'm only going to be focusing on our needs to
>>> begin with, there's no reason this concept couldn't be extended in the
>>> future to include PHP, 32bit, other OS's etc.
>>>
>>> Some features I'm thinking of:
>>>
>>> * CLI based menu to build compile package (ncurses based). Easy to
>>> use. Incorporates all features available in nginx/uwsgi. Comes with
>>> 'basic' config mode (the bare minimal questions asked - for beginners
>>> - which makes it almost impossible to build a broken package) and
>>> 'advanced' mode which lets you change everything (with more risk ofc).
>>> * Support for nginx + uwsgi + python2.6 + python2.7 + debian 64bit.
>>> * Expose some sort of API which lets you query all aspects of services
>>> running within the package (like nginx stats).
>>> * Enable ability for nginx/uwsgi/python to log out to a syslog server
>>> of some kind)
>>> * Ability to obfuscate py code using various techniques.
>>> * Maybe a test-run feature to test your package.
>>> * Maybe some sort of MemoryError detection and reporting of such events.
>>>
>>> I'm probably going to make something like this for companies own
>>> internal use, but wanted to see if anyone else had an interest in
>>> seeing this go open source.
>>>
>>> Cal
>>
>>
>>
>> Hi Cal, you may be interested in Ian Bicking's Silverlining project/idea:
>>
>> http://cloudsilverlining.org/
>>
>>
>>
>> --
>> Roberto De Ioris
>> http://unbit.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 
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>

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



Re: Some thoughts on a package/stack compile system for easy distribution of webapps..

2011-07-07 Thread Cal Leeming [Simplicity Media Ltd]
Hi Roberto,

As Venkatraman said, Silver Lining seems to be aimed more at distribution.

Also, they have stated in the docs that it is locked down heavily to
the host OS, and it would appear that the whole thing is tied into
libcloud (which is completely the opposite from the direction we want
to go in).

However, as vain as this sounds, I really do like the documentation
style they have used, so I'll probably nab that ;D

I'm going to draw up an outline of what we want the project to
achieve, and the principles behind it, so everyone can get a chance to
have some input into the initial design.

Cal


On Thu, Jul 7, 2011 at 5:10 AM, Roberto De Ioris  wrote:
>
> Il giorno 06/lug/2011, alle ore 21.03, Cal Leeming [Simplicity Media Ltd] ha 
> scritto:
>
>> Hi all,
>>
>> After seeing the Facebook video about how their development team
>> compiles everything into a single binary for easy distribution between
>> thousands of servers, I totally fell in love with the idea. Although
>> their approach is to compile PHP into C, the same principle applies.
>>
>> The end result will be a single binary which will contain your webapp
>> + static resources + web server + application server, easily
>> deployable to many servers, and reduced time spent in managing the
>> stack (YMMV). Although I'm only going to be focusing on our needs to
>> begin with, there's no reason this concept couldn't be extended in the
>> future to include PHP, 32bit, other OS's etc.
>>
>> Some features I'm thinking of:
>>
>> * CLI based menu to build compile package (ncurses based). Easy to
>> use. Incorporates all features available in nginx/uwsgi. Comes with
>> 'basic' config mode (the bare minimal questions asked - for beginners
>> - which makes it almost impossible to build a broken package) and
>> 'advanced' mode which lets you change everything (with more risk ofc).
>> * Support for nginx + uwsgi + python2.6 + python2.7 + debian 64bit.
>> * Expose some sort of API which lets you query all aspects of services
>> running within the package (like nginx stats).
>> * Enable ability for nginx/uwsgi/python to log out to a syslog server
>> of some kind)
>> * Ability to obfuscate py code using various techniques.
>> * Maybe a test-run feature to test your package.
>> * Maybe some sort of MemoryError detection and reporting of such events.
>>
>> I'm probably going to make something like this for companies own
>> internal use, but wanted to see if anyone else had an interest in
>> seeing this go open source.
>>
>> Cal
>
>
>
> Hi Cal, you may be interested in Ian Bicking's Silverlining project/idea:
>
> http://cloudsilverlining.org/
>
>
>
> --
> Roberto De Ioris
> http://unbit.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 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>

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



RegistrationForm subclass not showing up

2011-07-07 Thread katstevens
Hi - I'm new to Django and am using django-registration to set up new
users.

The basic RegistrationForm shows up fine in my template (which just
uses {{ form.as_table }} to generate fields inside the form HTML), but
I now want to use the RegistrationFormTermsOfService subclass instead.

I set it as a parameter in urls.py as follows:
   url(r'^register/$',
   register,
   {'form_class':
RegistrationFormTermsOfService},
   name='registration_register'),

... but the original RegistrationForm is still showing instead. Any
ideas why this would be? Do I have to remove the default 'form_class'
value in the register declaration in views.py (as that still gives
RegistrationForm as the default)? Or do I need to alter my template?

I'm sure I'm missing something really obvious - any help gratefully
received.

Kat

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



Re: ERROR: test_14377 (django.contrib.auth.tests.views.LogoutTest), AttributeError: 'module' object has no attribute 'handler500'

2011-07-07 Thread David Markey
Anyone any ideas? Is this a bug in 1.2.5?

On 3 July 2011 12:52, David Markey  wrote:

> Anyone any idea how to fix this, in my urls.py im explicitly doing:
>
> from django.conf.urls.defaults import handler404, handler500, include,
> patterns, url
>
>
> ==
> ERROR: test_14377 (django.contrib.auth.tests.views.LogoutTest)
> --
> Traceback (most recent call last):
>   File
> "/usr/local/lib/python2.7/dist-packages/Django-1.2.5-py2.7.egg/django/contrib/auth/tests/views.py",
> line 270, in test_14377
> response = self.client.get('/logout/')
>   File
> "/usr/local/lib/python2.7/dist-packages/Django-1.2.5-py2.7.egg/django/test/client.py",
> line 305, in get
> response = self.request(**r)
>   File
> "/usr/local/lib/python2.7/dist-packages/Django-1.2.5-py2.7.egg/django/test/client.py",
> line 245, in request
> response = self.handler(environ)
>   File
> "/usr/local/lib/python2.7/dist-packages/Django-1.2.5-py2.7.egg/django/test/client.py",
> line 79, in __call__
> response = self.get_response(request)
>   File
> "/usr/local/lib/python2.7/dist-packages/Django-1.2.5-py2.7.egg/django/core/handlers/base.py",
> line 141, in get_response
> return self.handle_uncaught_exception(request, resolver,
> sys.exc_info())
>   File
> "/usr/local/lib/python2.7/dist-packages/Django-1.2.5-py2.7.egg/django/core/handlers/base.py",
> line 179, in handle_uncaught_exception
> callback, param_dict = resolver.resolve500()
>   File
> "/usr/local/lib/python2.7/dist-packages/Django-1.2.5-py2.7.egg/django/core/urlresolvers.py",
> line 263, in resolve500
> return self._resolve_special('500')
>   File
> "/usr/local/lib/python2.7/dist-packages/Django-1.2.5-py2.7.egg/django/core/urlresolvers.py",
> line 253, in _resolve_special
> callback = getattr(self.urlconf_module, 'handler%s' % view_type)
> AttributeError: 'module' object has no attribute 'handler500'
>
> --
> Ran 21 tests in 0.481s
>
> Thanks...
>
>

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



Re: How to add CSRF to context when using test client???

2011-07-07 Thread Craig Blaszczyk
csrf_token is a proxy object not a string.

Try doing:
csrf_token = '%s' % response.context['csrf_token']

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



Re: delete unnecessarily fields =D

2011-07-07 Thread Calvin Spealman
It deleting "the language files that do not use" will save you any
significant portion of your storage quota, then you seriously need a
new hosting provider.

On Thu, Jul 7, 2011 at 4:18 AM, Kase  wrote:
> I need to lower the amount of files on my server becouse is a shared
> server.
>
> so I wonder if I can delete the folder that uses django during
> instalaccion (where the setup.py) and I also wonder if I can delete
> the language files that do not use, and where I can find
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Read my blog! I depend on your acceptance of my opinion! I am interesting!
http://techblog.ironfroggy.com/
Follow me if you're into that sort of thing: http://www.twitter.com/ironfroggy

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



Any Polling/Survey Examples?

2011-07-07 Thread Gagiel
Hello everyone,

I'm doing a survey site to collect a group of parameters submitted by
users. Those parameters are between 0 and 99(%).

Now I'd like to do this with django, and I'm seeking advice for apps i
can make a good reference, better if they use jQuery or something for
users to choose for the parameters.

Thanks!

-- 
This email is brought to you --
by Gagiel Z at Gmail.

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



Re: Complex Query help - get items from the org to which the user belongs

2011-07-07 Thread DrBloodmoney
On Thu, Jul 7, 2011 at 12:04 AM, Venkatraman S  wrote:
> I am doing some bechmarking on the performance of both the versions of the
> query:
> 1.
> Item.objects.filter(created_by__employees__org__in=u.employees_set.all().values_list('org'))
> and
> 2. Items.objects.extra(where=['created_by_id in (select e.user_id from
> myapp_employees e, myapp_organization o where e.org_id = o.id and o.id =
> (select o2.id from myapp_organization o2, myapp_employees e2 where e2.org_id
> = o2.id and e2.user_id=3 and e2.deleted=False)) '])
>
> I am seeing #1 to be faster(when i view from DDT). Will update in the next
> few days or probably early next week.
>
> -V

Personally, I'd add a FK on the Item to the Employee, particularly if
they're in the same app (Actually I'd replace the FK to User with one
to Employee). I suspect that is a simplified models.py so I don't
actually know if there would be a requirement to FK to User. (I also
try to limit my code touching django.contrib.auth since using it is my
biggest pain point for django).

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



Re: Speed of search question

2011-07-07 Thread Venkatraman S
On Thu, Jul 7, 2011 at 3:01 PM, Marc Aymerich  wrote:

> https://github.com/robhudson/django-debug-toolbar/commits/master/
>

DDT rocks. Btw, does this fork have any special features when compared with
the Master?

-V

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



Re: Speed of search question

2011-07-07 Thread Marc Aymerich
On Thu, Jul 7, 2011 at 8:15 AM, Benedict Verheyen
 wrote:
> On 6/07/2011 12:28, Malcolm Box wrote:
>> I think this should work:
>>
>> Calendar.objects.filter(appointment__owner = request.user)
>>
>> Try it and see.
>>
>> Malcolm
>>
>
> Thanks,
>
>
> I'll see if I can make a test script to test this.
> It's actually a good idea to put in a performance test of some sorts.
>

Hi Benedict,
If you're concerned about the performance of your django apps, I
recomend you this app:
https://github.com/robhudson/django-debug-toolbar/commits/master/

Besides many other interesting things, It shows you the DB queries
that your views perform and how many time takes.


-- 
Marc

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



Re: Speed of search question

2011-07-07 Thread Venkatraman S
On Thu, Jul 7, 2011 at 11:45 AM, Benedict Verheyen <
benedict.verhe...@gmail.com> wrote:

>
> I'll see if I can make a test script to test this.
> It's actually a good idea to put in a performance test of some sorts.
>


I have much complex relationships, and i dont see any peformance issues.

-V

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



Display FK List

2011-07-07 Thread Venkatraman S
i have 2 models: Items and a Transactions .

Transactions has a fk to Items. Now, there can be millions of Items, and
when i render Transaction as a modelform, i see that all the Items are being
fetched - and this is quiet a lot of txt being sent over the wire. Is there
an efficient way of associating this txn with an item without displaying it
as a HUGE model form?

What i can think of is :
1. suppress/exclude the Item while rendering the form, and instead show
another form when the User mentions that he wants to associate this Item
with a Txn.
2. Show an ajax field in Items, so that only a subset of the Items are shown
as the user progressively types.

However, i am looking for more efficient solutions.

-V

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



delete unnecessarily fields =D

2011-07-07 Thread Kase
I need to lower the amount of files on my server becouse is a shared
server.

so I wonder if I can delete the folder that uses django during
instalaccion (where the setup.py) and I also wonder if I can delete
the language files that do not use, and where I can find

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



Re: Speed of search question

2011-07-07 Thread Benedict Verheyen
On 6/07/2011 12:28, Malcolm Box wrote:
> I think this should work:
> 
> Calendar.objects.filter(appointment__owner = request.user)
> 
> Try it and see.
> 
> Malcolm
> 

Thanks,


I'll see if I can make a test script to test this.
It's actually a good idea to put in a performance test of some sorts.

Regards,
Benedict

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