Re: Best distro for django

2009-07-04 Thread wei ribao
Sorry if I did not describe the problem clear. It is , in ubuntu, in the terminal sometimes I cannot use the left key and some other keys in the shell, I press the left key the cursor will not go left, instead it displays something like "^X[[". Normally everything is ok, but in some interative

Re: Best distro for django

2009-07-04 Thread Lakshman Prasad
For one, you could use the much more feature full with tab auto complete debugger, ipdb. But I just verified that, even pdb.set_trace() works well with arrow keys, on my system. Python 2.6.2 GNome Terminal 2.26 On Sat, Jul 4, 2009 at 2:19 PM, wei ribao wrote: > > Sorry if I did not describe the

Re: Best distro for django

2009-07-04 Thread wei ribao
Oh sorry, it seems the problem is not on "pdb.set_trace()", it works for me too. In google app engine, pdb.set_trace() will not work. Instead I have to use: def set_trace(): import pdb, sys debugger = pdb.Pdb(stdin=sys.__stdin__, stdout=sys.__stdout__) debugger.set_trace(sy

Re: how to make field in admin edit view sortable

2009-07-04 Thread Joru
Thanks Karen this work perfectly On Jul 3, 10:05 pm, Karen Tracey wrote: > On Thu, Jul 2, 2009 at 11:52 PM, Joru wrote: > > > is this posible? > > Maybe. > > > > > anyone have solution for this? > > Searching for 'sort' on this page: > > http://docs.djangoproject.com/en/dev/ref/contrib/admin/ >

Model for "Global Options"

2009-07-04 Thread Damon Timm
Hello everyone - I wondered if anyone had insight on a Model for site-wide "global" options. I am thinking of a place to store: site title, site meta, site description, specific global links (twitter, facebook, etc), support contact email, etc ... The model itself doesn't seem too complicated, m

Re: Pyjamas Django Tutorial at Europython09, Monday 29th June.

2009-07-04 Thread chefsmart
Would it be possible to upload your talk to slideshare or suchlike? Or am I asking for too much? Regards, CM. On Jun 20, 7:36 pm, lkcl wrote: > In case you're not already aware I thought I'd mention that there is a > tutorial forpyjamason 29th June at Europython in birmingham.  as > you're djan

Re: Receiving information

2009-07-04 Thread chefsmart
Did you try HttpRequest.raw_post_data Regards, CM. On Jul 3, 9:44 pm, Dhruv Adhia wrote: > Hello All, > > I am trying to send information from iPhone to django app through > json. > > I got "Message" json block spitting in the form as below: > >  message json format > >      { >         "Messag

view causes error in Internet Explorer but not Firefox

2009-07-04 Thread adrian
This view shows a cart and processes a cart submission. You can try it on our staging server at: http://tixsa.giantbyte.com You'll have to find an event with tickets and add it to your cart. The code in question is: http://dpaste.com/hold/63158/ Everything works fine on FF. On IE, everyth

too many values to unpack

2009-07-04 Thread Carlos Eduardo Sotelo Pinto
Hi people I have this form , as my subject says, it is giving me "to many values to unpack" class ProductModelForm(forms.ModelForm): product_model = forms.ModelChoiceField(ProductModel.objects.all(), None, u'Modelo') class Meta: model = ProductModel exclude = ['maker', '

Re: view causes error in Internet Explorer but not Firefox

2009-07-04 Thread Karen Tracey
On Sat, Jul 4, 2009 at 12:27 PM, adrian wrote: > > > This view shows a cart and processes a cart submission. You can try > it on our staging server at: > > http://tixsa.giantbyte.com > > You'll have to find an event with tickets and add it to your cart. > > The code in question is: > > http://d

Re: too many values to unpack

2009-07-04 Thread Karen Tracey
On Sat, Jul 4, 2009 at 12:39 PM, Carlos Eduardo Sotelo Pinto < csot...@aqpglug.org.pe> wrote: > > Hi people > > I have this form , as my subject says, it is giving me "to many values > to unpack" > FYI, providing the traceback, or at least identifying the line of code that causes the error, would

nested category listing [newbie]

2009-07-04 Thread C. Feldmann
Hello, this is probably a total newbie question, but I am really stumped on how to do this best. Coming from a PHP background I tried to loop through all categories and make a nested list. I kept on getting errors. Since django is so powerful there had to be a way to do this in the model itself

Re: Model for "Global Options"

2009-07-04 Thread Daniel Roseman
On Jul 4, 1:27 pm, Damon Timm wrote: > Hello everyone - > > I wondered if anyone had insight on a Model for site-wide "global" > options.  I am thinking of a place to store: site title, site meta, > site description, specific global links (twitter, facebook, etc), > support contact email, etc ...

send_mail error

2009-07-04 Thread Guri
Hi, I get following error on trying sending e-mail using send_mail. SMTPConnectionRefused (451, 'Requested action aborted: (-20) local error in processing', 'webmas...@localhost') Any missing string here. Regards Guri --~--~-~--~~~---~--~~ You received this mes

Checking if a ForeignKey field is NULL

2009-07-04 Thread Ryan K
Lets say I retrieve from my database an object foo and foo's model has a ForeignKey field, baz, with null and blank set to True. Will a simple test like if foo.baz ... test whether the field is set to NULL or not? Cheers, Ryan --~--~-~--~~~---~--~~ You received thi

Re: Best distro for django

2009-07-04 Thread Xiong Chiamiov
On Jul 3, 11:36 am, developingchris wrote: > Looking for opinion of the best distro for a developer machine for > django. > > I'm on ubuntu now, its going ok. I'm having keyboard issues, and > wondering if I should put the time in on fixing it, or just ditch it > for say, pc-bsd, if thats what th

Re: Checking if a ForeignKey field is NULL

2009-07-04 Thread Alex Gaynor
On Sat, Jul 4, 2009 at 1:33 PM, Ryan K wrote: > > Lets say I retrieve from my database an object foo and foo's model has > a ForeignKey field, baz, with null and blank set to True. Will a > simple test like if foo.baz ... test whether the field is set to NULL > or not? > > Cheers, > Ryan > > > Ye

Re: Receiving information

2009-07-04 Thread Dhruv Adhia
Nope I have not used it, Can you give me an example of it? Thanks, On Sat, Jul 4, 2009 at 9:01 AM, chefsmart wrote: > > Did you try HttpRequest.raw_post_data > > Regards, > CM. > > On Jul 3, 9:44 pm, Dhruv Adhia wrote: > > Hello All, > > > > I am trying to send information from iPhone to djang

Re: send_mail error

2009-07-04 Thread Dj Gilcrease
On Sat, Jul 4, 2009 at 1:04 PM, Guri wrote: > Any missing string here. You have the following set correctly in your settings.py? EMAIL_HOST EMAIL_HOST_USER EMAIL_HOST_PASSWORD --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

Re: Pyjamas Django Tutorial at Europython09, Monday 29th June.

2009-07-04 Thread Mirat Bayrak
+1 2009/7/4 chefsmart > > Would it be possible to upload your talk to slideshare or suchlike? Or > am I asking for too much? > > Regards, > CM. > > On Jun 20, 7:36 pm, lkcl wrote: > > In case you're not already aware I thought I'd mention that there is a > > tutorial forpyjamason 29th June at E

Re: too many values to unpack

2009-07-04 Thread Mirat Bayrak
check your paranthesis when i see that error it is usually about paranthessis --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To

type object 'MyModel'' has no attribute 'id'

2009-07-04 Thread Carlos Eduardo Sotelo Pinto
Hi people... I have this traceback error and i am something lost, thanks Environment: Request Method: GET Request URL: http://127.0.0.1:8000/support/helping/product/1/1 Django Version: 1.0.2 final Python Version: 2.5.2 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes'

Re: type object 'MyModel'' has no attribute 'id'

2009-07-04 Thread Alex Gaynor
On Sat, Jul 4, 2009 at 2:42 PM, Carlos Eduardo Sotelo Pinto < csot...@aqpglug.org.pe> wrote: > > Hi people... I have this traceback error and i am something lost, thanks > > Environment: > Request Method: GET > Request URL: http://127.0.0.1:8000/support/helping/product/1/1 > Django Version: 1.0.2

Using custom form class for the django.contrib.auth password_change view

2009-07-04 Thread Alex S.
Hi folks, as the title says I want to use my own form class for the password change process supplied by django.contrib.auth. Do you know of any way to do this without rewriting the code of this view (and specifying another argument for the form class to be used)? There are time where I want to do

Re: type object 'MyModel'' has no attribute 'id'

2009-07-04 Thread Daniel Roseman
On Jul 4, 8:42 pm, Carlos Eduardo Sotelo Pinto wrote: > Hi people... I have this traceback error and i am something lost, thanks > > Exception Type: AttributeError at /support/helping/product/1/1 > Exception Value: type object 'ProductModel' has no attribute 'id' > > #model > class ProductM

Re: Efficiency of getting attribute values in templates

2009-07-04 Thread TechnicalBard
Is there a way to pass an object to the template and have the template handle all of the attributes without hardcoding them into the template? On Jul 3, 10:04 am, Rajesh D wrote: > On Jul 3, 9:17 am, Nikola Pavlović wrote: > > > > > > > Hello people, > > > I'm writing my first Django applicatio

Re: Efficiency of getting attribute values in templates

2009-07-04 Thread Rajesh D
On Jul 4, 6:30 pm, TechnicalBard wrote: > Is there a way to pass an object to the template and have the template > handle all of the attributes without hardcoding them into the > template? Depends on what you mean by "handle". The template won't by itself know the markup with which you want to

Using email as username for django auth

2009-07-04 Thread zweb
i just increased the size of username in auth_user table to 100 and I enter email as user name from my register user web page. Django auth is working fine. I use my own form and view but django's authenticate and login methods. It did not give me any errors saying I cannot enter or use (at) sig

Re: view causes error in Internet Explorer but not Firefox

2009-07-04 Thread Kenneth Gonsalves
On Saturday 04 July 2009 21:57:08 adrian wrote: > ValueError at /cart/view/ > The view cart.views.view didn't return an HttpResponse object. I have been bitten by this error message. The message should be: 'The view cart.views.view didn't return anything.' Of course HttpResponse object is a su

Re: Model for "Global Options"

2009-07-04 Thread thornomad
That would seem to do exactly what I hoped for! Thanks for the link. I am going to give that a shot. On Jul 4, 2:02 pm, Daniel Roseman wrote: > On Jul 4, 1:27 pm, Damon Timm wrote: > > > > > Hello everyone - > > > I wondered if anyone had insight on a Model for site-wide "global" > > options.

Re: Model for "Global Options"

2009-07-04 Thread thornomad
Actually, maybe I spoke too soon. It seems that the option still has to be hard-coded into the models.py file initially -- that's what I was hoping to avoid. I wanted the designer/user to just be able to add a new key/value pair in the admin, and then access it in the template without having to

Re: Efficiency of getting attribute values in templates

2009-07-04 Thread TechnicalBard
But the admin app does - it defines the labels from the attribute names and just puts them all in a table or list. How does one do that? Analogous to iterating through a list of objects, is it possible to iterate through the attributes of a single object? On Jul 4, 5:32 pm, Rajesh D wrote: > O

Re: Using email as username for django auth

2009-07-04 Thread djangou...@gmail.com
Mind sharing your modifications? -- Sent from my Palm Pre zweb wrote: i just increased the size of username in auth_user table to 100 and I enter email as user name from my register user web page. Django auth is working fine. I use my own form and view but django's authenticate and login metho

Pyowa is this Monday!

2009-07-04 Thread Mike Driscoll
Hi, The next Pyowa meeting is on Monday, July 6th from 7-9 p.m. We will be at the Marshall County Sheriff's Office (directions on website). Currently, the plan is to have a talk about Python at Fisher/Emerson that will segue into a general discussion of what we do with our favorite programming la

Re: Model for "Global Options"

2009-07-04 Thread dvainsencher
On Jul 4, 9:27 am, Damon Timm wrote: > Hello everyone - > > I wondered if anyone had insight on a Model for site-wide "global" > options.  I am thinking of a place to store: site title, site meta, > site description, specific global links (twitter, facebook, etc), > support contact email, etc ...

Re: Global custom tags

2009-07-04 Thread diogobaeder
Koen, I tried to make an initial template tag, just to test and learn, but it's not working. I followed the instructions here http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#howto-custom-template-tags and registered the compilation function, but it's not finding the module, like

Re: nested category listing [newbie]

2009-07-04 Thread C. Feldmann
solved it by loading the subcategories as a part of the category model. Thanks and have a great 4th of July weekend! > ... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Easy way to include Request Context always?

2009-07-04 Thread Streamweaver
I'm still struggling a bit with template contexts What I want to do is put a code snippet in the header of my site base template that either presents the user with a small login form if they aren't authenticated or display a "Welcome! user" where user is linked to their profile. It seems I have