Re: How do I set permissions for manual install of 1.3 for ubuntu 11.04?

2011-04-29 Thread Shawn Milochik
What's the actual command you're typing, and from which directory? -- 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

Re: please help

2011-04-29 Thread GKR
more over how to use the admin django login system in my own created templates and views. please help lil bit desciptively. -- 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

please help

2011-04-29 Thread GKR
for a particular project with login system which type u all suggest is the best. 1. login system to be create by self model 2. to use the login system provided by django -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

How do I set permissions for manual install of 1.3 for ubuntu 11.04?

2011-04-29 Thread jsierra
I installed django 1.3 manually on my laptop, since ubuntu 11.04 does not ship with 1.3 and I want to be able to run django-admin without having to sudo the command when creating projects and subsequently having to use sudo with manage.py. I want to mimic whatever permissions that allowed me to

Re: Does django 1.3 has a ubuntu deb package released!

2011-04-29 Thread Shawn Milochik
It's always better to download the latest, and use virtualenv. -- 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

Re: Using composition in Django

2011-04-29 Thread Ernesto Guevara
Thanks for the clarification, I put in the ForeignKey in employee class and is working. Regards! 2011/4/27 Tom Evans > On Sun, Apr 17, 2011 at 9:21 PM, W Craig Trader > wrote: > > If your goal is to have an employee object that has direct

Re: Does django 1.3 has a ubuntu deb package released!

2011-04-29 Thread Ernesto Guevara
In the repository of ubuntu 10.04.2 the version 1.1.1 is available, better download version 1.3 of the Django site and install. Is very easy. Regards! 2011/4/29 Korobase > Does django 1.3 has a ubuntu deb package released ! > I have googled but get none,Any one have done

Re: Does django 1.3 has a ubuntu deb package released!

2011-04-29 Thread Yongning Liang
maybe there is no need to do this, you got python, and you can install Django with simple python setup.py install On Sat, Apr 30, 2011 at 10:29 AM, Korobase wrote: > Does django 1.3 has a ubuntu deb package released ! > I have googled but get none,Any one have done this? >

Re: django-admin.py startproject mysite

2011-04-29 Thread Yongning Liang
type this in Windows python django-admin.py startproject mysite if it doesn't work, make sure that both python and django-admin in you system PATH On Sat, Apr 30, 2011 at 5:38 AM, Daisy wrote: > Greetings all; > > I have a problem also with the "django-admin.py

Does django 1.3 has a ubuntu deb package released!

2011-04-29 Thread Korobase
Does django 1.3 has a ubuntu deb package released ! I have googled but get none,Any one have done this? 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

Re: django-admin.py startproject mysite

2011-04-29 Thread Daisy
Greetings all; I have a problem also with the "django-admin.py startproject mysite" command when i type it, it didn't create the directory mysite instead it opens the django-admin.py in a notepad++ I don't know how to fix this? any ideas please. -- You received this message because you are

Django on my iPod, LOL

2011-04-29 Thread Learning
http://www.flickr.com/photos/liangyongning/5670421250/in/photostream Django on my iPod, LOL, see? localhost -- 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

Re: Multiple databases - unmanaged models - get_absolute_url()

2011-04-29 Thread David Chandek-Stark
I submitted a patch to the admin change form template -- http://code.djangoproject.com/ticket/15931. Meanwhile, you can temporarily get around the problem on a per-application basis by adding the attached file to the application package directory at templates/admin//change_form.html. --D --

Re: can't create test (secondary) database

2011-04-29 Thread Javier Guerra Giraldez
On Fri, Apr 29, 2011 at 1:16 PM, Shawn Milochik wrote: > This doesn't help if the same host is being used, but you can get around > this by creating a second settings file and using it during your tests. thanks, i forgot that option. i'm using that to override the engine of

Re: Custom template tag -- Not registered?

2011-04-29 Thread Kenny Meyer
On Fri, Apr 29, 2011 at 5:11 PM, Daniel Roseman wrote: > On Friday, 29 April 2011 21:24:44 UTC+1, Kenny Meyer wrote: >> >> Hello, >> >> I have the following inclusion tag in templatetags/show_submissions.py : >> >> ## BOF >> >> register = template.Library() >> >>

Re: Custom template tag -- Not registered?

2011-04-29 Thread Daniel Roseman
On Friday, 29 April 2011 21:24:44 UTC+1, Kenny Meyer wrote: > > Hello, > > I have the following inclusion tag in templatetags/show_submissions.py : > > ## BOF > > register = template.Library() > > @register.inclusion_tag('competition/templatetags/show_submissions.html') > def

Re: Multiple databases - unmanaged models - get_absolute_url()

2011-04-29 Thread David Chandek-Stark
OK, that's good. However, I don't really understand why the admin site employs such an extremely convoluted method here. If you follow the logic from the change form, here's what happens: if has_absolute_url (i.e., the object model has a "get_absolute_url" attribute) ... -> display "view

Custom template tag -- Not registered?

