Re: Handle on request object from custom tag

2008-05-09 Thread Greg Fuller
That did it -- thanks. On May 9, 10:41 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Fri, May 9, 2008 at 10:11 PM, Greg Fuller <[EMAIL PROTECTED]> wrote: > > How do I get a handle on the request object from within a custom > > template tag? > > By making the request available to the

Re: child edit causes duplication with model inheritance

2008-05-09 Thread Karen Tracey
On Sat, May 10, 2008 at 12:28 AM, Karen Tracey <[EMAIL PROTECTED]> wrote: > On Fri, May 9, 2008 at 8:43 AM, Erwin Elling <[EMAIL PROTECTED]> > wrote: > >> >> On May 5, 1:47 pm, bobhaugen <[EMAIL PROTECTED]> wrote: >> > Thanks. If I read that last one correctly, queryset-factor was merged >> >

Re: child edit causes duplication with model inheritance

2008-05-09 Thread Karen Tracey
On Fri, May 9, 2008 at 8:43 AM, Erwin Elling <[EMAIL PROTECTED]> wrote: > > On May 5, 1:47 pm, bobhaugen <[EMAIL PROTECTED]> wrote: > > Thanks. If I read that last one correctly, queryset-factor was merged > > into trunk on 4-26, andnewforms-adminmerged trunk on 4-28 (and > > appears to do so

Re: Handle on request object from custom tag

2008-05-09 Thread James Bennett
On Fri, May 9, 2008 at 10:11 PM, Greg Fuller <[EMAIL PROTECTED]> wrote: > How do I get a handle on the request object from within a custom > template tag? By making the request available to the template as a context variable, then accessing it the same as any other context variable. --

Handle on request object from custom tag

2008-05-09 Thread Greg Fuller
I searched for solutions/examples with no luck, but this can't be that hard. How do I get a handle on the request object from within a custom template tag? Thanks --- Greg F --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Building filter strings dynamically

2008-05-09 Thread Greg Fuller
Thanks to both. Got it working. On May 9, 9:17 pm, Aaron Fay <[EMAIL PROTECTED]> wrote: > Similarly, this will work also:field = 'sections' qry = > qry.filter(**{field+'__name__exact': 'shooting'})Cheers, > Aaron > John Lenton wrote:On Fri, May 9, 2008 at 6:19 PM, Greg Fuller<[EMAIL >

Re: File caching and pickling issue

2008-05-09 Thread Julien
Hi all, I keep getting lots errors related to caching when pages are crawled by bots like GoogleBot, Yahoo slurp, and Co (see tracebacks and code above). It works perfectly well when browsed by real users and real browsers. Has anyone had an issue with crawlers and caching, or would have some

Re: Building filter strings dynamically

2008-05-09 Thread Aaron Fay
Similarly, this will work also: field = 'sections' qry = qry.filter(**{field+'__name__exact': 'shooting'}) Cheers, Aaron John Lenton wrote: On Fri, May 9, 2008 at 6:19 PM, Greg Fuller <[EMAIL PROTECTED]> wrote: Hello, I'm trying to build filter strings dynamically. The

Re: Group by for querysets

2008-05-09 Thread Eric Abrahamsen
> Awesome! Thanks much, Eric! My pleasure... Just noticed there's a typo in the second part, should be columns.setdefault..., not blocks. Hooray for native group_by support in the ORM! I didn't realize that was already in there. --~--~-~--~~~---~--~~ You received

Re: auto admin for production

2008-05-09 Thread Jeff Anderson
pihentagy wrote: Hi all! I come to here from a little symfony background (a framework, which try to borrow good things from django), and would like to have an overview how django stacks up. I would like to ask, if the admin module can be used on a production server by registered users. The

auto admin for production

2008-05-09 Thread pihentagy
Hi all! I come to here from a little symfony background (a framework, which try to borrow good things from django), and would like to have an overview how django stacks up. I would like to ask, if the admin module can be used on a production server by registered users. What problems can occur?

Re: Group by for querysets

2008-05-09 Thread James Bennett
On Fri, May 9, 2008 at 12:47 PM, Chris <[EMAIL PROTECTED]> wrote: > Does django carry something similar to what I am looking for? If not, > would a group_by feature be something worth adding to django? If you're using a recent Django trunk checkout (after the queryset-refactor merge), there is

localisation issue

2008-05-09 Thread ginta
Hi, after moving server and upgrading the application this strange error happens to me. Strange because it is inside Django - means nothing to do with the app - and there wasn't changed anything with Django. The only thing changed is that 'django.contrib.auth.backends.ModelBackend', has been

Re: Building filter strings dynamically

2008-05-09 Thread John Lenton
On Fri, May 9, 2008 at 6:19 PM, Greg Fuller <[EMAIL PROTECTED]> wrote: > > Hello, > > I'm trying to build filter strings dynamically. > > The normal way works: >qry = qry.filter(sections__name__exact='printing') > > This does not work: >filter_str = "sections__name__exact='shooting'" >

Building filter strings dynamically

2008-05-09 Thread Greg Fuller
Hello, I'm trying to build filter strings dynamically. The normal way works: qry = qry.filter(sections__name__exact='printing') This does not work: filter_str = "sections__name__exact='shooting'" qry = qry.filter(filter_str) . The error is "too many values to unpack" at

Re: Group by for querysets

2008-05-09 Thread gmacgregor
On May 9, 4:57 pm, Eric Abrahamsen <[EMAIL PROTECTED]> wrote: > (Don't forget to reply to the list...) Apologies... didn't realize I hit "Reply to author" > The documentation for the groupby function is notoriously obscure, but > it's actually simple to use. It generates pairs where the first

Re: Need some help, file corrupt

2008-05-09 Thread Rajesh Dhawan
On May 8, 11:14 pm, meppum <[EMAIL PROTECTED]> wrote: > Hey guys, I need some help. I realized today that one of my source > files is corrupt. When I open it in NotePad++ all I get is "null" > characters. I've tried everything. Even software recovery programs to > see if I have a non-corrupt

Re: importing problem

2008-05-09 Thread Rajesh Dhawan
On May 9, 1:30 pm, Dennis Schmidt <[EMAIL PROTECTED]> wrote: > Hello, > > I've got an importing problem with my django projects. I'm trying to > build some kind of a framework which basically consists of 4 bigger > modules. So I thought this django modularity perfectly fits my needs. > I

Re: Group by for querysets

2008-05-09 Thread Eric Abrahamsen
> This sounds like it might do what I need... Care to share a code > example? > > > Greg (Don't forget to reply to the list...) The documentation for the groupby function is notoriously obscure, but it's actually simple to use. It generates pairs where the first item is the common key for

Re: GeoDjangoFriendly?

2008-05-09 Thread Alex Ezell
On Thu, May 8, 2008 at 7:38 PM, Tyler Erickson <[EMAIL PROTECTED]> wrote: > I would be interested in hearing if your remaining issues with the > GeoDjango install get resolved. Tyler, I am still working with the folks there and they are working on some rock solid instructions for the whole

Re: A twist on cross importing models

2008-05-09 Thread [EMAIL PROTECTED]
If you have the ContentTypes app installed, you can do the following to avoid circular imports (assume you need the model called "Author"): # at top with other imports from django.contrib.contenttypes.models import ContentType #in function where model is needed

Re: Forward model references

2008-05-09 Thread Chris Farley
Is it ever. I don't know why I did not see that. 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 unsubscribe from

Re: Problem with Postgres 8.2

2008-05-09 Thread Adi Jörg Sieker
Hi Marcin, the syndb command doesn't change your tables it only creates them, so any changes you make to the models after the first sync will have to be created manually via pgadmin or whatever is your preferred tool. Alternatively if you are still in development and don't need the data

Re: Pagination: how to find out on what page a give object will end up

2008-05-09 Thread Juanjo Conti
VidJa Hunter escribió: > > paginator.is_on_page(object) would return page 6 if object is element 31 of > the given queryset. > I am leaving right now, but, what about something like this? for page in paginator.page_range: if object in paginator.page(page).object_list:

Re: Group by for querysets

2008-05-09 Thread Eric Abrahamsen
In the meantime, you can use the groupby template tag for simple grouping operations in the template, or else I've had success using the itertools.groupby function in the view, and then passing your queryset as a dictionary or list of tuples to the template. It will be nice to have native

Re: file upload - race condition?

2008-05-09 Thread Alex Morega
On May 9, 2008, at 21:17 , Marty Alchin wrote: > > On Fri, May 9, 2008 at 2:00 PM, Alex Morega <[EMAIL PROTECTED]> wrote: >> There seems to be a race condition in Django's model code for file >> uploads. Here's the relevant code snippet (django/db/models/base.py >> line 458 in the latest SVN

Re: Group by for querysets

2008-05-09 Thread [EMAIL PROTECTED]
Their is a thread here regarding the GSOC student's work: http://groups.google.com/group/django-developers/browse_thread/thread/f83457fc3cdb235d On May 9, 1:41 pm, gmacgregor <[EMAIL PROTECTED]> wrote: > On May 9, 2:37 pm, gmacgregor <[EMAIL PROTECTED]> wrote: > > > Something like it is being

Re: Group by for querysets

2008-05-09 Thread gmacgregor
On May 9, 2:37 pm, gmacgregor <[EMAIL PROTECTED]> wrote: > Something like it is being "considered" but nothing for > sure:http://code.djangoproject.com/ticket/3566 Whoops, I lied: check out the (currently) last comment made by Russ M on the ticket page: "For the benefit of those that haven't

Re: Group by for querysets

2008-05-09 Thread gmacgregor
On May 9, 1:47 pm, Chris <[EMAIL PROTECTED]> wrote: > Is there a group_by method when getting querysets? Nope... nothing of the sort. You'll have to write raw SQL for that. I'm struggling with the same thing right now. > Check out the following example. > ... > events_by_group = >

Re: Forward model references

2008-05-09 Thread Matthias Kestenholz
Hi, On Fri, 2008-05-09 at 10:47 -0700, Chris Farley wrote: > I'm trying to model our customers in a Django application, but I'm > encountering a problem: > > Customers can have many CustAddresses > One CustAddress is the Customer's primary billing address > One CustAddress is the Customer's

Re: How to modify contrib.auth models etc

2008-05-09 Thread Mike H
http://www.b-list.org/weblog/2006/jun/06/django-tips-extending-user-model/ You can create a profile model that holds all the information you need, then in your settings specify APP_PROFILE_MODULE which will define a OneToOne relationship from the auth user to your profile model. It will

Re: file upload - race condition?

2008-05-09 Thread Marty Alchin
On Fri, May 9, 2008 at 2:00 PM, Alex Morega <[EMAIL PROTECTED]> wrote: > There seems to be a race condition in Django's model code for file > uploads. Here's the relevant code snippet (django/db/models/base.py > line 458 in the latest SVN version - #7520): > > while

file upload - race condition?

2008-05-09 Thread Alex Morega
Hi, There seems to be a race condition in Django's model code for file uploads. Here's the relevant code snippet (django/db/models/base.py line 458 in the latest SVN version - #7520): while os.path.exists(os.path.join(settings.MEDIA_ROOT, filename)): try:

Re: Django with Ajax

2008-05-09 Thread Monica Leko
On 5/9/08, Richard Dahl <[EMAIL PROTECTED]> wrote: > > I am not sure what the dom1.toxml() does, are you seeing: > > > > > > left="Necklace"/> > Yes, I am seeing this text. Darn. :( --~--~-~--~~~---~--~~ You received this message because

Forward model references

2008-05-09 Thread Chris Farley
I'm trying to model our customers in a Django application, but I'm encountering a problem: Customers can have many CustAddresses One CustAddress is the Customer's primary billing address One CustAddress is the Customer's primary shipping address It's a classic 'chicken and egg' problem.

Group by for querysets

2008-05-09 Thread Chris
Is there a group_by method when getting querysets? Check out the following example. class SportsEvent(models.Model): """Sports""" name = models.CharField(max_length=255) sport_type = models.ForeignKey(Sport) event_date = models.DateTimeField() class Sport(models.Modle):

CPOSC 2008 is looking for Django presentations

2008-05-09 Thread John
Hi, I'm with the Central PA Linux User Group (CPLUG) and a few of us are organizing a small, open source conference to be held this fall in Harrisburg, PA (USA). It would be cool to have a Django presentation (or two), so I wanted to extend an invite to those on the django-discuss list. If you

Re: Django with Ajax

2008-05-09 Thread Richard Dahl
I am not sure what the dom1.toxml() does, are you seeing: in firebug, to be sure that it is correctly returning the xml? If so then the problem is most likely within the javascript and you may have better luck at the googlemaps api group. -richard On 5/9/08, Monica Leko

importing problem

2008-05-09 Thread Dennis Schmidt
Hello, I've got an importing problem with my django projects. I'm trying to build some kind of a framework which basically consists of 4 bigger modules. So I thought this django modularity perfectly fits my needs. I created 4 projects with different apps in them. Now some of the models from one

Re: one-to-many design question

2008-05-09 Thread Scott Moonen
Slight correction. In your first example: class Chapter(models.Model): >book = models.ForeignKey(Chapter) > The parameter to ForeignKey should be book: class Chapter(models.Model): book = models.ForeignKey(Book) As mentioned earlier, you can locate a chapter's book as

Re: Django with Ajax

2008-05-09 Thread Monica Leko
On 5/9/08, Richard Dahl <[EMAIL PROTECTED]> wrote: > > I am not sure what javascript library you are using based on the code Google maps. GXmlHttp is just like XmlHttpRequest Now I have this in my view: return HttpResponse(dom1.toxml(), mimetype="text/xml") And still my var xmlDoc =

Re: one-to-many design question

2008-05-09 Thread Mike Chambers
Thanks for confirming. Book.chapter_set.all() gets all of the chapters for the book. Thanks! mike [EMAIL PROTECTED] wrote: > The first way is the correct way, to get all the chapters for a given > book you would do book_obj.chapter_set.all() , you can set what this > attribute is named by

Re: Problem with Postgres 8.2

2008-05-09 Thread Marcin Gorczyński
The manage.py sql app shows CREATE TABLE "groups_groupdata" ( "id" serial NOT NULL PRIMARY KEY, "group_id" integer NOT NULL REFERENCES "auth_group" ("id") DEFERRABLE INITIALLY DEFERRED, "division_id" integer NOT NULL REFERENCES "groups_division" ("id") DEFERRABLE INITIALLY DEFERRED,

Re: Problem with Postgres 8.2

2008-05-09 Thread Marcin Gorczyński
On May 9, 6:34 pm, Marc Fargas <[EMAIL PROTECTED]> wrote: > El vie, 09-05-2008 a las 09:30 -0700, Marcin Gorczyński escribió: > > > Hello > > > I have a problem with syncing with my PostgresDB - I type manage.py > > syncdb, but it doesn`t create all the columns like in this model: > > It

Re: IntegrityError on newforms-admin

2008-05-09 Thread Nuno Mariz
Thanks Brian, One more question, there is another way to write a custom validator without override the field type? Nuno On May 9, 5:30 pm, Brian Rosner <[EMAIL PROTECTED]> wrote: > On May 9, 4:31 am, Nuno Mariz <[EMAIL PROTECTED]> wrote: > > > I'm using newforms-admin and I've got a "duplicate

Re: Problem with Postgres 8.2

2008-05-09 Thread Marc Fargas
El vie, 09-05-2008 a las 09:30 -0700, Marcin Gorczyński escribió: > Hello > > I have a problem with syncing with my PostgresDB - I type manage.py > syncdb, but it doesn`t create all the columns like in this model: > It creates only 3 columns - id, group_id, name Did you add columns after

Who has the better support for Sql Server?

2008-05-09 Thread mamcxyz
I submit this patch some time ago: http://code.djangoproject.com/ticket/5062 (latter turn to http://code.djangoproject.com/ticket/5246) However, after get invalidad and the decision to support it elsewhere, I wonder which have the better support of the external sql backend to help to improve

Re: IntegrityError on newforms-admin

2008-05-09 Thread Brian Rosner
On May 9, 4:31 am, Nuno Mariz <[EMAIL PROTECTED]> wrote: > I'm using newforms-admin and I've got a "duplicate key violates unique > constraint" when I'm added new record(with the same value on field > that already exists in the db) in admin interface. > I've an "unique=True" in the field,

Problem with Postgres 8.2

2008-05-09 Thread Marcin Gorczyński
Hello I have a problem with syncing with my PostgresDB - I type manage.py syncdb, but it doesn`t create all the columns like in this model: class GroupData(models.Model): group = models.ForeignKey(Group) division = models.ForeignKey(Division) name

Re: one-to-many design question

2008-05-09 Thread [EMAIL PROTECTED]
The first way is the correct way, to get all the chapters for a given book you would do book_obj.chapter_set.all() , you can set what this attribute is named by doing ForeignKey(Chapter, related_name='this_thing'). On May 9, 11:08 am, Mike Chambers <[EMAIL PROTECTED]> wrote: > I am working on an

one-to-many design question

2008-05-09 Thread Mike Chambers
I am working on an app to host some books online. I cant figure out the best way to represent a one to many relationship. Basically, a Book has multiple Chapters, but a Chapter can only be in one book. Looking at the docs, this seems to be the way to represent this: -- class

Re: Job opening: Malaria Atlas Project, Oxford University

2008-05-09 Thread John Handelaar
On Fri, May 9, 2008 at 4:50 PM, anand <[EMAIL PROTECTED]> wrote: > > Further particulars can be downloaded from http://www.zoo.ox.ac.uk/jobs/ That's not true. jh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Job opening: Malaria Atlas Project, Oxford University

2008-05-09 Thread anand
DEPARTMENT OF ZOOLOGY Web developer Grade 7: Salary range:£26,666 - £32,796 Three year post A web developer is required to join the Malaria Atlas Project (MAP, http://www.map.ox.ac.uk). The job will be to lead in the improvement of the on-line presence and thus public engagement activities of

Debug tag not showing context from custom tags

2008-05-09 Thread Greg Fuller
Hi, I would like to see the context from a custom tag using the {% debug %} tag, but it's not displaying. I'm rendering a template with the following view code: return render_to_response("index.html", { "who": {'name': 'Greg', 'city':'Smallville'} In the template, I have a

Re: "None of the above" in a form?

2008-05-09 Thread Scott SA
On 5/9/08, Kirk Strauser ([EMAIL PROTECTED]) wrote: >On Tuesday 06 May 2008, Scott SA wrote: > >> These are M2M relationship records handled transparently for you. In >> reality, they are in a table in between your two 'Role' tables. If you >> want to delete them, then you can select and delete

Re: Why are my parameters gettings mangled?

2008-05-09 Thread John M
Randy, thanks for the follow-up, and you're on the right track, turns out it's an encoding 'problem' by default in django. I just have to change the encoding language and then ask it for a different code. I got it working for what I need. John On May 8, 9:16 pm, Peter Rowell <[EMAIL

Re: Django with Ajax

2008-05-09 Thread Richard Dahl
I am not sure what javascript library you are using based on the code snippet, but you seem to be looking for a javascript object to be returned that contains XML. What you are returning is simply the text 'hello world' as a plain vanilla http response. You need to return the type of object

RE: Multiplechoicefield 1 value

2008-05-09 Thread Ben Eliott
Thanks Matthias, your crystal ball worked just fine, getlist clocked it. -Original Message- From: django-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matthias Kestenholz Sent: 09 May 2008 15:36 To: django-users@googlegroups.com Subject: Re: Multiplechoicefield 1 value

Re: No request.FILES, but file is still uploaded?

2008-05-09 Thread Beals
> Does your model have a FileField? Thanks, Karen. Yes, my model has a FileField. The doc never says explicitly that it the save will happen, which was the source of my confusion. It appears that it does when you have a FileField (I dove into the newforms code a bit and am partially convinced

Re: Multiplechoicefield 1 value

2008-05-09 Thread Matthias Kestenholz
On Fri, 2008-05-09 at 15:26 +0100, Ben Eliott wrote: > Hi, Can anyone please advise on why a multiplechoicefield might be > returning only 1 value (the last value)? Or maybe i'm not accessing it > correctly...? > Many Thanks! > Ben How are you accessing the value? Are you using

Multiplechoicefield 1 value

2008-05-09 Thread Ben Eliott
Hi, Can anyone please advise on why a multiplechoicefield might be returning only 1 value (the last value)? Or maybe i'm not accessing it correctly...? Many Thanks! Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: django_sessions table getting out of hand

2008-05-09 Thread Scott Moonen
See http://www.djangoproject.com/documentation/sessions/#clearing-the-session-table -- Scott On Fri, May 9, 2008 at 10:24 AM, Matt Davies <[EMAIL PROTECTED]> wrote: > I got you Scott > > cron job it is > > I seem to remember Adrian putting a nippet up somewhere with the code > in(laxz I

Django with Ajax

2008-05-09 Thread Monica Leko
Hi I am trying to use some simple AJAX call, and can't get right result. I am using this Javascript function: function filterMarkers(){ var request = GXmlHttp.create(); request.open('GET', '/lbs/' + "?q=placeholder, true); request.onreadystatechange = function() {

Re: django_sessions table getting out of hand

2008-05-09 Thread Matt Davies
I got you Scott cron job it is I seem to remember Adrian putting a nippet up somewhere with the code in(laxz I know), anyone remember where it was? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: How to modify contrib.auth models etc

2008-05-09 Thread Scott Moonen
Ok. Sounds like you can probably get by with creating your own ancillary GroupData model (for example) and associating it one-to-one with the Group model. I've done this in the past with User, creating my own UserData model to hold some additional attributes, and it worked well for me. --

Re: How to modify contrib.auth models etc

2008-05-09 Thread Marcin Gorczyński
Well basicly I want the groups to have more data associeted with them - like a image filename, extracting the numer of users, one-to-one relations with a model in a news app and forum app, adding models like category like this category->groups, group and category moderators. Probarly I can get

Good to join your group – A thought : work hard, pay your taxes and smile

2008-05-09 Thread Riter
Hi All. This is my first post here – just want to say Hi – Will make other posts soon. Peace Riter Did you know that your Govt. can make 100% profits through Taxes in 6 hours? – read the story yourself.. http://talefunnytail.blogspot.com/ after that laugh, think, growl or just pay up, but

Re: How to modify contrib.auth models etc

2008-05-09 Thread Scott Moonen
Hi Marcin. Can you give some more detail on what specific additional functionality you need? It is possible that you can augment the existing models by creating your own ancillary "UserData" and "GroupData" models, each with a OneToOneField that relates directly to the auth.models.User and

Re: "None of the above" in a form?

2008-05-09 Thread Kirk Strauser
On Tuesday 06 May 2008, Scott SA wrote: > These are M2M relationship records handled transparently for you. In > reality, they are in a table in between your two 'Role' tables. If you > want to delete them, then you can select and delete them programatically > (i.e. from a button on your form) I

How to modify contrib.auth models etc

2008-05-09 Thread Marcin Gorczyński
Hello I have a problem to tackle - in my site I want to have groups that have assigned forums, news etc. The Django contrib.auth just aren`t enough (also I need a more custom user model). Anyone can please tell me a good way to come around those limits? I thought about coding my own user, group

How to Create a TextField and read data from it

2008-05-09 Thread João Rodrigues
Hello all. I'm new to Django, and to web development, so feel free to point me to the manual if you need to :) I am having a small problem developing a web interface for an application (100% written in Python) I built. At first, I tried to use Ruby on Rails, as advised by a friend, but since I

Re: django_sessions table getting out of hand

2008-05-09 Thread Scott Moonen
Hi Matt. The reason folks don't prefer to do it within the application code is because it introduces a delay into rendering pages while the DELETE is executed -- even in cases where there is nothing to delete. By running the DELETE in a cron job you improve the performance of your page loads.

Re: django_sessions table getting out of hand

2008-05-09 Thread Matt Davies
Thanks for getting back to me Arien If that's what people are doing to sort it out then that's fine by me, I can write a cron job to run a script and everyone is happy. If anyone has a more elegant solution I'm all ears. I suppose I could overwrite sections of the middleware so that whenever a

Re: django_sessions table getting out of hand

2008-05-09 Thread Matt Davies
Just a bit more information about how we're using the contrib.sessions The only mention of it I have in my site is in the settings file, we don't do anything else with it MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', ) Django source version is Schedule: normal

Re: child edit causes duplication with model inheritance

2008-05-09 Thread Erwin Elling
On May 5, 1:47 pm, bobhaugen <[EMAIL PROTECTED]> wrote: > Thanks. If I read that last one correctly, queryset-factor was merged > into trunk on 4-26, andnewforms-adminmerged trunk on 4-28 (and > appears to do so regularly), so the answer to my question is "yes". That's the way I read it as

Re: django_sessions table getting out of hand

2008-05-09 Thread Arien
On Fri, May 9, 2008 at 7:28 AM, Matt Davies <[EMAIL PROTECTED]> wrote: > What's the best method of keeping the django_sessions table from growing so > large? Well, there's django/bin/daily_cleanup.py ;-) Arien --~--~-~--~~~---~--~~ You received this message

django_sessions table getting out of hand

2008-05-09 Thread Matt Davies
Hello everyone I know one of the uber genii who use this list will have a very easy solution to this one. What's the best method of keeping the django_sessions table from growing so large? I've just ran a delete from django_sessions where expire_date <= $yesterday to clear it out a little,

Serializing custom fields

2008-05-09 Thread Luper Rouch
I have a db.models.Field subclass that needs a special representation in the database. This is achieved by implementing get_db_prep_save() and using SubfieldBase as the metaclass, and works fine. The problem comes when serializing, the custom field is serialized using the python's form string

Pagination: how to find out on what page a give object will end up

2008-05-09 Thread VidJa Hunter
This is my 'problem', I have a paginator object created like this: (example with 40 objects, but in practice we are talking about several hundred objects) paginator = Paginator(queryset,5) paginator.page_range [1, 2, 3, 4, 5, 6, 7, 8] Some objects on page 1 link to objects on page 6. When a

Re: Weird session problem

2008-05-09 Thread [EMAIL PROTECTED]
Look at the thing I posted. The sessionid= tag is there but it seems to confuse django when there's more than just that in that header. I don't know exactly what causes it though. On May 7, 4:28 pm, finnam <[EMAIL PROTECTED]> wrote: > Isn't it just a matter of session id cookie name? You

IntegrityError on newforms-admin

2008-05-09 Thread Nuno Mariz
I'm using newforms-admin and I've got a "duplicate key violates unique constraint" when I'm added new record(with the same value on field that already exists in the db) in admin interface. I've an "unique=True" in the field, shouldn't admin interface shows a error message in the form and not

Re: No request.FILES, but file is still uploaded?

2008-05-09 Thread [EMAIL PROTECTED]
I don't think this matters here, but you're overriding the 'file' builtin. On May 8, 7:03 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Thu, May 8, 2008 at 3:51 PM, Beals <[EMAIL PROTECTED]> wrote: > > Correction: request.FILES does exist -- it just wasn't getting printed > > out with

Re: very odd MySQL 'ascii' code error in MySQLdb/connections.py

2008-05-09 Thread oliver
Hi Julien, that looks interesting, last time I looked at the django email it was very basic and I needed to send HTML email with attachments, so that snippet seemed the best way. By the looks you can now do that via django as well! thanks again. On May 7, 10:48 pm, Julien <[EMAIL PROTECTED]>

Re: mod_python vs. mod_wsgi

2008-05-09 Thread Graham Dumpleton
> > Whether you use Apache worker MPM or not, when using mod_wsgi you can > > also use it in daemon mode. This is similar to fastcgi in the sense > > that your web application is run in separate process(es), but mod_wsgi > > will handle all the management of those processes, starting them up > >

Re: mod_python vs. mod_wsgi

2008-05-09 Thread Graham Dumpleton
On May 9, 4:09 pm, Pigletto <[EMAIL PROTECTED]> wrote: > > If you mean compared to Apache prefork and mod_python then answer is > > yes. > > Yes > > > Even without using mod_wsgi though, one can do better than prefork > > with mod_python by using Apache worker MPM instead. Because Apache > >

Re: Add RDF store as database

2008-05-09 Thread Roland Hedberg
What I don't like about this is that I have to make an object based database look like a SQL-database which is then made to look like a object based database. Makes my head spinn :-) So, can't I attack this problem at another level where it's all about objects. -- Roland Ben Ford wrote: >

Re: mod_python vs. mod_wsgi

2008-05-09 Thread Pigletto
> If you mean compared to Apache prefork and mod_python then answer is > yes. Yes > Even without using mod_wsgi though, one can do better than prefork > with mod_python by using Apache worker MPM instead. Because Apache > worker MPM processes are multithreaded you don't need as many to be >