Re: Haystack error rebuinding index

2010-12-20 Thread Sam Lai
2010/12/21 Daniel França : > anyone? > > 2010/12/19 Daniel França >> >> Hi all >> I was using haystack(xapian) at a Mac, so I moved it to a Linux (Ubuntu >> 10.10) using python 2.6.6, but now when I try to rebuild the index I get the >> following error: >> AttributeError: 'ProfileIndex' object has

Re: Database edit tutorial / open source projects to learn from

2010-12-20 Thread Kenneth Gonsalves
On Mon, 2010-12-20 at 06:58 -0800, Michele JD Granocchia wrote: > Can anybody post a good tutorial / open source project to learn > something about database transactions? postgresql manual is excellent -- regards Kenneth Gonsalves -- You received this message because you are subscribed to the

Re: turning a Model instance into an instance of one of it's subclasses

2010-12-20 Thread Łukasz Rekucki
On 21 December 2010 00:18, Morgan Wahl wrote: > Actually, it's funny you mention #7623; my situation _is_ described in > #11618 ( http://code.djangoproject.com/ticket/11618 ). That bug was > marked as a dup of #7623, but in my opinion isn't. It is a duplicate, that's why I mentioned #7623 which i

Re: Haystack error rebuinding index

2010-12-20 Thread Daniel França
anyone? 2010/12/19 Daniel França > Hi all > I was using haystack(xapian) at a Mac, so I moved it to a Linux (Ubuntu > 10.10) using python 2.6.6, but now when I try to rebuild the index I get the > following error: > AttributeError: 'ProfileIndex' object has no attribute 'full_prepare' > > Profil

Re: turning a Model instance into an instance of one of it's subclasses

2010-12-20 Thread Morgan Wahl
Actually, it's funny you mention #7623; my situation _is_ described in #11618 ( http://code.djangoproject.com/ticket/11618 ). That bug was marked as a dup of #7623, but in my opinion isn't. 2010/12/20 Łukasz Rekucki : > This looks a lot like this bug: http://code.djangoproject.com/ticket/7623. > >

Re: turning a Model instance into an instance of one of it's subclasses

2010-12-20 Thread Andrejus
Sent from my mobile device On Dec 20, 2010 8:04 PM, "morgan wahl" wrote: > Hello all, > > I was wonder if there is a way to turn a model instance into an > instance of a subclass of it's class. E.g.: > > class Document(models.Model): > doctype = models.CharField(max_length=256, blank=True, null=Tr

Re: turning a Model instance into an instance of one of it's subclasses

2010-12-20 Thread Morgan Wahl
That bug is slightly different; it concerns having _more than one_ entry in subclass(es)'s tables refer to the _same_ entry in the superclass's (which pretty much breaks the analogy with class inheritance, if you ask me). My situation is that I have various instances of Document, some of which are

Re: turning a Model instance into an instance of one of it's subclasses

2010-12-20 Thread Morgan Wahl
> > Morgan, take a look at the inheritanceManager of this > app: https://github.com/carljm/django-model-utils#readme > -- > Marc > I'm not sure how InheritanceManager would quite solve _this_ problem, although it certainly is handy (I've independently implemented something like InheritanceCastMode

Re: turning a Model instance into an instance of one of it's subclasses

2010-12-20 Thread Łukasz Rekucki
This looks a lot like this bug: http://code.djangoproject.com/ticket/7623. On 20 December 2010 23:14, morgan wahl wrote: > Yes, I had hope that would work, but it doesn't (see my original post). In > your example u.doctype would end up as None instead of 'whatever'. > > -- > You received this mes

Re: turning a Model instance into an instance of one of it's subclasses

2010-12-20 Thread morgan wahl
ah, yes you beat me to it while I was composing my post below... Thanks! On Dec 20, 5:34 pm, Marc Aymerich wrote: > On Mon, Dec 20, 2010 at 11:14 PM, morgan wahl wrote: > > Yes, I had hope that would work, but it doesn't (see my original post). In > > your example u.doctype would end up as None

Re: turning a Model instance into an instance of one of it's subclasses

2010-12-20 Thread Marc Aymerich
On Mon, Dec 20, 2010 at 11:34 PM, Marc Aymerich wrote: > > > On Mon, Dec 20, 2010 at 11:14 PM, morgan wahl wrote: > >> Yes, I had hope that would work, but it doesn't (see my original post). In >> your example u.doctype would end up as None instead of 'whatever'. > > > woww, I really need go to s

Re: turning a Model instance into an instance of one of it's subclasses

2010-12-20 Thread morgan wahl
Hmmm, I seem to have somewhat figured out what's going on. Using Marc's example, when you instantiate u it's doctype field is set to the default for Documents (None), since it isn't passed in. Then when you save it, it overwrites the field in d. So it seems the answer to my question is something

