Re: Apache & mod_wsgi are configured correctly. Need Django to recognize my django.wsgi file.

2010-12-11 Thread Mike Dewhirst
he directory in which that script lives - in other words you create a hole in the entire filesystem lockdown. To gain more info on wsgi scripts try ... http://code.google.com/p/modwsgi/wiki/DebuggingTechniques Good luck Mike thanks for the reply back, I do appreciate it... j. On De

Re: Apache & mod_wsgi are configured correctly. Need Django to recognize my django.wsgi file.

2010-12-11 Thread Mike Dewhirst
e way. The loading middleware error seems straightforward. My guess is the module containing the middleware cannot be found. If you installed Satchmo correctly it will have added itself properly to the Python path and that error wouldn't occur. If you are learning and still need to dev

apache serving static files

2010-01-07 Thread Mike Dewhirst
works fine based on the above MEDIA_URL and MEDIA_ROOT. Any hints, pointers or docco links gratefully followed Thanks Mike -- 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.c

Re: strange behaviour of webfaction

2010-01-07 Thread Mike Ramirez
s process are killed), restarting apache or waiting on the cron script will 'fix' it. Though, your client should be getting emails from web factions script stating the memory usage is too high. Check with them for such emails (or the email the account is registered with at webfa

Re: apache serving static files

2010-01-07 Thread Mike Dewhirst
tatic/js/$1 This is now finding tiny_mce according to FireBug BUT it isn't displaying the usual editing controls so there must be something else amiss. Back to the drawing board I guess Thanks Mike On Thu, Jan 7, 2010 at 12:48 PM, Mike Dewhirstwrote: I want to serve development

using relationship fields in ModelAdmin

2010-01-11 Thread Mike Thon
nship - i.e. I want to show fields from the object referenced by the OneToOne relationship in the admin interface. Is there any way to do this? Thanks Mike -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send ema

Re: Top 10 tips to a new Django developer. correct approach?

2010-01-15 Thread Mike Ramirez
rch the current directory (in this case where views.py lives) for the module name, models not being a global name, makes this safe. I think what you're really unclear on is how the PythonPath setting works, which case you should read up on it in the Python Docs[1], Mike [1] http://docs

Re: Save, Signals and Models

2010-01-15 Thread Mike Ramirez
Add in an if statement, one that while cycling through the only_me=True list, ignores the current model you're saving. def save(self): if self.only_me: only_me_true = MyModel.objects.filter(only_me=True) for obj in only_me_true:

Re: Save, Signals and Models

2010-01-15 Thread Mike Ramirez
On Friday 15 January 2010 17:08:06 Mike Ramirez wrote: > Add in an if statement, one that while cycling through the only_me=True > list, ignores the current model you're saving. > > def save(self): > if self.only_me: > only_me_true = MyModel

Re: Save, Signals and Models

2010-01-15 Thread Mike Ramirez
in a function you call in the model admin after saving. Ideally I would put it in a custom singal and send that after the save, where ever I needed it. Mike -- Do people know you have freckles everywhere? signature.asc Description: This is a digitally signed message part.

Re: django production server upgrade now not serving images, scripts or css...

2010-01-16 Thread Mike Ramirez
On Saturday 16 January 2010 01:32:21 Sam Walters wrote: > Hi, > The production server running centos was just upgraded and in apache > 1.3 the old httpd.conf file was moved to httpd.conf.bak. > I had to move my mod_wsgi + virtualhost entry over to the new > httpd.conf and recompiled mod_wsgi. > >

Re: Announce: django-ldap-groups

2010-01-19 Thread Mike Dewhirst
ented this against Novell eDirectory and it works brilliantly. Highly recommended :) Thank you Mike Currently the app has been tested and works against Microsoft Active Directory and Novell eDirectory. Other LDAP servers will probably work using the eDirectory backend, but none have been test

Re: leading zeros

2010-01-22 Thread Mike Dewhirst
On 23/01/2010 11:12am, Patrick wrote: Hello All, I'm sorry for being a newbe and posting this site, but I'm desperate. I inherited a django site and when posts are added through the admin page they render like this: http://website/posts/category/2010/1/11/post_information/ but the link will o

