Re: How can I create a sequence number for a data set in the model?

2012-04-07 Thread Abhaya Agarwal
Hi Mark, On Sat, Apr 7, 2012 at 8:57 PM, Mark Phillips wrote: > Actually, just an ORDER BY FK, PK would produce the above... GROUP >> BY would be used if you need something like counts/avg for each FK set. >> > > I agree that if the data in the db was entered correctly in the first > plac

Re: Django 1.4: TypeError: get_db_prep_value() got an unexpected keyword argument 'connection'

2012-04-07 Thread Russell Keith-Magee
Hi, What you've hit here is the end of the deprecation cycle for code that doesn't support multiple databases. In Django 1.2, we introduced multiple database support; in order to support this, the prototype for get_db_preb_lookup() and get_db_prep_value() was changed. For backwards compatibil

loader.select_template breaks template name

2012-04-07 Thread gnesher
Hi, I'm receiving some odd results while playing with select_template (Django 1.4) I'm calling the following code in my view: loader.select_template('test.html') Which results in the following error: TemplateDoesNotExist at /test t, e, s, ., h, m, l Can't really figure out what I'm doing wrong

Re: Upgrading django on a mac

2012-04-07 Thread Jonathan Baker
Ah, good to know. Apologies, but I glanced over your original code to quickly and thought you renamed the directory. Glad it worked out. On Sat, Apr 7, 2012 at 3:54 PM, Larry Martell wrote: > On Sat, Apr 7, 2012 at 3:46 PM, Jonathan Baker > wrote: > > I'm guessing that your $PATH is configured t

Re: Upgrading django on a mac

2012-04-07 Thread Larry Martell
On Sat, Apr 7, 2012 at 3:46 PM, Jonathan Baker wrote: > I'm guessing that your $PATH is configured to look for django in it's old > location, and not the new one. No it's not that (the new location is the same as the old). But I figured it out - the django python package is apparently a subdirect

Re: Upgrading django on a mac

2012-04-07 Thread Jonathan Baker
I'm guessing that your $PATH is configured to look for django in it's old location, and not the new one. On Sat, Apr 7, 2012 at 3:33 PM, Larry Martell wrote: > I'm on a mac, running Mac OS X Version 10.5.8 (Leopard). I was running > django -r 13034 that I got from SVN. I am trying to upgrade to 1

Upgrading django on a mac

2012-04-07 Thread Larry Martell
I'm on a mac, running Mac OS X Version 10.5.8 (Leopard). I was running django -r 13034 that I got from SVN. I am trying to upgrade to 1.4 from git. After I upgrade, python can no longer find django. Here's what I did: $ cd /usr/local/lib/python2.6/dist-packages $ sudo mv django/ django-13034 $ sud

Re: PostGIS 2.0.0 problems

2012-04-07 Thread Christophe Pettus
On Apr 7, 2012, at 12:01 PM, Oleg Korsak wrote: > sorry? which one SQL? :) I'm trying to run tests with Jenkins CI, but > it fails on creating DB. Ah, OK. The automated tests will probably fail, yes. For your application, you can work around this problem by manually created the indexes rather

Re: PostGIS 2.0.0 problems

2012-04-07 Thread Oleg Korsak
sorry? which one SQL? :) I'm trying to run tests with Jenkins CI, but it fails on creating DB. 7 апреля 2012 г. 21:56 пользователь Christophe Pettus написал: > > On Apr 7, 2012, at 11:41 AM, Oleg Korsak wrote: > >> So looks PostGIS 2.0.0 is unusable with Django right now? > > There's no reason y

Re: PostGIS 2.0.0 problems

2012-04-07 Thread Christophe Pettus
On Apr 7, 2012, at 11:41 AM, Oleg Korsak wrote: > So looks PostGIS 2.0.0 is unusable with Django right now? There's no reason you can't apply the SQL manually for the moment. -- -- Christophe Pettus x...@thebuild.com -- You received this message because you are subscribed to the Google Grou

PostGIS 2.0.0 problems

2012-04-07 Thread Oleg Korsak
Hello. After upgrading PostGIS to 2.0.0 version and migrating DB (took some time) I still have one problem: django.db.utils.DatabaseError: operator class "gist_geometry_ops" does not exist for access method "gist" I've found a discussion here: https://code.djangoproject.com/ticket/16455 So looks

Reloading a project without restarting Python

2012-04-07 Thread Tobia Conforto
Hi all I'm developing a portlet bridge in Jython, to enable developing J2EE portlets in Django, and I need to include a reload-on-code-change feature, to aid in development. Unfortunately, the way django.utils.autoreload works, by triggering a complete restart of the Jython interpreter, has huge

Re: How can I access log production server?

2012-04-07 Thread Arruda
Thanks for clarifying me that Ejah, but I already have it configured(got from a friend project). But after reading the docs for it, I still can't understand how to do it look like the runserver command. Could you give me some example, please? Thanks Em sábado, 7 de abril de 2012 03h36min44s UTC-

Re: It's magic the view does not exist for django but it worked 5 secondes before and it still exist

