One project, many apps, how to share single user profile

2010-12-17 Thread donn
Hi, I hope someone can give me a hand. I'd like to have a *single* UserProfile table/model which is *shared* across many apps, much like auth_user is. --- setup info --- Django 1.2.1 on a recent Linux system. All pretty up-to-date. One project (X). Many apps (A,B,C). The url, say:

Re: Get ServerName in settings.py

2009-05-22 Thread Donn Ingle
Graham -- thank you for that detailed response. I had not expected it to be quite so intricate, so it will take me a wee while to savvy. Regards, \d --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Get ServerName in settings.py

2009-05-21 Thread Donn Ingle
Hi, Given that my apache uses many VirtualHosts and within each a ServerName, how can I get that ServerName into a variable in my settings.py file? I am using WSGI and mod_python. (different setups on dev vs. server) The reason is that I need to be able to build the whole http://servername in

Re: Django CMS and template tags (is it a problem with pagination mechanism?)

2009-02-22 Thread Donn
On Sunday, 22 February 2009 21:00:24 Theme Park Photo, LLC wrote: > {% block content %} > Hello > {% end block %} It's not this extra space between end and block is it? \d -- Where I web: http://otherwise.relics.co.za/ Comics, tutorials, software and sundry

Re: comments system - there and back again

2009-02-06 Thread Donn
Well, to answer with my current solution: > My one idea is to intercept comments/posted/?c=... and then write a view to > redirect back to the original page. Is this the route to take? I did this: urls.py # Catch url for comment just posted (preview or error)

comments system - there and back again

2009-02-06 Thread Donn
Hi, I have docced, searched and read old posts, but I still can't get comments to behave. 1. I have copied the templates to my app. 2. I have comments installed and working. 3. I have looked at the source, in vain; but I ain't too bright :) 4. I have a hidden "next" field in form.html so that a

Re: feeds and repetition

2009-01-28 Thread Donn
On Wednesday, 28 January 2009 14:49:27 Torsten Bronger wrote: > If the ID of an entry is already known to the feedreader, it isn't > displayed. Okay, so it's built-into the reader. Thanks. \d -- Where I web: http://otherwise.relics.co.za/ Comics, tutorials, software and sundry

Re: Complex Form Widgets

2009-01-28 Thread Donn
On Wednesday, 28 January 2009 09:46:09 Paul Johnston wrote: > Is it possible to use more complex form widgets In my *very* limited experience, I would say yes. The widgets are really javascript and all your Django view needs to worry about is what comes back via GET or POST. Fetch the data

feeds and repetition

2009-01-27 Thread Donn
Hi, Dumb question - In a feed situation, I am using something like: return Page.objects.order_by('-date')[:30] That will always return (say) 30 results. They don't change, it's always the same 30, with perhaps a few new ones. Do I have to worry about this sameness -- or does the syndication

Re: Getting url/host/domain info in settings.py

2009-01-14 Thread Donn
Tom, thanks for your feedback. I guess what I was asking was how to get the domain/subdomain info from places like models and settings -- i.e. places that have no connection to a request. Still, I see a way through and will employ your suggestions. \d

Re: Getting url/host/domain info in settings.py

2009-01-13 Thread Donn
On Tuesday, 13 January 2009 19:28:01 Tom Dyson wrote: > We do something like this with middleware in the Carbon Account[1]: I have not used middleware yet, so will look into it. I am not sure if it can supply request.META *within* settings.py though. I want to set certain variables depending

Getting url/host/domain info in settings.py

2009-01-13 Thread Donn
Hi, Can anyone help me get some extra info in settings.py? I have a domain that I want to point to various different Django apps depending on the 'hostname' portion of the domain name. ***.mydomain.com has (for ***): www comics stuff I want that first portion (www, comics, stuff) available in

Re: FileSystemStorage content vs PIL Image - **Initial solution**

2009-01-05 Thread Donn
On Monday, 05 January 2009 17:50:09 A Melé wrote: > Donn, take a look at django-thumbs source code Many thanks -- it looks familiar now :) \d --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django user

Re: FileSystemStorage content vs PIL Image - **Initial solution**

2009-01-05 Thread Donn
On Monday, 05 January 2009 14:00:16 Eric Abrahamsen wrote: > content.write(o.getvalue()) > super(CustomImageStorage,self).save(name, content) That gives: 'InMemoryUploadedFile' object has no attribute '_mode' Exception Location: /usr/lib/python2.5/site-packages/django/core/files/base.py