Re: Multiple template_dirs?

2010-01-27 Thread Mike Ramirez
uple of paths to search for templates.[1] In your example, I hope it was a typo but just in case [ and ) aren't matching enclosures. Mike [1] http://docs.djangoproject.com/en/dev/ref/settings/#template-dirs -- And you can't get any Watney's Red Barrel, because the bars close ev

Re: Multiple template_dirs?

2010-01-27 Thread Mike Ramirez
On Wednesday 27 January 2010 00:32:24 Mike Ramirez wrote: > base_tmpl_dir = os_path.join(PROJECT_PATH, 'templates') > TEMPLATE_DIRS = ( > base_tmpl_dir, > os_path.join(base_tmpl_dir, photologue), > ) > Fixed a typo --- base_tmpl_dir should have a ,

Re: Multiple template_dirs?

2010-01-27 Thread Mike Ramirez
On Wed, Jan 27, 2010 at 1:21 AM, djangonoob wrote: > Hi Mike, > > Unfortunately it is still not displaying the templates in the > templates/photologue directory. I tried your idea. Is there anything > else you can suggest? > Make sure that "photologues" is quoted i

Re: read only django admin

2010-01-28 Thread Mike Ramirez
rs first time I asked about the admin panel in irc and someone tried to convince me the admin panel was for database administrators, not site admins.* Mike -- A lawyer named Strange was shopping for a tombstone. After he had made his selection, the stonecutter asked him what inscription he

Re: Division with Python/Django

2010-01-29 Thread Mike Ramirez
- ValueErrorTraceback (most recent call last) /home/gufymike/Projects/goproject/ego_examples/src/ in () ValueError: invalid literal for int() with base 10: '1x' Mike -- We are MicroSoft. You will be assimilated. Resistance is fut

Re: Division with Python/Django

2010-01-29 Thread Mike Ramirez
somewhere along the lines or change the fields to be IntegerField Mike -- Let not the sands of time get in your lunch. signature.asc Description: This is a digitally signed message part.

Re: django-app user clashes with python-module user

2010-02-04 Thread Mike Ramirez
onvenient to allow users to have a standard customization file, which gets run when a program requests it. This module implements such a mechanism. Mike -- Don't be concerned, it will not harm you, It's only me pursuing something I'm not sure of, Across my dreams, with neptive wonde

Re: django and ldap

2010-02-04 Thread Mike Dewhirst
On 4/02/2010 11:14pm, David De La Harpe Golden wrote: On 04/02/10 08:33, andreas schmid wrote: @brad: can you show me some sample code for this? David I am using Peter Herndon's django-ldap-groups successfully. He has two backends; one for Novell's eDirectory which I'm using and another for

Re: getting dictionary values on template

2010-02-05 Thread Mike Ramirez
t allow [] operator..Can somebody tell me > how I can get the value corresponding to the key? > > thanks > harry > How else > http://docs.djangoproject.com/en/dev/topics/templates/#variables {{ mydata_dict.key }} Templates use the dot operator to access attributes to a

Re: Flat file application for binary data?

2010-02-05 Thread Mike Ramirez
http://docs.djangoproject.com/en/dev/topics/http/file-uploads/ http://docs.djangoproject.com/en/dev/ref/files/storage/ Between those two docs, you should be able to do everything you want. AFAIK, no file uploads are stored directly in the database, though there is a model behind it, it stor

Re: Flat file application for binary data?

2010-02-05 Thread Mike Ramirez
(project_file.file.path) response['Content-Disposition'] = 'attachment; filename=%s' %(file_name) The Content-Dispostion header is what lets the browser know there is a file coming (sorry for hitting send a bit early). Mike. -- Work smarter, not harder, and be car

Re: problem with get_absolute_url