2012-04-07 Thread Bussiere
the problem is solved. Just saving the view file under vim solved it. It must have been an encoding problems with the file. But it was strange because it reads some part of the file. By the way thanks for your support. Bussiere Le samedi 7 avril 2012 18:13:28 UTC+2, Marcin a écrit : > > I'm n

Re: It's magic the view does not exist for django but it worked 5 secondes before and it still exist

2012-04-07 Thread Marcin Tustin
I'm not sure what you think we can do to help you with this information. On Sat, Apr 7, 2012 at 17:06, Bussiere wrote: > my point the import in shell does not work too. > > I had a import error from a line of import in view corrected it and it's > still not working. > > i had an error in a form

Re: It's magic the view does not exist for django but it worked 5 secondes before and it still exist

2012-04-07 Thread Bussiere
FINNND \o/ Save the file under vim resolved the problems >.> Bussiere Le samedi 7 avril 2012 18:06:32 UTC+2, Bussiere a écrit : > > my point the import in shell

Re: It's magic the view does not exist for django but it worked 5 secondes before and it still exist

2012-04-07 Thread Bussiere
and i've used cygwin vim to find if there was some bad characters in the file but no. Bussiere Le samedi 7 avril 2012 18:03:17 UTC+2, Marcin a écrit : > > python manage.py shell > > On Sat, Apr 7, 2012 at 16:59, Bussiere wrote: > >> how to do that ? >> >> Le samedi 7 avril 2012 17:38:49 UTC+2,

Re: It's magic the view does not exist for django but it worked 5 secondes before and it still exist

2012-04-07 Thread Bussiere
my point the import in shell does not work too. I had a import error from a line of import in view corrected it and it's still not working. i had an error in a form imported. So it reads the file because he tel me if there is an error but it didn't found index. Regards Le samedi 7 avril 201

Re: It's magic the view does not exist for django but it worked 5 secondes before and it still exist

2012-04-07 Thread Marcin Tustin
python manage.py shell On Sat, Apr 7, 2012 at 16:59, Bussiere wrote: > how to do that ? > > Le samedi 7 avril 2012 17:38:49 UTC+2, Marcin a écrit : > >> So, you can import the function in the django shell? Have you considered >> replacing the string-based import with a normal import? >> >> On Sa

Re: It's magic the view does not exist for django but it worked 5 secondes before and it still exist

2012-04-07 Thread Bussiere
how to do that ? Le samedi 7 avril 2012 17:38:49 UTC+2, Marcin a écrit : > > So, you can import the function in the django shell? Have you considered > replacing the string-based import with a normal import? > > On Sat, Apr 7, 2012 at 16:29, Bussiere wrote: > >> Everything is fine. >> >> I said

Re: superclass SingleObjectMixin

2012-04-07 Thread Dave
Thanks Daniel, appreciate the super fast response! I did your suggestion and it works like a charm. It's better than putting the method in each class. Was just hoping there is a way I could override get_object in the singeobjectmixin everywhere vs. adding another mixin for each CBV. Perhaps i'm jus

Re: superclass SingleObjectMixin

2012-04-07 Thread Daniel Roseman
On Saturday, 7 April 2012 16:40:05 UTC+1, Dave wrote: > > Hi, I need to manipulate my pk when using new class based views. In > order to DRY I think what's needed is to superclass SingleObjectMixin. > > I have the following but it's not working. Greatly appreciate help/ > suggestions! > > In vi

superclass SingleObjectMixin

2012-04-07 Thread Dave
Hi, I need to manipulate my pk when using new class based views. In order to DRY I think what's needed is to superclass SingleObjectMixin. I have the following but it's not working. Greatly appreciate help/ suggestions! In view.py have the below which does not work. from django.views.generic.det

Re: It's magic the view does not exist for django but it worked 5 secondes before and it still exist

2012-04-07 Thread Marcin Tustin
So, you can import the function in the django shell? Have you considered replacing the string-based import with a normal import? On Sat, Apr 7, 2012 at 16:29, Bussiere wrote: > Everything is fine. > > I said you it worked five second before ... > > > Bussiere > > Le samedi 7 avril 2012 16:58:51

Re: It's magic the view does not exist for django but it worked 5 secondes before and it still exist