Re: FileSystemStorage content vs PIL Image - **Initial solution**

2009-01-05 Thread Donn
On Monday, 05 January 2009 00:51:03 Donn wrote: > I am stuck on the interface between a PIL Image and a > FilesystemStorage 'content' object. > > I can: img = Image.open(content) > But how do I pass 'img' back to Django for saving? I have some kind of working example now. I wo

Re: FileSystemStorage content vs PIL Image

2009-01-05 Thread Donn
On Monday, 05 January 2009 09:44:37 Malcolm Tredinnick wrote: > Basically, hang in there and be prepared to experiment a bit and > possibly read some source code. Take notes as you go Heh -- thanks for that! It does lift my spirits somewhat. I have been planning to write a short tut on how to

Re: FileSystemStorage content vs PIL Image

2009-01-04 Thread Donn
On Monday, 05 January 2009 05:15:27 Eric Abrahamsen wrote: > On second thought, you should probably be writing the img back into   > the original "content" variable (which points to a File object), as   > that object might already have relevant attributes set... I guess that's what I was asking:

FileSystemStorage content vs PIL Image

2009-01-04 Thread Donn
Hi, I am stuck on the interface between a PIL Image and a FilesystemStorage 'content' object. I can: img = Image.open(content) But how do I pass 'img' back to Django for saving? My short class is pasted at end. The problem reported stems from the line:

Re: Need help for sorting

2008-11-24 Thread Donn
On Tuesday, 25 November 2008 09:11:36 laspal wrote: > sortby = callreports.meetingdate > company_list = Company.objects.order_by(sortby) Try: sortby = callreports__meetingdate \d --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: access current model id, for custom widget

2008-11-24 Thread Donn
Sorry for being dense, but I don't really follow what you need. Look in the docs for backward relationships between foreign keys. That may help you. Something like: group = Animal.objects.get(animal_group__id=XX) But I don't know where you decide what XX is. \d

Re: generating a list of click-able links to a detail page

2008-11-24 Thread Donn
My guess is something like: {{ quote|escape }} And then have a line in ulrsconf to catch that link and send it to a view which pulls and makes the form. \d --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: access current model id, for custom widget

2008-11-24 Thread Donn
Further info, Looks like from within a widget there's no easy way to find the Form. I'd a thunk there'd be a Parent attribute, but there ain't. So: If you are doing something like this: class SomeWidget( forms.TextInput ): def __init__(self,attrs=None, PASSANYTHINGHERE=whatever ):

Re: access current model id, for custom widget

2008-11-24 Thread Donn
On Monday, 24 November 2008 12:21:55 yves_s wrote: > does anybody have some hints? IIRC - You can do: form.instance (inside your widget, I think...) This assumes you made a form with something like: f = MyForm(instance = someInstance) On the command-line, try using: python manage.py shell Then

Re: Where are you developing your python?

2008-11-22 Thread Donn
FWIW O/S: Kubuntu Edit: gvim, Firefox + Firebug. Graphics: Inkscape, Gimp, ImageMagick. Testing on: Safari (wine), ies4linux, Opera, FF. server: ssh and rsync from a terminal. Oh, and a whole lotta alt-tab F5'ing :) \d --~--~-~--~~~---~--~~ You received this

Re: Custom Select widget choices - how to reuse choices?

2008-11-22 Thread Donn
On Saturday, 22 November 2008 03:52:27 Jeff FW wrote: > choices = Movie._meta.get_field('disk_type').choices Ah, the 'Movie' in there was the missing voodoo. I was stuck on using an instance; and yes, I prefer Movie dot choices 'global' idea. Thanks for the various replies. I have more-or-less

Re: Custom Select widget choices - how to reuse choices?

2008-11-21 Thread Donn
On Friday, 21 November 2008 13:46:35 Daniel Roseman wrote: > There is an alternative, though: instead of overriding the fields > declaratively, you can define a formfield_callback function. This seems interesting. I have searched the docs online for 'formfield_callback' and get no useful

Re: Custom Select widget choices - how to reuse choices?

2008-11-21 Thread Donn
On Friday, 21 November 2008 08:06:32 urukay wrote: > easy way how to solve it is to put definition of your choices out of model > definition: Yeah, that's what I call a 'global', but is there no way to get the choices from the field in the model class? \d