2010-02-07 Thread Mike Ramirez
yapp_entry_detail", (self.id), {}) I prefer kwargs for readability. Mike -- Interestingly enough, since subroutine declarations can come anywhere, you wouldn't have to put BEGIN {} at the beginning, nor END {} at the end. Interesting, no? I wonder if Henry would like it. :-) --lwall

Re: problem with get_absolute_url

2010-02-07 Thread Mike Ramirez
> Then what you should be returning is the reverse() args, which is the > viewname as a string, > This is wrong, it's the name parameter for the url in urls.py Sorry... Mike -- "One day I woke up and discovered that I was in love with tripe." -- Tom Anderson s

Re: problem with get_absolute_url

2010-02-07 Thread Mike Ramirez
On Sunday 07 February 2010 10:49:03 jimgardener wrote: > Thanks Mike for the reply. > > I rewrote the method as > @models.permalink > def get_absolute_url(self): > return("myapp_entry_detail",(),{'id':self.id}) > > When I go to the admin interf

Re: Django Generator

2010-02-09 Thread Mike Ramirez
/djangogenerator > > All the best, > > -- > Brice Leroy > http://www.debrice.com > how is this different than `django-admin startproject` ? Mike -- Overconfidence breeds error when we take for granted that the game will continue on its normal course; when we fail to provide for an unusual

Re: Django Generator

2010-02-09 Thread Mike Ramirez
and what options they are it's not saving that much time (maybe 30 minutes?). Otherwise, I think that altering django-admin startporject to be template driven is a better idea than this. Sorry for being negative, but without negativity how can we be challenged and grow? Mike > I

Re: Tutorial 1: AttributeError at /time/ 'module' object has no attribute 'now'

2010-02-09 Thread Mike Ramirez
On Tuesday 09 February 2010 14:19:17 Nick Mellor wrote: > Thanks Shaun, > > I renamed the "now" variable as "dt" but it didn't help. I've also > tried your 1-tuple idea-- no change. > > Note that the offending line isn't the html assignment but: > > now = datetime.datetime.now() > Make sure you

Re: Django Generator

2010-02-09 Thread Mike Ramirez
takes in the templates and still looking at a few tweaks and playing > > with usability. > > I would like to see it. that would probably give me some ideas > It's attached. Mike -- Given a choice between grief and nothing, I'd choose grief. -- William Faulkner goproject.tar.gz Description: application/compressed-tar signature.asc Description: This is a digitally signed message part.

Re: Django Generator

2010-02-09 Thread Mike Ramirez
On Tuesday 09 February 2010 14:52:00 Frank W. Samuelson wrote: > You are something of a killjoy, Mike. > > This could grow into a really great project, where people > don't even have to learn programming to generate a usable > django web database app. Isn't this what

Re: Django Generator

2010-02-09 Thread Mike Ramirez
oper layout and conventions for newbies (like me). I have been > programming in python for years but am having some trouble wrapping my > head around the "django" paradigm. > I have to agree with this, I think it fits this niche perfectly. Mike -- A public debt is a kind of anchor

Re: Django Generator

2010-02-09 Thread Mike Ramirez
gt; > A bad django app made this way can hurt django's reputation. > > That's pretty severe. > Maybe, but public opinion is easily swayed and django is still fighting against other more popular systems. Mike -- Big M, Little M, many mumbling mice Are making midnight music in the moonlight, Mighty nice! signature.asc Description: This is a digitally signed message part.

Re: Django Generator

2010-02-09 Thread Mike Ramirez
On Tuesday 09 February 2010 15:51:03 Brice Leroy wrote: > 2010/2/9 Mike Ramirez : > > On Tuesday 09 February 2010 15:12:21 Brice Leroy wrote: > >> Would you eat some food not cook by a professional ? > > > > I would be very wary of a person who hasn't cooked

Re: django-debug-toolbar and 404's