Re: turning a Model instance into an instance of one of it's subclasses

2010-12-20 Thread Marc Aymerich
On Mon, Dec 20, 2010 at 11:14 PM, morgan wahl wrote: > Yes, I had hope that would work, but it doesn't (see my original post). In > your example u.doctype would end up as None instead of 'whatever'. woww, I really need go to sleep :) I don't know the best way to achieve that, btw you can pass

Re: turning a Model instance into an instance of one of it's subclasses

2010-12-20 Thread morgan wahl
Yes, I had hoped that would work, but it doesn't (see my original post). In your example u.doctype would end up as None instead of 'whatever' (however, u.document_ptr is d). -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

Re: turning a Model instance into an instance of one of it's subclasses

2010-12-20 Thread morgan wahl
Yes, I had hope that would work, but it doesn't (see my original post). In your example u.doctype would end up as None instead of 'whatever'. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@goog

Re: turning a Model instance into an instance of one of it's subclasses

2010-12-20 Thread Marc Aymerich
On Mon, Dec 20, 2010 at 11:00 PM, Morgan Wahl wrote: > On Mon, Dec 20, 2010 at 4:49 PM, Marc Aymerich > wrote: > > > > > > On Mon, Dec 20, 2010 at 8:29 PM, morgan wahl > wrote: > >> > >> Hello all, > >> > >> I was wonder if there is a way to turn a model instance into an > >> instance of a subc

Re: turning a Model instance into an instance of one of it's subclasses

2010-12-20 Thread Morgan Wahl
On Mon, Dec 20, 2010 at 4:49 PM, Marc Aymerich wrote: > > > On Mon, Dec 20, 2010 at 8:29 PM, morgan wahl wrote: >> >> Hello all, >> >> I was wonder if there is a way to turn a model instance into an >> instance of a subclass of it's class. E.g.: >> >> class Document(models.Model): >>    doctype =

Re: turning a Model instance into an instance of one of it's subclasses

2010-12-20 Thread Marc Aymerich
On Mon, Dec 20, 2010 at 8:29 PM, morgan wahl wrote: > Hello all, > > I was wonder if there is a way to turn a model instance into an > instance of a subclass of it's class. E.g.: > > class Document(models.Model): >doctype = models.CharField(max_length=256, blank=True, null=True) > > class Upl

Using the media url in JS

2010-12-20 Thread Robert Steckroth
Hey gang, anyone care to share the best way to incorporate this image loading function into my Website. *Here is the JS premise I want to achieve --> textureFile[t].image.src = {{ MEDIA_URL }} + tempName + tExt; This JS is successfully loaded by index.html via this --> *Needs a working

turning a Model instance into an instance of one of it's subclasses

2010-12-20 Thread morgan wahl
Hello all, I was wonder if there is a way to turn a model instance into an instance of a subclass of it's class. E.g.: class Document(models.Model): doctype = models.CharField(max_length=256, blank=True, null=True) class UploadedFile(Document): filename = models.CharField(max_length=256)

DB synch error: postgis-1.5.dll

2010-12-20 Thread Charlie
I'm trying to create a PostGIS spatial database and having all sorts of configuration issues (Windows XP SP3, PostgreSQL 8.4, PostGIS version 1.5.2.3) . I've finally made it to the synch step using the command 'python manage.py syncdb'. The tables are created fine, and spatial indexes are created

MySQL jython backend implementation

2010-12-20 Thread Javier Aguirre
Hi, I'm newbee in jython, and I need to connect to mysql with jython using backend does anybody know how to?? bye -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscri

Multi-Table inheritance save problem

2010-12-20 Thread shitiz
Hi, I have a rather complicated scenario. I have two models A and B. I have a third Class C which inherits both A and B. I am now overriding the save method of class C using super.save Now an object A is added to the database. However when the save method of B is called it fetches the id field

Re: Serialize Data for JSON output

2010-12-20 Thread Dave Sayer
Thanks for your response, Nick. I have called the gallery_thumbs_json variable in my template and get a very comprehensive array of data, which is nice. I have then set this as a js var and then passed that to my javascript via eval(), which gives me a nicely formatted array but i can't work out h

Re: server connection dropped? IO Error? What's going on?