Custom Select widget choices - how to reuse choices?

2008-11-20 Thread Donn
Hello, In my model, I define the choices for a charfield. I make a ModelForm of that model but I want my own widget for that field. How can I pass-through the choices I defined in my model? Some code: class Movie( Relic ): disk_type = models.CharField( 'Type', max_length=8,

Re: setting value of a ModelForm field through Javascript

2008-11-06 Thread Donn
On Thursday, 06 November 2008 14:38:41 limas wrote: > can i set the value of a ModelForm field ,ie a text box, using > javascript. Try JQuery. If your input box has an id "blah" then: $('#blah').val("some new value") would set it for you. jQuery is very cool for this kind of thing. hth, \d

Re: AW: __str__, __unicode__ representation of model fields

2008-11-04 Thread Donn
On Monday, 03 November 2008 10:50:34 Bülent Aldemir wrote: > I want to have a nice representation for the other MyModel() fields. Must I > define for each field a method to accomplish my task? Seems the best way. There's only one 'repr' for any object and if you want specific ones then either

Re: How to detect changes in a model's fields before save() ?

2008-10-11 Thread Donn
Sounds like you should be doing something in the form's clean() function. You can compare what's in the cleaned_data to what's in the model and then move from there. \d --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Filter horizontal question

2008-10-09 Thread Donn
On Thursday, 09 October 2008 18:10:49 SnappyDjangoUser wrote: > I think you are looking for the Pagination class Thanks for the reply -- I know about Pagination but I was asking in a particular context. Perhaps those docs mention the admin side of things. I will have another look. \d

Re: Filter horizontal question

2008-10-09 Thread Donn
Bump... --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For

Re: Where do custom fields go?

2008-10-07 Thread Donn
> I've been playing with custom fields, but I'm not sure where the > python script containing the custom field definition goes? Anywhere you can reach it with an import statement. I put mine alongside models.py etc. and call it forms.py \d

Filter horizontal question

2008-10-07 Thread Donn
Hi, After spending many (many) days on my own CRUD system I am *really* seeing the beauty of the Django Admin system! A few quick questions -- regarding Many to many field and filter_horizontal : 1. Assuming I have thousands of records, call them books, does that interface provide paging? 2.

Re: Questions about HttpResponseRedirect and reverse

2008-10-03 Thread Donn
On Friday, 03 October 2008 16:53:02 Alexis Bellido wrote: > I'm not sure if I understand Malcolm's suggestion, is he talking about > using named URL patterns as documented here? Yes he is. They are quite tricky little devils and cause me much pain, but that's because I am too impatient and have

Re: Custom ModelChoiceField muddle

2008-10-01 Thread Donn
On Wednesday, 01 October 2008 16:13:18 Karen Tracey wrote: > looking-glass icon on > an admin change page where the ForeignKey field has been included in > raw_id_fields. Thanks for the lead! \d --~--~-~--~~~---~--~~ You received this message because you are

Re: Custom ModelChoiceField muddle

2008-10-01 Thread Donn
On Wednesday, 01 October 2008 10:28:13 TiNo wrote: > If you do all that stuff with jquery, why not have jquery hide the original > select (or modify it for that matter), and on select of an author, have > jquery set the selected author as 'selected' in the dropdown box? That way > there is no

Re: Custom fields (a repost)

2008-10-01 Thread Donn
Thanks for your reply! On Wednesday, 01 October 2008 14:51:04 felix wrote: > > a. How to get it to validate. (clean and co.) > when you select the desired whatever it should put it into the form's > hidden field as an id > or text field > so that's what should be cleaned. Yeah, the problem is

Re: Custom ModelChoiceField muddle

2008-10-01 Thread Donn
Bump \d --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED]

Custom fields (a repost)

2008-10-01 Thread Donn
Hi, I asked a little earlier, but this is a busy list and perhaps my post was too obscure. Here is an edited repost in the hopes of catching someone who can help out: I am trying to create a custom field (and/or widget) that 'looks up' a foreign key relation -- i.e. lists the other table and

Re: capture form input even after ValueError exists

2008-10-01 Thread Donn
On Wednesday, 01 October 2008 08:59:00 Merrick wrote: > Also how do I access the form submission if not through > cleaned_data.get? I have found this works, but I can't say in what cases: name = form.data['fullname'] \d --~--~-~--~~~---~--~~ You received this