2010-02-10 Thread Mike Dewhirst
'debug_toolbar.panels.request_vars.RequestVarsDebugPanel', 'debug_toolbar.panels.template.TemplateDebugPanel', 'debug_toolbar.panels.sql.SQLDebugPanel', 'debug_toolbar.panels.logger.LoggingPanel', ) MIDDLEWARE_CLASSES += ( 'debug_toolbar.middleware.Deb

Re: Django IDE

2010-02-14 Thread Mike Ramirez
On Sunday 14 February 2010 20:59:22 dj_vishal wrote: > Hello > >Hi to all am new to the Django Framework.am learning django >Which IDE is suitable for Django ..plz help me in right way > >Thanks in Advance >vishal >2009vis...@gmail.com > eric4 has a nice django plugin that y

Re: remote desktop control using Django

2010-02-16 Thread Mike Ramirez
you find problems, let them know. Mike -- I loved her with a love thirsty and desperate. I felt that we two might commit some act so atrocious that the world, seeing us, would find it irresistible. -- Gene Wolfe, "The Shadow of the Torturer" signature.asc Description: T

Re: remote desktop control using Django

2010-02-17 Thread Mike Ramirez
On Wednesday 17 February 2010 00:56:55 bruno desthuilliers wrote: > On Feb 16, 7:35 pm, Mike Ramirez wrote: > > On Tuesday 16 February 2010 10:24:46 Baurzhan Ismagulov wrote: > > > This is very impractical to implement with pure browser + HTTP. > > > > Take a look at

Re: remote desktop control using Django

2010-02-17 Thread Mike Ramirez
On Wednesday 17 February 2010 03:28:35 bruno desthuilliers wrote: > On Feb 17, 10:08 am, Mike Ramirez wrote: > > On Wednesday 17 February 2010 00:56:55 bruno desthuilliers wrote: > > > On Feb 16, 7:35 pm, Mike Ramirez wrote: > > > > On Tuesday 16 February 2010 10:

Re: Django IDE

2010-02-17 Thread Mike Dewhirst
a seamless way. It all became too heavy and was really distracting me from actual programming. I went back to a nice editor and manual refactoring. It feels much more nimble. ymmv Mike -- You received this message because you are subscribed to the Google Groups "Django users" gr

Re: LDAP Authentication and Single Sign on

2010-02-18 Thread Mike Dewhirst
On 19/02/2010 1:53am, Wayne wrote: Hi, I am about to develop an admin interface using Django framework for several web applications . By design, those applications will be decentralized, which means that they may use different databases and reside on different servers and they will talk to each

Re: custom auth backend and ./manage.py test

2010-02-21 Thread Mike Dewhirst
tests to prove your own new stuff. hth Mike -- 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 unsubscribe from this group, send email to django-users+unsubscr

stuck in Tutorial on StackedInLine, part 2 of tutorial

2010-03-20 Thread Mike Rychener
I get an error when I try StackedInLine. I downloaded the latest 'official' version of Django in February and used the tutorial on the web. Is there a mismatch in versions? or is something else missing? -- You received this message because you are subscribed to the Google Groups "Django users

Re: stuck in Tutorial on StackedInLine, part 2 of tutorial

2010-03-20 Thread Mike R
there. Mike On Mar 20, 1:27 pm, Daniel Roseman wrote: > On Mar 19, 12:45 pm, Mike Rychener wrote: > > > I get an error when I try StackedInLine.  I downloaded the latest > > 'official' version of Django in February and used the tutorial on the > > web.  Is th

Re: How to share settings file in multiprogrammer project

2010-03-28 Thread Mike Dewhirst
ds =credsdir + APP +'.cred' def getcreds(fname=creds): #The first line of creds is user, next is password fh = open(fname,'r') cred = [fh.readline().strip(), fh.readline().strip()] fh.close() return cred You choose your location according to location of your dev

django version detection

2010-03-28 Thread Mike Dewhirst
Can someone kindly tell me how I can detect which subversion revision of Django is actually installed on my machine? I need to re-install the exact same revision on another platform. It is probably staring me in the face but I must be looking elsewhere. Thanks Mike -- You received this

Re: django version detection

2010-03-28 Thread Mike Dewhirst
Much appreciated :) M On 29/03/2010 11:10am, Russell Keith-Magee wrote: On Mon, Mar 29, 2010 at 8:07 AM, Mike Dewhirst wrote: Can someone kindly tell me how I can detect which subversion revision of Django is actually installed on my machine? I need to re-install the exact same revision on