2012-04-07 Thread Bussiere
Everything is fine. I said you it worked five second before ... Bussiere Le samedi 7 avril 2012 16:58:51 UTC+2, Marcin a écrit : > > Reinstalling django will not help. Verify that the file is present and has > the correct permissions (likewise all superior directories, and also the > relevant

Re: How can I create a sequence number for a data set in the model?

2012-04-07 Thread Mark Phillips
On Fri, Apr 6, 2012 at 10:58 PM, Dennis Lee Bieber wrote: > On Fri, 6 Apr 2012 22:34:35 -0700, Mark Phillips > declaimed the following in > gmane.comp.python.django.user: > > > > > Basically, I have sets of data determined by a foreign key, and I want to > > know the order in which the rows arriv

Re: Django 1.4: TypeError: get_db_prep_value() got an unexpected keyword argument 'connection'

2012-04-07 Thread Shawn Milochik
On Sat, Apr 7, 2012 at 12:03 AM, xthepoet wrote: > This was working fine for my Ubuntu 10.04LTE system with Django > 1.3.1. It seems broken now in 1.4. > > In Django 1.4, I get this error TypeError: get_db_prep_value() got an > unexpected keyword argument 'connection' when saving an image to an

Re: It's magic the view does not exist for django but it worked 5 secondes before and it still exist

2012-04-07 Thread Marcin Tustin
Reinstalling django will not help. Verify that the file is present and has the correct permissions (likewise all superior directories, and also the relevant __init__.py files. These files are essential.). You may also like to run the django shell, and try to import that module. If that does not wo

orange svm

2012-04-07 Thread dummyman dummyman
Hi, Is anyone having experience in orange tool. I need a help Orange tutorials explains how to load data from a .tab file But my requirement is i ve a list in python which needs to be supplied as input to orange svm Is there a way to convert list to orange.tab format ? I know this is a djang

cache decorators in urls.py error

2012-04-07 Thread Phang Mulianto
Hi, i have my apps and try to use cache decorator in url.py but got error. Here are the urls.py from django.views.decorators.cache import cache_page urlpatterns = patterns('article.views', #(r'^$','index', { 'template_name': 'blog/public_list.html'}, 'index'), (r'^$',cache_page('index')

Re: It's magic the view does not exist for django but it worked 5 secondes before and it still exist

2012-04-07 Thread Bussiere
i've made no deploiement at all ... No views in invitation works. I was working on live with the test server runnning. (i've tried to restart it more than one time after i get this error). And by magic all the views in invitation don't works, they are not found. Maybe a reinstallation of djan

Re: It's magic the view does not exist for django but it worked 5 secondes before and it still exist

2012-04-07 Thread Marcin Tustin
Does invitation/create_invitation work? If not, I suspect that you have either some kind of configuration issue, or the file has gone missing from your deployment/has wrong permissions set. On Sat, Apr 7, 2012 at 15:36, Bussiere wrote: > from django.conf.urls.defaults import patterns, include,

Re: It's magic the view does not exist for django but it worked 5 secondes before and it still exist

2012-04-07 Thread Bussiere
from django.conf.urls.defaults import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'Jackpoint.views.home', name='home'), # url(r'^Jackpoint/', includ

Re: It's magic the view does not exist for django but it worked 5 secondes before and it still exist

2012-04-07 Thread Marcin Tustin
What does your urls.py look like? On Sat, Apr 7, 2012 at 15:27, Bussiere wrote: > i've got this error : > ViewDoesNotExist at /invitation/ > > Could not import jackpoint.invitation.views.index. View does not exist in > module jackpoint.invitation.views. > > > But yes it exist and worked fine 5

It's magic the view does not exist for django but it worked 5 secondes before and it still exist

2012-04-07 Thread Bussiere
i've got this error : ViewDoesNotExist at /invitation/ Could not import jackpoint.invitation.views.index. View does not exist in module jackpoint.invitation.views. But yes it exist and worked fine 5 secondes before. the image of eclipse : http://dl.dropbox.com/u/19753332/wtf.png all the o

Django 1.4: TypeError: get_db_prep_value() got an unexpected keyword argument 'connection'

2012-04-07 Thread xthepoet
This was working fine for my Ubuntu 10.04LTE system with Django 1.3.1. It seems broken now in 1.4. In Django 1.4, I get this error TypeError: get_db_prep_value() got an unexpected keyword argument 'connection' when saving an image to an ImageField. System (installed from Ubuntu Lucid repository

Strange behaviour when annotating.

2012-04-07 Thread M. Can Bayrak
Hello, i have a question, but it's hard to write as an email so i wrote a blog post . Thanks for your response. -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Why using Generic Views?

2012-04-07 Thread Phang Mulianto
HI, i understand why need to use generic views after i code some of my function like showing list of data, and the view is the same and i end up copy paste it , not type it (smarter huh?) , just change my db object and pass to my template. well , generic view is come in the rescue and we can prod

Re: AttributeError at /admin/coltrane/entry/add/ 'Entry' object has no attribute 'pubdate'

2012-04-07 Thread laurence Turpin
Thank you akaariai for replying to my post. When I looked at the problem the next day I had a different problem. I have since learnt that when you create a django project in eclipse you should not select the option for an src folder as it confuse django. I have therefore decided to restart from s

Re: Improving Site Performance

2012-04-07 Thread Phang Mulianto
Well.. i think the lazy query is on action. The query executed to get the data from database to be use in your view, if you said requestContext(..) if you remove it, of course the data will not available in your view/template. To reduce the query executed everytime you call the page, try use que

Templates and Models

2012-04-07 Thread Sophia
Hi all, I have the following form( TextBox ) : I wrote the following Model as an input for the TextBox, and when we write a subject in the text box and press Enter it should be shown in another box above the TextBox : class Company(models.Model): Subject = models.CharField(max_length=30

Re: Django 1.5 static files strangeness

2012-04-07 Thread Mike Dewhirst
My bad. Not a bug. In my urls.py ... if settings.DEBUG: urlpatterns += patterns('', (r'^media\/(?P.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}), ) from django.contrib.staticfiles.urls import staticfiles_urlp