Re: Why i can't get the debug informations (in case of error) when i run LiveServerTestCase tests?

2013-01-29 Thread Ramiro Morales
Ramiro Morales
On Jan 29, 2013 12:33 PM, "Alessandro Pelliciari" 
wrote:
>
> thanks for the link!
>
> So Isn't there a way to set DEBUG=True in tests?

No. There isn't (at least with the built-in testing toolbox).

Now, I'm trying to understand why do you rely in the debugging 500 response
contents on your tests. Do you screen scrap it to extract  information
about the origin of the failure?

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




Re: Bulk db insert with a file through admin form

2013-01-29 Thread MNG1138
What I ended up doing is customizing the ModelAdmin for the Product class.  
I went this route instead of adding a new form because I wanted to be able 
to use the admin form to search for a particular product or products, and 
once located, upload the serialized product file.

The admin effectively adds a file upload form to each product in the change 
list.  I also customized the change_list.html admin template to add a 
submit button to the form when a file was selected for uploading.  When 
that button is pressed, a view is called which parses the uploaded files 
and creates the ProductItem rows in db.

While researching, I found a useful tool for easily adding pages to the 
django admin: https://github.com/jsocol/django-adminplus


On Tuesday, December 4, 2012 6:24:34 AM UTC-7, אברהם סרור wrote:
>
> I also have a case where I would need to bulk add items from a file, the 
> client receives an excel file with products (up to a couple of hundreds).
> I still haven't implemented nothing yet as the feature doesn't 
> have priority, in any case I thought adding a file upload option on the 
> admin, or maybe a bulk add option in manage would make more sense.
>
> in any case I don't think it would be the case of changing your model as 
> you don't need to store this info (the file name).
>
> in any case I believe you would need to add something custom, maybe 
> someone has some kind of template code for bulk adding from file, I believe 
> this could be fairly common.
>
> any thoughts? please update on the path you took.
>
> best luck
> avraham
>
>
> On Tue, Dec 4, 2012 at 5:32 AM, MNG1138 wrote:
>
>> Say I've got a model like this:
>>
>> class Product(models.Model):
>>
>> name = models.CharField(max_length=**200)
>>
>> class ProductItem(models.Model):
>>  product = models.ForeignKey(Product)
>>  serialnumber = models.charField()
>>  sold = models.BooleanField(default=False)
>>
>> ProductItem represents physical products in the store.  I have a file 
>> with thousands of serial #'s for the product.  In the product form in the 
>> admin, I'd like to upload this file, parse the serial #'s and create rows 
>> in ProductItem.  I could add a FileField to Product and create a custom 
>> storage that parses the file and creates ProductITems.  Or I could override 
>> save for the Product model.  Both of these solutions are non-optimal, as I 
>> will have a FileField in Product and db that I don't need.
>>
>> Is there any way to add a 'dummy' FileField just for the form that 
>> doesn't result in a DB row?  Or is the answer to create a custom admin 
>> form?  Any good tutorials or examples for doing creating a custom admin 
>> form?
>>
>> Thanks,
>> Mark
>>
>>
>>
>>  -- 
>> 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/-/efDj8ZO4QXIJ.
>> To post to this group, send email to django...@googlegroups.com
>> .
>> To unsubscribe from this group, send email to 
>> django-users...@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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Help, getting keyerrors

2013-01-29 Thread frocco
I think I have it.
Changed to cleaned_data.get('password')

Thank you