2011-04-29 Thread Kenny Meyer
Hello, I have the following inclusion tag in templatetags/show_submissions.py : ## BOF register = template.Library() @register.inclusion_tag('competition/templatetags/show_submissions.html') def show_submissions(participant): submissions = Submission.objects.get(participant=participant)

Re: .save() works with no (custom, not 'id') primary key specified?

2011-04-29 Thread Jeff Blaine
Thank you both. That's a great explanation, Jacob. I'll consider your message more closely and play around on Monday a bit. PS: I said it *seems* broken to me, as in "Maybe I just don't understand the reason.", which I clearly didn't :) -- You received this message because you are

Re: Best way to tell if we're in a test

2011-04-29 Thread Jody McIntyre
This is fine as a general principle, but here we're dealing with middleware that affects every other application. It's not a good idea to require other applications to change all their tests to mock out functionality in a module they've just added, plus that would be a lot of work. You'd have to

Cannot operate on a closed database

2011-04-29 Thread Thomas Weholt
I'm trying to run a unittest, but it crashes with an exception, saying "Cannot operate on a closed dabase". I'm not using the orm to insert records, but raw SQL - and raw sql is the only option. When or what closes the connection to the database? -- Mvh/Best regards, Thomas Weholt

Re: Multiple databases - unmanaged models - get_absolute_url()