Django DbMigration 0.03 released

2007-06-09 Thread Mike H
Hi all, We've just released an update to the django dbmigration project. This release cleans up the code a little and improves the parsing of SQL migrations. Homepage and downloads at: http://www.aswmc.com/dbmigration/ Thanks to Chris Beaven for his patches :) MikeH --~--~-~--~~

django.contrib.auth.views.login failing cookie test

2007-06-09 Thread Mike H
uot;localhost". When I clear my cookies and then load the login page (which is a simple generic template view), I can see that there are no cookies set. The cookie only appears after I submit the first login request. As I have written no view cod

Re: django.contrib.auth.views.login failing cookie test

2007-06-09 Thread Mike H
s the session only get started once i submit the login form? Cheers, Mike Malcolm Tredinnick wrote: > On Sat, 2007-06-09 at 15:48 +0100, Mike H wrote: > >> Hi, >> >> I'm trying to use the provided login view for my new application, >> but whenever I use it, t

Re: django.contrib.auth.views.login failing cookie test

2007-06-09 Thread Mike H
. set_test_cookie on SessionWrapper is not getting called. When should it be getting called? As I say, after the first page view, I have not had a session started for me. Should I have? Mike It appears that when Mike H wrote: > Hi Malcolm, > > I'm more than willing to help track down the error

Re: django.contrib.auth.views.login failing cookie test

2007-06-09 Thread Mike H
have no session. Mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [

Re: django.contrib.auth.views.login failing cookie test

2007-06-09 Thread Mike H
cations to the session during that view, and so the session is not saved or a cookie set. Looks like i'll need to implement my own view :) Mike Malcolm Tredinnick wrote: > Hey Mike, > > On Sat, 2007-06-09 at 16:53 +0100, Mike H wrote: > >> Malcolm Tredinnick wr

Custom mod_python handlers with Django

2007-06-09 Thread Mike H
Hi all, I've posted the first in a series of posts about how to implement your own mod_python handlers using Django. I started it because I wanted to serve resized images without hitting the database, running middleware etc., but still have access to the django project settings (so I could re

Including [django-users] in subject line?

2007-06-09 Thread Mike Schinkel
Is there any chance the owners of this list could modify the configuration so that the emails contain [django-users] in the subject line? It would make it so much easier to deal with the volume of email if this could be done. Thanks in advance. -- -Mike Schinkel http://www.mikeschinkel.com

RE: Including [django-users] in subject line?

2007-06-09 Thread Mike Schinkel
may be able to quickly find someone else asking the same > questions you're about to ask, and more than likely you'll > find those questions already answered, which saves you and > everyone else time ;) Thanks for the warm we

RE: Including [django-users] in subject line?

2007-06-09 Thread Mike Schinkel
du]? I'm asking for something that is reasonably unique in subject heading. Hell, if you would just put "~" in the subject it would be better than nothing! -- -Mike Schinkel http://www.mikeschinkel.com/blogs/ http://www.welldesignedurls.org http://atlanta-web.org - http://t.oolicio.us

RE: Including [django-users] in subject line?

2007-06-09 Thread Mike Schinkel
e either and neither is reading or replying to the web interface. It's sad that you guys are so against what is standard practice on almost every other list. I'll probably just have to unsubscribe and learn TurboGears instead. BTW, as I'm new

RE: Including [django-users] in subject line?

2007-06-09 Thread Mike Schinkel
tion and that anyone who can come up with a better way > will make millions of dollars. Or not, when some open-source developer implements it for free. '-) (BTW, I support open-source, just thought that concept was funny.) -- -Mike Schinkel http://www.mikeschinkel.com/blogs/ http

RE: Including [django-users] in subject line?

2007-06-09 Thread Mike Schinkel
as wrong. > I've further addressed your points in this email. You'll find > that sort of response thoroughness fairly typical for the > list -- have a look at the replies to some of the substantive > technical questions. I'm now dropping out of the thread, > bec