Re: Custom ModelChoiceField muddle

2008-09-30 Thread Donn
Perhaps if I ask it in a different way: 1. A 'book' has a title (string) and an author (foreign key). 2. I use a ModelForm from the model. 3. I want the 'author' form-control to look like this: Author:__ [click here to choose or add an author] 4. When you click the link it opens a div. 5. The

Custom ModelChoiceField muddle

2008-09-30 Thread Donn
Hi, I have a modelForm that has a foreign key. I want the control to be a link instead of a element. This I have managed. It opens a div which lets me pick a value from a long list. The problem I am having is feeding the chosen value back into the original form. I can't figure out which

Re: Jquery load and views - double GET

2008-09-29 Thread Donn
On Monday, 29 September 2008 22:56:24 Benjamin Wohlwend wrote: > If you use > the URL with a trailing slash, only one request should occur. You sir, are a peach! That sorted it. What a relief; many thanks. \d --~--~-~--~~~---~--~~ You received this message

Jquery load and views - double GET

2008-09-29 Thread Donn
Hi, When I use $('blah').load() to fetch a response into a div it seems to be pulling the data twice. This I see in Firebug where there are 2 GET headers. Here is the JS that is fired on a click of a span tag: $('#pickoradd_author').click( function() {

Re: Form controls for choosing from long lists

2008-09-27 Thread Donn
On Friday, 26 September 2008 23:28:19 bruno desthuilliers wrote: > If you want to > avoid javascript, you'll need to store the current form's state and > whatnots (using session) and redirect to a page displaying possible > choices with (just like with the popup solution) paging, filtering > etc,

Re: Form controls for choosing from long lists

2008-09-27 Thread Donn
On Friday, 26 September 2008 21:32:30 David Durham, Jr. wrote: > You could use something like an auto completing combo box The thing about them is I see a lot of db hits happening. Each letter (or two) pulls another query on the back end. Ouch. ( I think) \d

Re: Form controls for choosing from long lists

2008-09-27 Thread Donn
On Saturday, 27 September 2008 00:07:02 Diego Ucha wrote: > You could use the filter_(horizontal|vertical) solution Ah, that's somewhere to start. Thanks. I am not using admin because I really struggle to get it to work intuitively but will go look at the source for a while. \d

Form controls for choosing from long lists

2008-09-26 Thread Donn
Hi, I thought I'd ask before rolling my own (at tedious pace) widget/whatever: If you have a foreign key field to a table of thousands of, say, author names, the drop-down control becomes a real problem: 1. It's not paged so all the items have to be stuffed into the html. 2. It's damn hard to

Re: Changing field error messages

2008-09-23 Thread Donn
On Tuesday, 23 September 2008 18:16:19 barbara shaurette wrote: > Question 1: What are you using in your template to display the errors? In the render to response I put {'formbugs': form.non_field_errors() } and in the template {{formbugs}}. It really looks like the self.validate_unique() in

Re: Changing field error messages

2008-09-23 Thread Donn
On Tuesday, 23 September 2008 11:42:19 Daniel Roseman wrote: > The __all__ error messages are available via form.non_field_errors(). I sent that along to the template, but it's still oddly silent. Some code: def clean(self): try: self.validate_unique() except

Re: Changing field error messages

2008-09-23 Thread Donn
On Tuesday, 23 September 2008 08:47:10 Daniel Roseman wrote: > meantime maybe you could define a clean() method and catch and re- > raise the ValidationError there. I tried that idea of yours and it has no effect on the error message. Looking at the source I see it's adding an error for a field

Re: Changing field error messages

2008-09-23 Thread Donn
On Tuesday, 23 September 2008 08:47:10 Daniel Roseman wrote: > self.validate_unique() Ah! That's the magic. Thanks. \d --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Changing field error messages

2008-09-22 Thread Donn
bump... --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For

Changing field error messages

2008-09-22 Thread Donn
Hi, I would like to change the 'already exists' message when one adds a record that duplicates a unique one in the table. Nearest I can tell, the fields.error_messages do not offer a way to alter that message. Here's my basic code: class AAForm( ModelForm ): def

Re: Multi table inheritance and admin

2008-09-19 Thread Donn
On Friday, 19 September 2008 19:55:05 Don wrote: > class ResAdmin(admin.ModelAdmin): > inlines = [ BookAdmin, >AlbumAdmin, >] Hi, tried that but it gives both Book AND Album under Res. The idea is to make Books and Albums and then (later) go to Res and add

Multi table inheritance and admin

2008-09-19 Thread Donn
Hi, I have these models: Book, Album (etc.) and they are "grouped" in Res (for Resources) My code is at : http://dpaste.com/79178/ Is there some (simple) way to get admin to work like this: Edit a Res --> the inline shows the Book class OR album class *depending* on what the class of the object

Re: FileSystemStorage preventing large file uploads

2008-09-18 Thread Donn
On Thursday, 18 September 2008 13:17:06 Graham Dumpleton wrote: > If Content-Length was an unreliable indicator of request content then > web applications wouldn't work properly. Okay, in context of the OP's code -- how could I employ content length and get an error message back to the admin

Re: FileSystemStorage preventing large file uploads

2008-09-18 Thread Donn
On Thursday, 18 September 2008 12:13:12 Graham Dumpleton wrote: > If using mod_python, the Apache LimitRequestBody directive doesn't > work entirely properly. I have heard of a "Content-length" variable (from PHP, but it's an http thing) -- how could I use that? request["Content-length"] or

Re: FileSystemStorage preventing large file uploads

2008-09-18 Thread Donn
On Wednesday, 17 September 2008 23:35:46 [EMAIL PROTECTED] wrote: > Better to set the upload filesize limit on your server eg Apache's has > a directive for max file size. Otherwise the file will be uploaded and > checked anyway. I will look into this, but not sure how Apache will respond on the

Re: 500 error - can't tie down the exception

2008-09-17 Thread Donn
I have found that using Firebug (in Firefox) is a real boon. You can open the response header and see the Django error page (open it in a new tab). \d --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Absolute URL vs Relative URL, or ~ ?

2008-09-16 Thread Donn
On Tuesday, 16 September 2008 10:32:54 est wrote: > http://xxx.com/assets/main.css > Now the problem is, how can I massively move all template under a new > sub-directory URL like http://xxx.com/v2/ ? How about 1. making a link under /var/www/assets to /whatever/v2/assets 2. move your assets

Re: Admin and inlines take 2

2008-09-16 Thread Donn
On Tuesday, 16 September 2008 06:35:04 Karen Tracey wrote: > With the new models you still have "should be the same" client duplicated > in two places, which was the thing I was trying to advise you to get rid > of. Karen, Once again I am indebted to you. I had tried your first advice but in my

Re: Admin inlines and foreign keys

2008-09-15 Thread Donn
On Monday, 15 September 2008 19:00:39 Steve Holden wrote: > So, as Karen already said, there really doesn't seem to be any need for > a "pluginsEnabled" module. The foreign key implements a one-to-many > relationship between Website and Plugin: many Plugins can have the same > Website, each

Re: How to render a static html page and keep processing after?

2008-09-15 Thread Donn
> Displaying an html page straight away after the user hits submit > (telling the user that they will be notified by email when their job > has finished running), whilst running the time-intensive task in the > background. Good job for javascript and Aja[xj] Submit the form via something like

Admin and inlines take 2

2008-09-15 Thread Donn
Hi, Thought I'd start a new thread to clear out the cruft. http://dpaste.com/78151/ shows my latest shot at the thing. In that dpaste, the Client->WebsiteInline works as I'd hoped. But the Website->PluginsEnabled does not. I include my reasoning in comments in the dpaste. If anyone can take

Re: Admin inlines and foreign keys

2008-09-15 Thread Donn
Karen, I suspect I have been using foreign keys where I should be using one to many or somesuch. I will retreat and rethink my layout. Thanks, \d --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Admin inlines and foreign keys

2008-09-15 Thread Donn
lor_url = "006792"; google_color_text = "00"; //--> Admin inlines and foreign keys Donn Re: Admin inlines and foreign keys Daniel Roseman Re: Admin inlines and foreign keys Donn Re: Admin inlines and foreign keys Karen Tracey Re: Admin inlines and foreig

Re: Admin inlines and foreign keys

2008-09-14 Thread Donn
> That should happen automatically - you shouldn't see the foreign key > to the parent model. Can you post your model and admin code on > dpaste.com so we can work out what's wrong? Thanks, I'm sure it's something dumb I'm doing. Here: http://dpaste.com/78053/ \d

FileSystemStorage preventing large file uploads

2008-09-14 Thread Donn
Hi, Some code is below. I am in my FileSystemStorage class and I want to prevent users from uploading images over 100K. There are 2 questions here: 1. Is my use of len(content) sensible? I don't have a file yet, only a memory object, so I can't use stat. 2. How would I raise an error so that

Admin inlines and foreign keys

2008-09-14 Thread Donn
Hi, I have been looking, but can't find. I have a Client model with a Website inline (related by FK). it's open in a change screen in the admin. The inline below has a field that refers to the parent Client. That field is a drop-down showing many Clients. Is there any way to tell the inline to

Re: Using models from another project/site

2008-09-13 Thread Donn
You are some kind of wonderful. Thanks for that, it has really helped me! \d --~--~-~--~~~---~--~~ 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

Re: Using models from another project/site

2008-09-13 Thread Donn
Extra info: I have many Projects that equate to 'websites'. Each has it's own database in Mysql. I want one Project to be our Admin that let's us set some stuff that the other websites (projects) read and act upon. (Hence OP needing to access a model from another Project) If I setup each

Using models from another project/site

2008-09-13 Thread Donn
I am getting confused by terms, but this is the basic need: 1. In a base dir I have site1 and site2 2. I am in site2 (views) and I want to use the models defined in site1 3. from site1.models import Blah -- seems to work without error. 4. I get an error on stuff like this: p = Blah.objects.all()

Re: Can't assign None to instance of model (SVN 8463)

2008-09-02 Thread Donn
> This error message makes it appear dimobj is a single-element sequence > containing None You're a genius! I totally missed that. I had a hanging comma and hell followed :) Thx, \d --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Can't assign None to instance of model (SVN 8463)

2008-09-02 Thread Donn
Hi, My model (Item) has this line: dimensions = models.ForeignKey(Dimension, null=True, blank=True ) Later, I want to make an Item sans dimensions like so: itemobj = Item( blah dimensions = dimobj, ) But - dimobj is None (as it should be). I get this error: Cannot assign

Re: Using Django with pache

2008-08-31 Thread Donn
On Sunday, 31 August 2008 16:33:32 Weber Sites wrote: > The tutorial suggested to keep "mysite" out of the webroot so where do > i point apache to? Go to the Django site and read the docs about apache and mod_python. It's not that hard really. \d

Re: Browser timeout on long processes - A partial solution

2008-08-21 Thread Donn
I spent some time fiddling and have a basic jquery/ajax solution to this. I still don't know how to 'backround' a process, but this will allow a progress report to be pulled from Django while another view function is busy. http://www.djangosnippets.org/snippets/994/ hth, \d

Re: Browser timeout on long processes

2008-08-20 Thread Donn
On Wednesday, 20 August 2008 15:27:24 Julien Phalip wrote: > You could use the cache by setting a key that the other view can look > up. Right, thanks-- I'll go look it up. \d --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Browser timeout on long processes

2008-08-20 Thread Donn
> You could use Ajax for this. The client could periodically (say, every > second) send a request to the server asking if the calculation is > over. If the view is running a loop - how would you provide a variable to another view (that Ajax is calling) about the situation? Let's say a

Django Ajax and jQuery - a short example.

2008-08-19 Thread Donn
Hi, Just spent many hours getting a small form submit to work [I'm thick :)] with Django and jQuery (with the form plugin) and thought I'd share it here. It's on Django snippets: http://www.djangosnippets.org/snippets/992/ HTH \d --~--~-~--~~~---~--~~ You

Re: Admin mass change screen

2008-08-18 Thread Donn
On Monday, 18 August 2008 09:39:12 Matthias Kestenholz wrote: > But maybe I've got something for you if you want to reorder > items using a drag-n-drop interface. Thanks for that. I will go and look when I have a chance. \d --~--~-~--~~~---~--~~ You received this

Re: Admin mass change screen

2008-08-18 Thread Donn
On Sunday, 17 August 2008 20:38:06 varikin wrote: > I am planning on using jquery sort to reorder them > by dragging them on the change list. Cool, if you get that right, I'd like to hear about it! \d --~--~-~--~~~---~--~~ You received this message because you