2011-04-29 Thread Ramiro Morales
On Fri, Apr 29, 2011 at 2:18 PM, David Chandek-Stark wrote: > [...] >  Now, I think the problem > is that this method uses the database for the contenttypes app instead of > the alternate database > (see 

Re: can't create test (secondary) database

2011-04-29 Thread Shawn Milochik
You can specify the test database info (db, name, and password) for each database defined in settings, if you're using 1.2 or greater. http://docs.djangoproject.com/en/1.3/ref/settings/#databases This doesn't help if the same host is being used, but you can get around this by creating a

can't create test (secondary) database

2011-04-29 Thread Javier Guerra Giraldez
Hi All, for the first time, i'm using multiple databases. specifically, i have 'my' data in a MySQL db (set as 'default') but also need to get some extra info from a proprietary system with it's own Oracle DB, for this i got a user/password with read/only privileges (only SELECT and friends).

Re: Best way to tell if we're in a test

2011-04-29 Thread Chris Czub
I think you might be taking the wrong approach. Rather than having your application code checking whether or not it's in a test, have your testing code disable/mock certain behaviors that you don't want exercised(like have it always return that the user answered the security question correctly or

Best way to tell if we're in a test

2011-04-29 Thread Jody McIntyre
What's the best way to tell (from regular code) if we're in a test? I have added extra authentication steps (security questions) that would be difficult to deal with in tests where you just want to run self.client.login() or post to the login URL. I've noticed that several third party

Re: .save() works with no (custom, not 'id') primary key specified?

2011-04-29 Thread Jacob Kaplan-Moss
On Fri, Apr 29, 2011 at 12:17 PM, Jeff Blaine wrote: > "primary_key=True implies null=False and unique=True. Only one primary key > is allowed on an object." > So that unique=True part is inaccurate?  Or is that, again, another thing > that will fail only at validation? Maybe

Re: .save() works with no (custom, not 'id') primary key specified?

2011-04-29 Thread Javier Guerra Giraldez
On Fri, Apr 29, 2011 at 12:17 PM, Jeff Blaine wrote: > "primary_key=True implies null=False and unique=True. Only one primary key > is allowed on an object." > So that unique=True part is inaccurate?  Or is that, again, another thing > that will fail only at validation? did

Multiple databases - unmanaged models - get_absolute_url()

2011-04-29 Thread David Chandek-Stark
No doubt this is an edge case, but here goes ... With Django 1.3/Python 2.4 I have an app consisting of *unmanaged *models in *alternate *(non-default) database. Each model has defined get_absolute_url() simply as a fully-qualified (i.e.,external) URL string in which the instance id is

Re: .save() works with no (custom, not 'id') primary key specified?

2011-04-29 Thread Jeff Blaine
"primary_key=True implies null=False and unique=True. Only one primary key is allowed on an object." So that unique=True

Re: .save() works with no (custom, not 'id') primary key specified?

2011-04-29 Thread Jacob Kaplan-Moss
On Fri, Apr 29, 2011 at 11:47 AM, Jeff Blaine wrote: > How is this possible based on the model below? > d = Device() > d.save() > # no errors > class Device(models.Model): >     propertyno      = models.CharField('Property Number', >                                       

Re: .save() works with no (custom, not 'id') primary key specified?

2011-04-29 Thread Jeff Blaine
A specified primary_key should not be auto-incrementing from my understanding. The following shows 2 objects with the same value for a field I specified should be the primary_key: >>> from hostdb.models import Device >>> d = Device() >>> d.propertyno '' >>> d.save() >>> d = Device() >>>

Re: .save() works with no (custom, not 'id') primary key specified?

2011-04-29 Thread Jeff Blaine
"If Django sees you've explicitly set Field.primary_key, it won't add the automatic id column." http://docs.djangoproject.com/en/1.3/topics/db/models/#automatic-primary-key-fields -- You received this

Re: .save() works with no (custom, not 'id') primary key specified?

2011-04-29 Thread Cal Leeming [Simplicity Media Ltd]
I think because the primary_key field auto defaults to be auto-inc? On Fri, Apr 29, 2011 at 5:47 PM, Jeff Blaine wrote: > How is this possible based on the model below? > > d = Device() > d.save() > # no errors > > class Device(models.Model): > > propertyno =

.save() works with no (custom, not 'id') primary key specified?

2011-04-29 Thread Jeff Blaine
How is this possible based on the model below? d = Device() d.save() # no errors class Device(models.Model): propertyno = models.CharField('Property Number', max_length=10, primary_key=True) -- You received

Template syntax erro

2011-04-29 Thread Elton Pereira
When trying to upload or download files that contain non-ascii caracters raise a TemplateSyntaxError exception with the following contents: Django Version: 1.2.5 Exception Type: TemplateSyntaxError Exception Value: Caught UnicodeEncodeError while rendering: 'ascii' codec can't

Re: django-cas-consumer template question

2011-04-29 Thread Stodge
Of course! Thanks - I have the template working, now I need to get the login functionality working for the consumer. On Apr 29, 9:35 am, Alex Kamedov wrote: > Your user must be redirected from django-cas-consumer login view to > django-cas-provider > login. Login form is

Re: Question about "Django 1.1 Testing and Debugging" Book for Karen

2011-04-29 Thread Margie Roginski
Hi Karen, Ah, very sorry - my mistake! The machine I was using had an old version of python and it was using django 1.0. So that's why it didn't create tests.py, and I just assumed there must be a bunch of changes between 1.1 and 1.2. Ok, mystery solved. Thanks for your explanation of the

Re: django-cas-consumer template question

2011-04-29 Thread Alex Kamedov
Your user must be redirected from django-cas-consumer login view to django-cas-provider login. Login form is shown on service with django-cas-provider. On Fri, Apr 29, 2011 at 7:30 PM, Stodge wrote: > django-cas-consumer -- Alex Kamedov skype: kamedovwww: kamedov.ru

django-cas-consumer template question

2011-04-29 Thread Stodge
I installed django-cas-provider and django-cas-consumer. I configured the consumer to use the CAS service offered by the provider and I added a base.html template for the consumer. Is this base template supposed to contain the login form? Or is the login form supposed to be available on teh

user and perms context variables from auth context processor (in Django 1.2.3)

2011-04-29 Thread simon
Hello, I am using Django 1.2.3. I was trying to check user permissions on a certain model using the perms context variable from contrib.auth.context_processors.auth. As per the documentation, I tried this (foo is the app label, Bar is the model, and I'm using default permissions): {% if

Re: Question about "Django 1.1 Testing and Debugging" Book for Karen

2011-04-29 Thread Karen Tracey
On Thu, Apr 28, 2011 at 6:18 PM, Margie Roginski wrote: > > I have a bit of time on my hands and was going to run through your > book to cement my understanding of the best way to test. I started > out and was immediately confronted with the fact that there seem to be >

Re: sorting model data in template page

2011-04-29 Thread Victor Harada
The for tag does not accept calls with parameter. You should make the view function calculate the sorted list and pass it to the template or create a template tag that accepts your call 2011/4/29 Krish > This code works perfectly, > > {% for talk_child in

Re: This section is converting database table to excel file

2011-04-29 Thread Od-Erdene Ch
thank you very much for your advice, but unfortunately this method taking more than 10 minutes too. if there's a any better way please. response = HttpResponse(result.read(), mimetype='application/ms-excel') response['Content-Disposition'] = 'attachment;

sorting model data in template page

2011-04-29 Thread Krish
This code works perfectly, {% for talk_child in talk.child.all %} {{talk_child.text}} {{talk_child.created_dt}} {% endfor %} Now, I want to sort all child based on created_dt ASC (something like below), but it doesn't work. How can I get this right? {% for talk_child in talk.child.order_by

Re: how to configure mongoDB in Django?

2011-04-29 Thread Kenneth Gonsalves
On Fri, 2011-04-29 at 00:52 -0700, ashish tiwari wrote: > i used Django with Sqlite3, > I'm thinking about to use MongoDB as backend. > but i don't no how to configure it, > and which packages need to configure mongoDB in Django? as of now django does not support nosql. In fact there is a hot

Re: cx_Oracle error: ImproperlyConfigured

2011-04-29 Thread Jirka Vejrazka
Have you checked permissions? -- 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

how to configure mongoDB in Django?

2011-04-29 Thread ashish tiwari
Hey friends, i used Django with Sqlite3, I'm thinking about to use MongoDB as backend. but i don't no how to configure it, and which packages need to configure mongoDB in Django? Best Regards --ashish -- You received this message because you are subscribed to the Google Groups "Django users"