RE: Including [django-users] in subject line?

2007-06-09 Thread Mike Schinkel
James Bennett wrote: > On 6/9/07, Mike Schinkel <[EMAIL PROTECTED]> wrote: > > Ironic. I was asking for a method that would help me make the list > > more managable, and have been told "no." Ironic because it > will likely > > cause me to leave before

RE: Including [django-users] in subject line?

2007-06-09 Thread Mike Schinkel
[EMAIL PROTECTED] wrote: > > http://www.robbyonrails.com/articles/2006/04/13/canada-on-rail > s-day-1-part-1 > > Why does this keep seeming more and more accurate every day You mean the part about "This fairly dismissive treatment of people's legitimate concerns

RE: Including [django-users] in subject line?

2007-06-09 Thread Mike Schinkel
tiable on the list, that's about the only potential solution left that I can see that would allow me to handle the volume of email on this list. -- -Mike Schinkel http://www.mikeschinkel.com/blogs/ http://www.welldesignedurls.org http://atlanta-web.org - http://t.oolicio.us "It nev

Re: Including [django-users] in subject line?

2007-06-09 Thread Mike Schinkel
Simon Drabble write > On Sun, 10 Jun 2007, Kenneth Gonsalves wrote: > > On 10-Jun-07, at 7:33 AM, Mike Schinkel wrote: > >> Does anyone know of a free service (or software) that I > could proxy > >> through that would let me add a subject header? Given that it >

RE: Including [django-users] in subject line?

2007-06-09 Thread Mike Schinkel
ave another account at Google I have to keep track of, and I have to login and logout between multiple Google accounts if I want to interact with the Django-users. Sigh, this stuff shouldn't be this convoluted. -- -Mike Schinkel http://www.mikeschinkel.com/blogs/ http://www.welldesignedur

Re: Django DbMigration 0.03 released

2007-06-10 Thread Mike H
Whoops, sorry about that! The download was a .tar.gz instead of a .tgz - all fixed now :) Cheers, Mike Kent Johnson wrote: > Mike H wrote: > >> Hi all, >> >> We've just released an update to the django dbmigration project. This >> release cleans up

RE: [django] Re: Including [django-users] in subject line?

2007-06-11 Thread Mike Schinkel
rs] > or any other redundant text to the subject line when there > are perfectly viable alternatives. I would also never ask an > entire list to change their ways because my email client > wasn't able to keep up with me. :-) When I asked I didn't realize it would be such a

Bouncing emails?

2007-06-11 Thread Mike Schinkel
Hey, I'm getting the following when I try to send email to the list (I can post message using the browser.) I use other Google Groups w/no problem. Anyone have an idea why? I'm sure it is obvious, but I don't see it... === Your message did not reach some or all of the intended reci

database connections

2007-06-23 Thread Mike H
recommended solution for connection pooling with postgres? I've seen SqlRelay and pgpool mentioned but they both seem to have downsides in terms of affecting query performance. What have people here used? Cheers! Mike --~--~-~--~~~---~--~~ You received th

Re: case sensitive usernames

2007-07-11 Thread Mike H
problems in that case. Lesson for today : sleep as much as you need to before attemping to think ;) Mike [EMAIL PROTECTED] wrote: > Hi all, > checkout/order > While I was writing test cases for my upcoming website, I noticed I that > the contrib.auth module will happily make a user

Re: Using Django without database

2007-07-13 Thread Mike Caldwell
I've done a lot of applications with this kind of concern. But it really doesn't change the design much. The web server goes on one side of the DMZ and the database server goes on the other. That probably should be the standard anyway, keep as little extraneous data as possible on the web server.