On Tuesday, January 29, 2013 2:58:45 PM UTC-5, frocco wrote:
>
> Thanks,
> getting error now that I changed it.
>
> def clean(self):
> cleaned_data = super(RegistrationForm, self).clean()
> password = cleaned_data['password']
> password1 = cleaned_data['password1']
> if password and password1 and password == password1:
> pass
> else:
> raise forms.ValidationError('The passwords did not match, 
> Please try again.')
> return cleaned_data
>
>
> RegistrationForm' object has no attribute 'password
>
>
> On Tuesday, January 29, 2013 2:47:11 PM UTC-5, Nikolas Stevenson-Molnar 
> wrote:
>>
>> Your clean() method shouldn't use self.cleaned_data, it should call 
>> super(RegistrationForm, self).clean(). E.g: 
>>
>> def clean(self): 
>> cleaned_data = super(RegistrationForm, self).clean() 
>> password = cleaned_data['password'] 
>> ... 
>> return cleaned_data 
>>
>>
>> https://docs.djangoproject.com/en/1.4/ref/forms/validation/#cleaning-and-validating-fields-that-depend-on-each-other
>>  
>>
>> _Nik 
>>
>>
>> On 1/29/2013 11:42 AM, frocco wrote: 
>> > Hello, 
>> > On my registration form, if I enter no data and just press enter, i 
>> > get a key error. 
>> > Can someone tell me what I am doing wrong? 
>> > Thanks 
>> > 
>> > forms.py 
>> > from django import forms 
>> > from django.contrib.auth.models import User 
>> > from django.forms import ModelForm 
>> > from customer.models import Customer 
>> > 
>> > class RegistrationForm(forms.Form): 
>> > username = forms.CharField(label=u'User Name') 
>> > firstname = forms.CharField(label=u'First Name') 
>> > lastname = forms.CharField(label=u'Last Name') 
>> > email = forms.EmailField(label=u'Email Address') 
>> > company = forms.CharField(label=u'Company') 
>> > phone = forms.CharField(label=u'Phone') 
>> > password = 
>> > 
>> forms.CharField(label=u'Password',widget=forms.PasswordInput(render_value=False),required=True)
>>  
>>
>> > password1 = forms.CharField(label=u'Verify 
>> > Password',widget=forms.PasswordInput(render_value=False),required=True) 
>> > 
>> > def clean_username(self): 
>> > username = self.cleaned_data['username'] 
>> > try: 
>> > User.objects.get(username=username) 
>> > except User.DoesNotExist: 
>> > return self.cleaned_data['username'] 
>> > raise forms.ValidationError('That username is already taken, 
>> > please select another.') 
>> > 
>> > def clean(self): 
>> > password = self.clean_password() 
>> > password1 = self.cleaned_data['password1'] 
>> > if password and password1 and password == password1: 
>> > return self.cleaned_data 
>> > else: 
>> > raise forms.ValidationError('The passwords did not match, 
>> > Please try again.') 
>> > 
>> > def clean_company(self): 
>> > return self.cleaned_data['company'] 
>> > 
>> > def clean_phone(self): 
>> > return self.cleaned_data['phone'] 
>> > 
>> > def clean_email(self): 
>> > return self.cleaned_data['email'] 
>> > 
>> > def clean_firstname(self): 
>> > return self.cleaned_data['firstname'] 
>> > 
>> > def clean_lastname(self): 
>> > return self.cleaned_data['lastname'] 
>> > 
>> > def clean_password(self): 
>> > if self.password and self.cleaned_data['password']: 
>> > return self.cleaned_data['password'] 
>> > else: 
>> > raise forms.ValidationError("Enter a password.") 
>> > 
>> > 
>> > def clean_password1(self): 
>> > if not self.cleaned_data['password1']: 
>> > raise forms.ValidationError("Enter your password (again)") 
>> > 
>> > 
>> > -- 
>> > You received this message because you are subscribed to the Google 
>> > Groups "Django users" group. 
>> > To unsubscribe from this group and stop receiving emails from it, send 
>> > an email to django-users...@googlegroups.com. 
>> > To post to this group, send email to django...@googlegroups.com. 
>> > Visit this group at http://groups.google.com/group/django-users?hl=en. 
>> > For more options, visit https://groups.google.com/groups/opt_out. 
>> >   
>> >   
>>
>>

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




Re: Help, getting keyerrors

2013-01-29 Thread frocco
Thanks,
getting error now that I changed it.

def clean(self):
cleaned_data = super(RegistrationForm, self).clean()
password = cleaned_data['password']
password1 = cleaned_data['password1']
if password and password1 and password == password1:
pass
else:
raise forms.ValidationError('The passwords did not match, 
Please try again.')
return cleaned_data


RegistrationForm' object has no attribute 'password


On Tuesday, January 29, 2013 2:47:11 PM UTC-5, Nikolas Stevenson-Molnar 
wrote:
>
> Your clean() method shouldn't use self.cleaned_data, it should call 
> super(RegistrationForm, self).clean(). E.g: 
>
> def clean(self): 
> cleaned_data = super(RegistrationForm, self).clean() 
> password = cleaned_data['password'] 
> ... 
> return cleaned_data 
>
>
> https://docs.djangoproject.com/en/1.4/ref/forms/validation/#cleaning-and-validating-fields-that-depend-on-each-other
>  
>
> _Nik 
>
>
> On 1/29/2013 11:42 AM, frocco wrote: 
> > Hello, 
> > On my registration form, if I enter no data and just press enter, i 
> > get a key error. 
> > Can someone tell me what I am doing wrong? 
> > Thanks 
> > 
> > forms.py 
> > from django import forms 
> > from django.contrib.auth.models import User 
> > from django.forms import ModelForm 
> > from customer.models import Customer 
> > 
> > class RegistrationForm(forms.Form): 
> > username = forms.CharField(label=u'User Name') 
> > firstname = forms.CharField(label=u'First Name') 
> > lastname = forms.CharField(label=u'Last Name') 
> > email = forms.EmailField(label=u'Email Address') 
> > company = forms.CharField(label=u'Company') 
> > phone = forms.CharField(label=u'Phone') 
> > password = 
> > 
> forms.CharField(label=u'Password',widget=forms.PasswordInput(render_value=False),required=True)
>  
>
> > password1 = forms.CharField(label=u'Verify 
> > Password',widget=forms.PasswordInput(render_value=False),required=True) 
> > 
> > def clean_username(self): 
> > username = self.cleaned_data['username'] 
> > try: 
> > User.objects.get(username=username) 
> > except User.DoesNotExist: 
> > return self.cleaned_data['username'] 
> > raise forms.ValidationError('That username is already taken, 
> > please select another.') 
> > 
> > def clean(self): 
> > password = self.clean_password() 
> > password1 = self.cleaned_data['password1'] 
> > if password and password1 and password == password1: 
> > return self.cleaned_data 
> > else: 
> > raise forms.ValidationError('The passwords did not match, 
> > Please try again.') 
> > 
> > def clean_company(self): 
> > return self.cleaned_data['company'] 
> > 
> > def clean_phone(self): 
> > return self.cleaned_data['phone'] 
> > 
> > def clean_email(self): 
> > return self.cleaned_data['email'] 
> > 
> > def clean_firstname(self): 
> > return self.cleaned_data['firstname'] 
> > 
> > def clean_lastname(self): 
> > return self.cleaned_data['lastname'] 
> > 
> > def clean_password(self): 
> > if self.password and self.cleaned_data['password']: 
> > return self.cleaned_data['password'] 
> > else: 
> > raise forms.ValidationError("Enter a password.") 
> > 
> > 
> > def clean_password1(self): 
> > if not self.cleaned_data['password1']: 
> > raise forms.ValidationError("Enter your password (again)") 
> > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Django users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> > an email to django-users...@googlegroups.com . 
> > To post to this group, send email to 
> > django...@googlegroups.com. 
>
> > Visit this group at http://groups.google.com/group/django-users?hl=en. 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> >   
> >   
>
>

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




Re: Help, getting keyerrors

2013-01-29 Thread Nikolas Stevenson-Molnar
Your clean() method shouldn't use self.cleaned_data, it should call
super(RegistrationForm, self).clean(). E.g:

def clean(self):
cleaned_data = super(RegistrationForm, self).clean()
password = cleaned_data['password']
...
return cleaned_data

https://docs.djangoproject.com/en/1.4/ref/forms/validation/#cleaning-and-validating-fields-that-depend-on-each-other

_Nik


On 1/29/2013 11:42 AM, frocco wrote:
> Hello,
> On my registration form, if I enter no data and just press enter, i
> get a key error.
> Can someone tell me what I am doing wrong?
> Thanks
>
> forms.py
> from django import forms
> from django.contrib.auth.models import User
> from django.forms import ModelForm
> from customer.models import Customer
>
> class RegistrationForm(forms.Form):
> username = forms.CharField(label=u'User Name')
> firstname = forms.CharField(label=u'First Name')
> lastname = forms.CharField(label=u'Last Name')
> email = forms.EmailField(label=u'Email Address')
> company = forms.CharField(label=u'Company')
> phone = forms.CharField(label=u'Phone')
> password =
> forms.CharField(label=u'Password',widget=forms.PasswordInput(render_value=False),required=True)
> password1 = forms.CharField(label=u'Verify
> Password',widget=forms.PasswordInput(render_value=False),required=True)
>
> def clean_username(self):
> username = self.cleaned_data['username']
> try:
> User.objects.get(username=username)
> except User.DoesNotExist:
> return self.cleaned_data['username']
> raise forms.ValidationError('That username is already taken,
> please select another.')
>
> def clean(self):
> password = self.clean_password()
> password1 = self.cleaned_data['password1']
> if password and password1 and password == password1:
> return self.cleaned_data
> else:
> raise forms.ValidationError('The passwords did not match,
> Please try again.')
>
> def clean_company(self):
> return self.cleaned_data['company']
>
> def clean_phone(self):
> return self.cleaned_data['phone']
>
> def clean_email(self):
> return self.cleaned_data['email']
>
> def clean_firstname(self):
> return self.cleaned_data['firstname']
>
> def clean_lastname(self):
> return self.cleaned_data['lastname']
>
> def clean_password(self):
> if self.password and self.cleaned_data['password']:
> return self.cleaned_data['password']
> else:
> raise forms.ValidationError("Enter a password.")
>
>
> def clean_password1(self):
> if not self.cleaned_data['password1']:
> raise forms.ValidationError("Enter your password (again)")
>
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




Help, getting keyerrors

2013-01-29 Thread frocco
Hello,
On my registration form, if I enter no data and just press enter, i get a 
key error.
Can someone tell me what I am doing wrong?
Thanks

forms.py
from django import forms
from django.contrib.auth.models import User
from django.forms import ModelForm
from customer.models import Customer

class RegistrationForm(forms.Form):
username = forms.CharField(label=u'User Name')
firstname = forms.CharField(label=u'First Name')
lastname = forms.CharField(label=u'Last Name')
email = forms.EmailField(label=u'Email Address')
company = forms.CharField(label=u'Company')
phone = forms.CharField(label=u'Phone')
password = 
forms.CharField(label=u'Password',widget=forms.PasswordInput(render_value=False),required=True)
password1 = forms.CharField(label=u'Verify 
Password',widget=forms.PasswordInput(render_value=False),required=True)

def clean_username(self):
username = self.cleaned_data['username']
try:
User.objects.get(username=username)
except User.DoesNotExist:
return self.cleaned_data['username']
raise forms.ValidationError('That username is already taken, please 
select another.')

def clean(self):
password = self.clean_password()
password1 = self.cleaned_data['password1']
if password and password1 and password == password1:
return self.cleaned_data
else:
raise forms.ValidationError('The passwords did not match, 
Please try again.')

def clean_company(self):
return self.cleaned_data['company']

def clean_phone(self):
return self.cleaned_data['phone']

def clean_email(self):
return self.cleaned_data['email']

def clean_firstname(self):
return self.cleaned_data['firstname']

def clean_lastname(self):
return self.cleaned_data['lastname']

def clean_password(self):
if self.password and self.cleaned_data['password']:
return self.cleaned_data['password']
else:
raise forms.ValidationError("Enter a password.")


def clean_password1(self):
if not self.cleaned_data['password1']:
raise forms.ValidationError("Enter your password (again)")


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




Re: FYI: Scheduled downtime on djangoproject.com Thursday night

2013-01-29 Thread Gabriel Abdalla
Thanks for sharing this link.

Regards,

Gabriel

On 29 January 2013 16:34, kl4us  wrote:

> nice one, i'm new on django and i'm reading documentation all day
>
> Il giorno martedì 29 gennaio 2013 18:11:48 UTC+1, Jacob Kaplan-Moss ha
> scritto:
>
>> Hey folks --
>>
>> MediaTemple, our hosting provider for djangoproject.com, is going to
>> be taking our server offline Thursday night while they give us more
>> RAM.
>>
>> The window for downtime is some time between 9PM and 4AM, though the
>> actual downtime itself should be less than an hour.
>>
>> Since most people use the site for documentation, I'll remind you that
>> you can always find a mirror of Django's documentation on Read the
>> Docs: http://django.readthedocs.org/**.
>>
>> Thanks!
>>
>> Jacob
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

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




Re: FYI: Scheduled downtime on djangoproject.com Thursday night

2013-01-29 Thread Mário Neto
Thank's Jacob!


2013/1/29 kl4us 

> nice one, i'm new on django and i'm reading documentation all day
>
> Il giorno martedì 29 gennaio 2013 18:11:48 UTC+1, Jacob Kaplan-Moss ha
> scritto:
>
>> Hey folks --
>>
>> MediaTemple, our hosting provider for djangoproject.com, is going to
>> be taking our server offline Thursday night while they give us more
>> RAM.
>>
>> The window for downtime is some time between 9PM and 4AM, though the
>> actual downtime itself should be less than an hour.
>>
>> Since most people use the site for documentation, I'll remind you that
>> you can always find a mirror of Django's documentation on Read the
>> Docs: http://django.readthedocs.org/**.
>>
>> Thanks!
>>
>> Jacob
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Att. *Mário Araújo Chaves Neto*
*Programmer, Designer and U.I. Engineer*
*
*
*MBA in Design Digital* - 2008 - FIC
*Analysis and Systems Development* - 2011 - Estácio
*D**esign and Implementation of Internet Environments* - 2003 - FIC

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




Re: FYI: Scheduled downtime on djangoproject.com Thursday night

2013-01-29 Thread kl4us
nice one, i'm new on django and i'm reading documentation all day 

Il giorno martedì 29 gennaio 2013 18:11:48 UTC+1, Jacob Kaplan-Moss ha 
scritto:
>
> Hey folks -- 
>
> MediaTemple, our hosting provider for djangoproject.com, is going to 
> be taking our server offline Thursday night while they give us more 
> RAM. 
>
> The window for downtime is some time between 9PM and 4AM, though the 
> actual downtime itself should be less than an hour. 
>
> Since most people use the site for documentation, I'll remind you that 
> you can always find a mirror of Django's documentation on Read the 
> Docs: http://django.readthedocs.org/. 
>
> Thanks! 
>
> Jacob 
>

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




FYI: Scheduled downtime on djangoproject.com Thursday night

2013-01-29 Thread Jacob Kaplan-Moss
Hey folks --

MediaTemple, our hosting provider for djangoproject.com, is going to
be taking our server offline Thursday night while they give us more
RAM.

The window for downtime is some time between 9PM and 4AM, though the
actual downtime itself should be less than an hour.

Since most people use the site for documentation, I'll remind you that
you can always find a mirror of Django's documentation on Read the
Docs: http://django.readthedocs.org/.

Thanks!

Jacob

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




extended Admin User

2013-01-29 Thread Dominik Wuttke
Hi,

i created an extended admin User and modified the fieldsets for the admin 
interface. Everything works fine, BUT how can i get the groupselection and 
permission fields in my admin interface?
I hope you have a short hint.

Additional Question: When i have an inline element with meta option "extra" 
- how can i switch of the "#1", "#2" numbers displayed in my admin 
interface?

Greets Dominik
 

> from django.contrib import admin
>
> from django.contrib.auth.admin import UserAdmin, GroupAdmin
>
> from django.contrib.auth.models import User, Group
>
> from members.models import Member
>
>
>> class MemberInline(admin.StackedInline):
>
> model = Member
>
> can_delete = False
>
> verbose_name_plural = 'Adresse'
>
> fieldsets = (
>
>  (None, 
>> {'fields':('street','zipcode','city','phone','avatar')}),
>
>  ('Mitgliedschaft', {'fields': 
>> ('newsletter','member_since')}),
>
>  )
>
> extra = 1
>
>   
>
>
>> 
>
> class MyUserAdmin(UserAdmin):
>
> list_display = ('username','email','first_name','last_name')
>
> list_filter =()
>
> fieldsets = (
>
>  (None, {'fields': 
>> ('username','first_name','last_name','email','password')}),
>
>  )
>
> inlines = [MemberInline]
>
>
>> 
>
>
>> admin.site.unregister(User)
>
> admin.site.register(User, MyUserAdmin)
>
>

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




Re: Django hosting companies

2013-01-29 Thread Mengu
some of my friends are using webfaction. i use linode and in the past
i have used webbynode.

On Jan 29, 3:17 pm, francislutalo  wrote:
> Anyone with an idea of which are the best companies to host my django
> applications?
>
> Thank you,
> Regards
> francislutalo

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




Re: Why i can't get the debug informations (in case of error) when i run LiveServerTestCase tests?

2013-01-29 Thread Alessandro Pelliciari
thanks for the link!

So Isn't there a way to set DEBUG=True in tests?

I have tried with @override_settings, but it didn't worked.



Il giorno martedì 29 gennaio 2013 15:12:50 UTC+1, Ramiro Morales ha scritto:
>
>
> On Jan 29, 2013 9:57 AM, "Alessandro Pelliciari" 
>  
> wrote:
> >
> > Hi, I'm writing some tests with Selenium.
> >
> > When i run my selenium tests (LiveServerTestCase type) and i have some 
> error in my code (not in the test, i mean in the code executed, like the 
> homepage view i reach with selenium) i get the 500 public template (that 
> usually i get when i have DEBUG = False) even if i have:
> >
> > DEBUG = True 
> > INTERNAL_IPS = ('127.0.0.1',)
> >
> > I'm stuck with that and i can't see why my test failed (because in the 
> public 500 ofc i don't show the exceptions).
> >
> > When i run the runserver it works perfectly (i get the tracebacks).
> >
> > I've checked the ip from request.META when i run it in a selenium test 
> and it's the localhost, not other network IP.
> >
> > Why does it behave like that? Where can i look to resolve?
>
> See 
> https://docs.djangoproject.com/en/1.4/topics/testing/#other-test-conditions
>  

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




Re: Django hosting companies

2013-01-29 Thread Bill Freeman
Plus one on webfaction, if a shared host will do.  If you want a virtual
private server to yourself, I like linode.

Bill

On Tue, Jan 29, 2013 at 10:11 AM, Luiz A. Menezes Filho <
luiz.menez...@gmail.com> wrote:

> These sites may help you:
> http://djangofriendly.com/hosts/
> http://djangohosting.com/
>
> Att,
>
>
> On Tue, Jan 29, 2013 at 1:03 PM, Leonardo S wrote:
>
>> heroku, dotCloud, Gondor.io, webfaction ...
>>
>>
>> 2013/1/29 Frankline 
>>
>>> Have you tried webfaction? Very easy to setup.
>>>
>>> On Tue, Jan 29, 2013 at 4:30 PM, Gustavo Andres Angulo >> > wrote:
>>>
 There is a similar solution to Heroku, called nuagehq.com



 regards

 On Tue, Jan 29, 2013 at 8:17 AM, francislutalo 
 wrote:
 > Anyone with an idea of which are the best companies to host my django
 > applications?
 >
 >
 >
 > Thank you,
 > Regards
 > francislutalo
 >
 > --
 > You received this message because you are subscribed to the Google
 Groups
 > "Django users" group.
 > To unsubscribe from this group and stop receiving emails from it,
 send an
 > email to django-users+unsubscr...@googlegroups.com.
 > To post to this group, send email to django-users@googlegroups.com.
 > Visit this group at http://groups.google.com/group/django-users?hl=en
 .
 > For more options, visit https://groups.google.com/groups/opt_out.
 >
 >

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



>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users?hl=en.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> Luiz Menezes
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

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




Re: Django hosting companies

2013-01-29 Thread Luiz A. Menezes Filho
These sites may help you:
http://djangofriendly.com/hosts/
http://djangohosting.com/

Att,

On Tue, Jan 29, 2013 at 1:03 PM, Leonardo S wrote:

> heroku, dotCloud, Gondor.io, webfaction ...
>
>
> 2013/1/29 Frankline 
>
>> Have you tried webfaction? Very easy to setup.
>>
>> On Tue, Jan 29, 2013 at 4:30 PM, Gustavo Andres Angulo 
>> wrote:
>>
>>> There is a similar solution to Heroku, called nuagehq.com
>>>
>>>
>>>
>>> regards
>>>
>>> On Tue, Jan 29, 2013 at 8:17 AM, francislutalo 
>>> wrote:
>>> > Anyone with an idea of which are the best companies to host my django
>>> > applications?
>>> >
>>> >
>>> >
>>> > Thank you,
>>> > Regards
>>> > francislutalo
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> Groups
>>> > "Django users" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send
>>> an
>>> > email to django-users+unsubscr...@googlegroups.com.
>>> > To post to this group, send email to django-users@googlegroups.com.
>>> > Visit this group at http://groups.google.com/group/django-users?hl=en.
>>> > For more options, visit https://groups.google.com/groups/opt_out.
>>> >
>>> >
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users?hl=en.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Luiz Menezes

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




Re: Django hosting companies

2013-01-29 Thread Leonardo S
heroku, dotCloud, Gondor.io, webfaction ...


2013/1/29 Frankline 

> Have you tried webfaction? Very easy to setup.
>
> On Tue, Jan 29, 2013 at 4:30 PM, Gustavo Andres Angulo 
> wrote:
>
>> There is a similar solution to Heroku, called nuagehq.com
>>
>>
>>
>> regards
>>
>> On Tue, Jan 29, 2013 at 8:17 AM, francislutalo 
>> wrote:
>> > Anyone with an idea of which are the best companies to host my django
>> > applications?
>> >
>> >
>> >
>> > Thank you,
>> > Regards
>> > francislutalo
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups
>> > "Django users" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> an
>> > email to django-users+unsubscr...@googlegroups.com.
>> > To post to this group, send email to django-users@googlegroups.com.
>> > Visit this group at http://groups.google.com/group/django-users?hl=en.
>> > For more options, visit https://groups.google.com/groups/opt_out.
>> >
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

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




Re: Why i can't get the debug informations (in case of error) when i run LiveServerTestCase tests?

2013-01-29 Thread Ramiro Morales
On Jan 29, 2013 9:57 AM, "Alessandro Pelliciari" 
wrote:
>
> Hi, I'm writing some tests with Selenium.
>
> When i run my selenium tests (LiveServerTestCase type) and i have some
error in my code (not in the test, i mean in the code executed, like the
homepage view i reach with selenium) i get the 500 public template (that
usually i get when i have DEBUG = False) even if i have:
>
> DEBUG = True
> INTERNAL_IPS = ('127.0.0.1',)
>
> I'm stuck with that and i can't see why my test failed (because in the
public 500 ofc i don't show the exceptions).
>
> When i run the runserver it works perfectly (i get the tracebacks).
>
> I've checked the ip from request.META when i run it in a selenium test
and it's the localhost, not other network IP.
>
> Why does it behave like that? Where can i look to resolve?

See
https://docs.djangoproject.com/en/1.4/topics/testing/#other-test-conditions

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




trouble with admin page - not /css

2013-01-29 Thread gmail

Hello all

i have developed a simple app with Django.1.3.4. To deploy my 
applications i used mod_python. All work fine except the admin interface 
when try a login. the home page appears without the correct css and 
image files .. can you help me??


this is my httpd.conf

/etc/apache2/httpd.conf


SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE market.settings
PythonDebug On
PythonPath "['/var/www','/var/www/market'] + sys.path"


Alias /media 
"/usr/local/lib/python2.6/dist-packages/django/contrib/admin/media/"



AllowOverride None
Options None
Order allow,deny
Allow from all


urls.py
url(r'^admin/', include(admin.site.urls)),


many many thanks
marco

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




Re: Coffin import error while starting django

2013-01-29 Thread nickfarm
We have narrowed this issue down to supervisor.
See the updated info: http://pastebin.ca/2308575

supervisor is installed from the repositories and uses python 2.6
The django app is using a manually compiled version of python 2.7
It seems supervisor interferes with environment variables in some way, 
which confuses django.

Any ideas where to look for a solution?

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




Re: Django hosting companies

2013-01-29 Thread Frankline
Have you tried webfaction? Very easy to setup.

On Tue, Jan 29, 2013 at 4:30 PM, Gustavo Andres Angulo wrote:

> There is a similar solution to Heroku, called nuagehq.com
>
>
>
> regards
>
> On Tue, Jan 29, 2013 at 8:17 AM, francislutalo 
> wrote:
> > Anyone with an idea of which are the best companies to host my django
> > applications?
> >
> >
> >
> > Thank you,
> > Regards
> > francislutalo
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to django-users+unsubscr...@googlegroups.com.
> > To post to this group, send email to django-users@googlegroups.com.
> > Visit this group at http://groups.google.com/group/django-users?hl=en.
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

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




Re: Django hosting companies

2013-01-29 Thread Gustavo Andres Angulo
There is a similar solution to Heroku, called nuagehq.com



regards

On Tue, Jan 29, 2013 at 8:17 AM, francislutalo  wrote:
> Anyone with an idea of which are the best companies to host my django
> applications?
>
>
>
> Thank you,
> Regards
> francislutalo
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

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




Django hosting companies

2013-01-29 Thread francislutalo
Anyone with an idea of which are the best companies to host my django 
applications?



Thank you,
Regards
francislutalo

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




Coffin import error while starting django

2013-01-29 Thread nickfarm
We have python / django on the server, using supervisor and gunicorn. Using 
gunicorn we have an import error while starting django: from django.test 
import signals (a line in coffin). If we import from ipython or use import 
django.test.signals we have no problem. See http://pastebin.ca/2308541 for 
details.

Any ideas what might cause this?

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




Why i can't get the debug informations (in case of error) when i run LiveServerTestCase tests?

2013-01-29 Thread Alessandro Pelliciari
 

Hi, I'm writing some tests with Selenium.

When i run my selenium tests (LiveServerTestCase type) and i have some 
error in my code (not in the test, i mean in the code executed, like the 
homepage view i reach with selenium) i get the 500 public template (that 
usually i get when i have DEBUG = False) even if i have:

DEBUG = True 
INTERNAL_IPS = ('127.0.0.1',)

I'm stuck with that and i can't see why my test failed (because in the 
public 500 ofc i don't show the exceptions).

When i run the runserver it works perfectly (i get the tracebacks).

I've checked the ip from request.META when i run it in a selenium test and 
it's the localhost, not other network IP.

*Why does it behave like that? Where can i look to resolve?*

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




handling FileField and FileSystemStorage in WizardView - Django 1.4

2013-01-29 Thread devver


I created a form wizard of 6 steps, 
in step sixth, have filefield for uploading docfile1

django docs is poor on this topic, google does not help.


my code working ok, but how handle filefield.

need example, thanks


forms.py

class Step6(forms.Form):

 docfile1 = forms.FileField(required=False)


view.py


   1. class RegInfo(SessionWizardView):
   2. template_name = 'gest/wizard_form.html'
   3. file_storage = FileSystemStorage(location=os.path.join(settings.
   MEDIA_ROOT, 'docs'))
   4.  
   5. def get_context_data(self, form, **kwargs):
   6. context = super(RegInfo, self).get_context_data(form, **kwargs
   )
   7.
   8. if self.steps.current == 'six':
   9. print 'step 6'
   10.
   11. return context
   12.  
   13. def done(self, form_list, **kwargs):
   14. dati = self.get_all_cleaned_data()
   15.  
   16. s = Info()
   17. s.tec = self.request.user
   18. s.dataso = dati['dataso']
   19.
   20. s.docfile1 = 
   21.
   22. s.save()
   23.  
   24. return render_to_response('gest/done.html', {
   25. 'form_data': [form.cleaned_data for form in form_list],
   26. })
   27.  
   28. 
   

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




Re: Unicode/Non-ASCII characters in the admin throws exception

2013-01-29 Thread Thomas Weholt
Sort of solved this issue myself; my solution was using Django 1.5c and 
Python 3.3. 

Allthough this means some of the reusable apps I was planning on using 
isn't ready for Python 3 I'll look into forking them and try to see if I 
can get them running myself. And if so send a patch to the maintainers. 
First up; Django debug toolbar :-)

Thomas


On Monday, January 28, 2013 10:07:22 PM UTC+1, Thomas Weholt wrote:
>
> This is a recurring problem for django users obviously by the amount of 
> posts returned by google and I've had this problem in the past as well, but 
> cannot remember how I got around it. Googling did'nt help either.
>
> When I use Norweian characters like ØÆÅ in CharField-field in the django 
> admin I get an exception when I click the add-button to register the new 
> entry.
>
> Traceback:
> File "C:\Python27\lib\site-packages\django\core\handlers\base.py" in 
> get_response  136. response = response.render()File 
> "C:\Python27\lib\site-packages\django\template\response.py" in render  
> 104. self._set_content(self.rendered_content)File 
> "C:\Python27\lib\site-packages\django\template\response.py" in 
> rendered_content  81. content = template.render(context)File 
> "C:\Python27\lib\site-packages\django\template\base.py" in render  140.   
>   return self._render(context)File 
> "C:\Python27\lib\site-packages\django\template\base.py" in _render  134. 
> return self.nodelist.render(context)File 
> "C:\Python27\lib\site-packages\django\template\base.py" in render  823.   
>   bit = self.render_node(node, context)File 
> "C:\Python27\lib\site-packages\django\template\debug.py" in render_node  
> 74. return node.render(context)File 
> "C:\Python27\lib\site-packages\django\template\loader_tags.py" in render  
> 123. return compiled_parent._render(context)File 
> "C:\Python27\lib\site-packages\django\template\base.py" in _render  134. 
> return self.nodelist.render(context)File 
> "C:\Python27\lib\site-packages\django\template\base.py" in render  823.   
>   bit = self.render_node(node, context)File 
> "C:\Python27\lib\site-packages\django\template\debug.py" in render_node  
> 74. return node.render(context)File 
> "C:\Python27\lib\site-packages\django\template\loader_tags.py" in render  
> 123. return compiled_parent._render(context)File 
> "C:\Python27\lib\site-packages\django\template\base.py" in _render  134. 
> return self.nodelist.render(context)File 
> "C:\Python27\lib\site-packages\django\template\base.py" in render  823.   
>   bit = self.render_node(node, context)File 
> "C:\Python27\lib\site-packages\django\template\debug.py" in render_node  
> 74. return node.render(context)File 
> "C:\Python27\lib\site-packages\django\template\loader_tags.py" in render  
> 123. return compiled_parent._render(context)File 
> "C:\Python27\lib\site-packages\django\template\base.py" in _render  134. 
> return self.nodelist.render(context)File 
> "C:\Python27\lib\site-packages\django\template\base.py" in render  823.   
>   bit = self.render_node(node, context)File 
> "C:\Python27\lib\site-packages\django\template\debug.py" in render_node  
> 74. return node.render(context)File 
> "C:\Python27\lib\site-packages\django\template\defaulttags.py" in render  
> 281. return nodelist.render(context)File 
> "C:\Python27\lib\site-packages\django\template\base.py" in render  823.   
>   bit = self.render_node(node, context)File 
> "C:\Python27\lib\site-packages\django\template\debug.py" in render_node  
> 74. return node.render(context)File 
> "C:\Python27\lib\site-packages\django\template\loader_tags.py" in render  
> 62. result = block.nodelist.render(context)File 
> "C:\Python27\lib\site-packages\django\template\base.py" in render  823.   
>   bit = self.render_node(node, context)File 
> "C:\Python27\lib\site-packages\django\template\debug.py" in render_node  
> 74. return node.render(context)File 
> "C:\Python27\lib\site-packages\django\template\defaulttags.py" in render  
> 281. return nodelist.render(context)File 
> "C:\Python27\lib\site-packages\django\template\base.py" in render  823.   
>   bit = self.render_node(node, context)File 
> "C:\Python27\lib\site-packages\django\template\debug.py" in render_node  
> 74. return node.render(context)File 
> "C:\Python27\lib\site-packages\django\template\debug.py" in render  84.   
>   output = self.filter_expression.resolve(context)File 
> "C:\Python27\lib\site-packages\django\template\base.py" in resolve  599. 
> new_obj = func(obj, *arg_vals)File 
> "C:\Python27\lib\site-packages\django\template\defaultfilters.py" in _dec  
> 39. args[0] = force_unicode(args[0])File 
> 

Re: Missing files on a new project

2013-01-29 Thread Ramiro Morales
Ramiro Morales
On Jan 28, 2013 11:03 PM, "Ricardo Diaz"  wrote:
>
> Well, i'm following a video tutorial -> this guy is using Django 1.4 and
when he uses startmanager on shell Django creates all of those files on the
main folder.
>
> Check it about 3:11 https://www.youtube.com/watch?v=fVNL5MwskiQ

That video tutorial is wrong. I suggest to simply ignore material from that
source.

I suspect he is doing something that is explicitly warned against in the
first paragraphs of the official tutorial: Installing a version of Django
without uninstalling an older one (1.3.x?) before.
The directories layout set up by startproject changed to what you see in
1.4.

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




Re: Bookmarker Site

2013-01-29 Thread Pankaj Singh
Hey Ranjith,

For example bookmark apps in django please have a look at follwing urls:

https://github.com/brosner/django-bookmarks
https://github.com/raynesax/django-bookmarks
http://django-generic-bookmarks.readthedocs.org/en/latest/

If you want to extract text and title etc. for an url then you can use
http://viewtext.org/help/api for this. I have embedded an interactive code
snippet below.

I used python-requests(http://docs.python-requests.org/en/latest/) and
html2text (https://github.com/aaronsw/html2text) for this.

In [1]: import requestsIn [2]: from html2text import html2textIn [3]:
r = 
requests.get("http://viewtext.org/api/text?url=https://docs.djangoproject.com/en/1.4/topics/testing/=json=false;)In
[4]: data = r.json()In [5]: print html2text(data["title"])Testing
Django applications | Django documentation | DjangoIn [6]: print
html2text(data["content"][:400])Automated testing is an extremely
useful bug-killing tool for the modern Webdeveloper. You can use a
collection of tests - a **test suite** - to solve, oravoid, a number
of problems:Testing a Web application is a complex task, because a Web
application is madeof several layers of logic - from HTTP-level
request handling, to formvalidation and proceIn [7]:


--
Pankaj Singh
http://about.me/psjinx


On Mon, Jan 28, 2013 at 8:21 AM, Ranjith Kumar 
wrote:
> Hello All,
> I wanted to build bookmarking web application using django, in this app
user
> can not only bookmark the site also they scrape few datas from the
> bookmarked page.
>
> Looking for good python/django tools which can help me achieve this aim
>
> Thank you!
>
> --
> Cheers,
> Ranjith Kumar K,
> Chennai.
>
> http://ranjithtenz.wordpress.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.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

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