2010-12-20 Thread bax...@gretschpages.com
On Dec 20, 11:26 am, Tom Evans wrote: > On Mon, Dec 20, 2010 at 4:52 PM, bax...@gretschpages.com > > If I load the page in chrome with its resource tracking debug tab > open, I can see that several files that are requested receive zero > sized responses. When I loaded the page, this was for (wha

Re: server connection dropped? IO Error? What's going on?

2010-12-20 Thread Tom Evans
On Mon, Dec 20, 2010 at 4:52 PM, bax...@gretschpages.com wrote: > Foolishly posted this late last week, which is a tough time to get > help. Please forgive me for reposting, but I'm at my wit's end here. > > What I've got is a very localized, yet apparently completely random > sort of IO error, or

Re: server connection dropped? IO Error? What's going on?

2010-12-20 Thread bax...@gretschpages.com
> Just looking at your style.css file, it's got a weird (to my eye) line in it: > >         src: local('☺'), > url('/media/fonts/LeagueGothic/League_Gothic-webfont.woff') format('woff'), > Comes from fontsquirrel. As I recall, it forces the local load if the font is available, or passes along t

Re: server connection dropped? IO Error? What's going on?

2010-12-20 Thread Dan Fairs
> That topic will do it every time. Pretty much every place else on the > site will not. The server is not busy, it's something about that > topic, and the handful of others this thing has hit. > > I can't find any commonality among the problem topics/posts. All other > posts/topics are fine. > I

server connection dropped? IO Error? What's going on?

2010-12-20 Thread bax...@gretschpages.com
Foolishly posted this late last week, which is a tough time to get help. Please forgive me for reposting, but I'm at my wit's end here. What I've got is a very localized, yet apparently completely random sort of IO error, or something else causing the server to drop out. You can see an example her

Re: Serialize Data for JSON output

2010-12-20 Thread Nick
This sounds like it is an issue with your JS for your carousel. If you are needing to get your JSON directly into your JS code then you can just make gallery_thumbs_json_s list as a variable {'caro_list': gallery_thumbs_json_s} and then just call it in your template On Dec 20, 9:16 am, Dave Saye

redirecting on SMTP error

2010-12-20 Thread Nick
I have an app with some SMTP errors that are getting tricky. Our network team is working on our email servers for the next few days and it is affecting the auto-notifications portion of the app. Right now i am getting a 550 'relay not permitted' error. How can I trap this error and redirect upon e

Serialize Data for JSON output

2010-12-20 Thread Dave Sayer
Hi, I am working on a photo portfolio site at the moment and for the gallery side of things, I am using django-photologue to provide much of the backend muscle. It's working great so far but I really want to use an image slider/carousel to provide a nice, slick way of navigating the photos. I am

Re: add template variable to an external view, without changing the view

2010-12-20 Thread Mikhail Korobov
Hi Yves, In django 1.3 there is also a TemplateResponse ( http://docs.djangoproject.com/en/dev/ref/template-response/ ) that can perform as render_to_response replacement, doesn't require class based views and enables developer to change the template context (as well as the template to be rendered

Complex serialization from models

2010-12-20 Thread gregory semah
Hi all, I'm searching a simple way to generate xml from my models, and a simple use of serializers can do this for me. But my models are defined with ForeignKey and ManyToManyField... The xml generated shows me only key values of these field. Is there a simple way to catch any other field value t

add template variable to an external view, without changing the view

2010-12-20 Thread yves_s
Hello I'm using the registration django app and want to have the registration and login form on the same page. When I reuse the auth_login view, the registration form is missing in the context of the template. My quickfix is to copy the original auth login view to my own views. Then I changed the

Database edit tutorial / open source projects to learn from

2010-12-20 Thread Michele JD Granocchia
Can anybody post a good tutorial / open source project to learn something about database transactions? I didn't find anything useful... Thanks in advance!!! ^_^ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: template concat of string trouble (solved)

2010-12-20 Thread Tonton
{% autoescape *OFF* %} {{ script }} {% endautoescape %} On Mon, Dec 20, 2010 at 3:41 PM, Tonton wrote: > yes i am reading on this > > but this > {{script|escapejs}} seems to not work > i investigate more > > thanks > > > On Mon, Dec 20, 2010 at 3:37 PM, Tom Evans wrote: > >> On Mon, Dec

Re: template concat of string trouble

2010-12-20 Thread Tonton
yes i am reading on this but this {{script|escapejs}} seems to not work i investigate more thanks On Mon, Dec 20, 2010 at 3:37 PM, Tom Evans wrote: > On Mon, Dec 20, 2010 at 2:20 PM, Tonton wrote: > > hello > > > > i don't the the name of ' and this " but is about my trouble with it ... > >

Re: template concat of string trouble

2010-12-20 Thread Tom Evans
On Mon, Dec 20, 2010 at 2:20 PM, Tonton wrote: > hello > > i don't the the name of ' and this " but is about my trouble with it ... > > i try to made a script for open layers  with url > :http://ipadress/webservices > > like this > > var wms0=new > OpenLayers.Layer.WMS(restcl_bus_line,'http://192.

template concat of string trouble

2010-12-20 Thread Tonton
hello i don't the the name of ' and this " but is about my trouble with it ... i try to made a script for open layers with url : http://ipadress/webservices like this var wms0=new OpenLayers.Layer.WMS(restcl_bus_line,'http://192.168.12.60/cgi-bin/mapserv?map=/var/www/geomod/demo.map&;', from

Re: Django queryset custom manager - refresh caching

2010-12-20 Thread LaundroMat
On Dec 20, 2:23 pm, Daniel Roseman wrote: > On Monday, December 20, 2010 11:03:10 AM UTC, LaundroMat wrote: > > > Hi - > > > Django seems to be caching data that I query through a custom method on a > > model. I've tried to describe the issue over at SO ( > >http://stackoverflow.com/questions/40

Re: Django queryset custom manager - refresh caching

2010-12-20 Thread LaundroMat
On Dec 20, 2:23 pm, Daniel Roseman wrote: > On Monday, December 20, 2010 11:03:10 AM UTC, LaundroMat wrote: > > > Hi - > > > Django seems to be caching data that I query through a custom method on a > > model. I've tried to describe the issue over at SO ( > >http://stackoverflow.com/questions/40

Re: Django queryset custom manager - refresh caching

2010-12-20 Thread Daniel Roseman
On Monday, December 20, 2010 11:03:10 AM UTC, LaundroMat wrote: > > Hi - > > Django seems to be caching data that I query through a custom method on a > model. I've tried to describe the issue over at SO ( > http://stackoverflow.com/questions/4010317/django-queryset-custom-manager-refresh-caching)

Transifex - django 1.3

2010-12-20 Thread Thierry
Whats the best way to currently setup transifex with django 1.3 The announcement says that people are working on this. Dont want to duplicate their efforts, where can i find information on this? -- You received this message because you are subscribed to the Google Groups "Django users" group. T

Re: VirtualHost and external IP

2010-12-20 Thread Tom Evans
On Sat, Dec 18, 2010 at 4:58 AM, andy wrote: > I have the following in my apache httpd.conf file > > > > >        ServerName localhost/portfolio > Short note: this is a nonsense ServerName. The ServerName directive must not contain any path info (ie you cannot have different virtualhosts for htt

Django queryset custom manager - refresh caching

2010-12-20 Thread Mathieu Dhondt
Hi - Django seems to be caching data that I query through a custom method on a model. I've tried to describe the issue over at SO (http://stackoverflow.com/questions/4010317/django-queryset-custom-manager-refresh-caching), but received close to no replies... Does anyone here have an idea as to

Re: query fast on command line - slow via url

2010-12-20 Thread Tom Evans
On Sun, Dec 19, 2010 at 6:43 PM, NoviceSortOf wrote: > I'm trying to determine why our search queries return so slow. > > We are not doing anything fancy in our searches, simply searching > for author, or title in a table of about 6000 books. > > http://www.rareorientalbooks.com/searchadv/ > > On

Re: why will HttpResponseRedirect prevent re submit of form?

2010-12-20 Thread Tom Evans
On Mon, Dec 20, 2010 at 10:02 AM, Mingming Wang wrote: > Thanks a lot Javier! It takes me days to understand this. > Hm...what if we don't use Redirect, what will happen in the wire? is it the > following? If so, then no re submit problem lor. I must missed something > out. > <-  GET /yourapp/vote

Re: Custom SQL questions

2010-12-20 Thread Tim Sawyer
On 20/12/10 00:10, Andy wrote: On Dec 19, 6:20 pm, Tim Sawyer wrote: I think so, yes. Something like this: You can then do something like anObjectA = ObjectA.objects.filter(id=1)[0] objectBs = ObjectB.objects.filter(object_a=anObjectA) This requires 2 separate queries, right? I'm hoping

Re: why will HttpResponseRedirect prevent re submit of form?

2010-12-20 Thread Mingming Wang
Thanks a lot Javier! It takes me days to understand this. Hm...what if we don't use Redirect, what will happen in the wire? is it the following? If so, then no re submit problem lor. I must missed something out. <- GET /yourapp/voteform/ -> 200 OK (html with form) <- POST /yourapp/vote (params)

Re: Forbidden (403) - CSRF verification failed. Request aborted.

2010-12-20 Thread Daniel Roseman
On 17 December 2010 19:46, hank23 wrote: > Thanks for the note. Below is the screen code again which I've changed > a little, plus the two views which deal with it. Let me know if you > need anything else. Here's the screen code: > > Add Poll Question Screen > > {% if error_message %}{{ error_mes