Re: upload progress bar (ticket #4165)

2007-07-26 Thread Mike Axiak
To get a better idea of what's happening, could you run firebug and see if X-Upload-Id is in the request headers? If it isn't then we know the problem is in the JavaScript. Otherwise, we know it's in the python. -Mike 1: http://code.djangoproject.com/ticket/4165#comment:15 2: http:

DbMigration 0.04 released

2007-07-26 Thread Mike H
Hi all, A bugfix release of DbMigration has been made, you can find it at http://www.aswmc.com/dbmigration/ Apologies to those that downloaded 0.03, it was a corrupt release and I've been without an internet connection recently while I moved house, just got my connection back, so here's the fi

Newbie with generic views

2007-08-30 Thread Mike Atlas
choices %} {{ choice.label|escape }} {% endfor %} {% endblock %} #= And I get no output... What am I missing here? Can someone point me in the right direction? I can't seem to find any good documentation on writing templates for generic views. Thanks, Mike --~--~---

Re: Newbie with generic views

2007-08-30 Thread Mike Atlas
Hmm... Looks like I need to access the object_list context... that seems to be the first step that I'm missing... I understand better somewhat already...although a link to any resources anyone might know of would be nice... Thanks. Mike On Aug 30, 2:59 pm, Mike Atlas <[EMAIL P

Re: Newbie with generic views

2007-08-30 Thread Mike Atlas
I'm on my way. Thanks...sometimes asking the right question is the best way to answer it for yourself :( competitor_list.html = {% extends "base.html" %} {% block content %} {% for object in object_list %} {{ object.fullname }} {% endfor %} {% endblock %} ==

Re: How to put some data from view the form

2008-02-22 Thread Mike H
Hi, Don't implement __init__ yourself, you can pass initial data to the form like this : form = MyForm(initial={'someArg': 'value',}) Hope that helps, Mike On 22 Feb 2008, at 10:14, Mintaka wrote: > > Hi > > I would like to put some data from view to

SqlAlchemy branch status or composite keys?

2008-02-25 Thread Mike Driscoll
now what's going on? I've been messing with TurboGears for a couple of weeks, but their SqlAlchemy implementation doesn't seem to play nice with MS SQL Server. Thanks, Mike --~--~-~--~~~---~--~~ You received this message because you are subscr

Re: Python using django framework

2008-03-23 Thread Mike H
e the same I'm guessing that your date in settings is a string, rather than a datetime object. Check out the python docs on datetime at http://docs.python.org/lib/datetime-datetime.html Hope that helps, Mike On 24 Mar 2008, at 01:52, julichrist wrote: > > > hi, i'm using d

Re: MySQL-python-1.2.2 errors

2008-03-25 Thread Mike H
I had the same problem just this morning. Commenting out #ifndef uint #define uint unsigned int #endif from _mysql.c fixed it for me, and all the django tests pass with a mysql backend afterwards, so I should be safe :) Cheers, Mike On 25 Mar 2008, at 15:04, Karen Tracey wrote: > On

Re: How are you storing binary data in db

2008-03-27 Thread Mike H
a file on disk and use a FileField to do keep the reference to it. Reading large chunks of file data from a db just wastes db resources, and if you have a load balanced environment, you can choose to store your files on an nfs share, which is what we do.

Re: CacheMiddleware issue

2008-03-27 Thread Mike Axiak
ind of giving Django conflicting requests since you're saying "Don't load the file into memory, load it lazily" while also saying "load the entire response into the cache". Regards, Mike 1: http://code.djangoproject.com/browser/django/trunk/django/middleware/cache.py 2:

Re: CacheMiddleware issue

2008-03-28 Thread Mike Axiak
Does the following code change not work? http://dpaste.com/41855/ Cheers, Mike On Mar 28, 1:16 pm, bfrederi <[EMAIL PROTECTED]> wrote: > Mike, > > I'm not exactly sure how to do a read and get the file to be cached in > memory with the middleware. If you look at t

Clearing the cache

2008-03-29 Thread Mike H
ng as we get back cached versions of things instead of the data that the tests are setting up... So, is there a standard way of clearing cache? There seems to be a method on the locmem backend but it's not a standard interface across all backends. Any ideas? Tha

Re: Clearing the cache

2008-03-29 Thread Mike H
On 29 Mar 2008, at 17:49, Sebastjan Trepca wrote: > > I would use signals for this. For example, you could hook on post_save > signal, so whenever a model gets saved, you refresh the cache etc. Unfortunately it's not as simple as that, we cache groups of models, querysets, portions of html tha

Re: Track number of hits on object

2008-04-03 Thread Mike Axiak
e.set(cache_key, hits) elif hits % 1 == 0: # For some counter, we save to the db. self.hits = hits self.save() return hits Note that that's a rough, rough outline. But it should be able to perform fairly well under high load. -Mike On Ap

Re: Track number of hits on object

2008-04-03 Thread Mike Axiak
odify the get_hits() method to save a _hits attribute to ensure that it doesn't count multiple times for the same object. -Mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: using threadlocals to get current user outside views

2008-04-03 Thread Mike Axiak
return; } } } } } This keeps the python abstractions relatively unbroken. Note that this may not be exactly what you want, but it illustrates the point that you can do it in javascript. -Mike On Apr 3, 12:56 pm, Aljosa Mohorovic <[EMAIL PR

Re: Google App Engine & Django

2008-04-08 Thread Mike Axiak
I've posted a message [1] on google's App Engine group asking for some insight into the DataStore <--> Django Models mapping problem. Hopefully it won't get lost amid the influx of emails on that list. Cheers, Mike 1: http://groups.google.com/group/google-appengine

Re: (Very) Large File Upload - mod_python MemoryError

2008-04-09 Thread Mike Axiak
7;field_name'].file_name, request.FILES['field_name'], save=False) instance.save() And it will do what I outlined above. I hope this helps! Let me know if you have any problems or further questions. (Specifically, posting in #2070 will let me keep

Re: store user as owner automaticaly

2008-04-10 Thread Mike Axiak
I usually do it via JavaScript [1]. However, this only works in an environment when you trust the person editing the content (i.e. the Admin). -Mike 1: http://mike.axiak.net/media/js/admin_overrides.js --~--~-~--~~~---~--~~ You received this message because you

New Project : Django Sites Integration

2008-04-27 Thread Mike H
hout modification! The project is at http://code.google.com/p/django-sites-integration/ I know it's probably going to be of limited appeal, but it was very useful for me, so hopefully someone else will have use for it. Cheers, Mike H --~--~-~--~~~---~--~-

Re: New Project : Django Sites Integration

2008-04-27 Thread Mike H
Oh, and it automatically filters the model's querysets by the current site. Kinda important that it does that, and I forgot to mention it, heh. Cheers, Mike On 27 Apr 2008, at 18:29, Mike H wrote: > > Hi all, > > I've been putting together a si

OneToMany relationshops between models?

2008-04-28 Thread Mike Chambers
this has an obvious answer. Again, I am new to django, and trying to work my way through the best way to use the framework (which I love, btw). mike chambers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Dj

Re: OneToMany relationshops between models?

2008-04-28 Thread Mike Chambers
Thanks. Ill take a look at that, as well as some of the other comments framework. I had looked at the django comments, but it looked like it wasnt really supported, and might change soon. mike chambers [EMAIL PROTECTED] wrote: > For something like this the best way to do this is a gene

Template variable in filter?

2008-04-28 Thread Mike Chambers
ing that I could write a custom filter that handles this, was curious if there was another way to do it. mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

check if template block has been defined?

2008-04-29 Thread Mike Chambers
round? Basically, if a sub template specifies the title, then I was to prepend" SITENAME : otherwise, I just want: SITENAME mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. T

Re: cut-and-paste traceback error actually the error from the time before --

2008-04-29 Thread Mike H
Are you using firefox? I think this is a "helpful" feature of firefox where if you fill out a form and refresh the page, it remembers the form content so you don't have to fill it in again. So if you get an error page, fix the problem, refresh and get a different error, firefox messes up t

get for errors as string and not as HTML

2008-04-29 Thread Mike Chambers
string? I realize I can put styles on the UL to do what I want, but that seems like a bit of a hack. thanks for any input... mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

<    1   2   3   4   5   6   7   8   9   10   >