Re: asynchronous operations

2008-07-07 Thread Joseph Heck
Look into using a queue system of some form. Django-queue-service (http://django-queue-service.googlecode.com/) was developed to enable this but there's similiar mechanisms in use through many sites. Either developed internally, or using heavier-duty queuing mechanisms. -joe On Mon, Jul 7, 2008

Re: Change the model name

2008-05-31 Thread Joseph Heck
If you're talking about changing the display name in the administrative interface, there is the option of setting "verbose name" - see http://www.djangoproject.com/documentation/model-api/#table-names for more information. You can also change the database table name associated with the model objec

Re: Display only some tables

2008-05-31 Thread Joseph Heck
Hey Kless, I think you need to be a bit clearer on your question. What are you trying to accomplish? On Sat, May 31, 2008 at 11:47 AM, Kless <[EMAIL PROTECTED]> wrote: > > How to show only any tables to any users -as to the visitors-? > > > --~--~-~--~~~---~--~~

Re: Django on MOSSO?

2008-05-06 Thread Joseph Heck
what's MOSSO? On Tue, May 6, 2008 at 12:01 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Has anyone got it to work? Maybe with a hack or two? > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django us

Re: Best practices sending out http requests from within django code

2008-04-18 Thread Joseph Heck
I've been using urllib2 very effectively - do be careful with it though - assuming you're planning on using it in view code - the time it spends waiting for something is the time that your user spends waiting. -joe On Thu, Apr 17, 2008 at 4:31 PM, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: >

Re: How to do background processing with Django

2008-03-26 Thread Joseph Heck
You can certainly hide this additional complexity with your application either using Django as a pass through or configuring up something with a reverse proxy in Apache or such. There's no reason that I can think of that the complexity of maintaining a queueing system for asynchronous processing w

Re: help

2008-03-26 Thread Joseph Heck
The docs at http://www.djangoproject.com/documentation/i18n/ really do outline what you need to do. make-messages.py can take a little tweaking to work properly under Win32 (i.e. instead of invoking ./make-messages.py you invoke python make-messages.py), but it all works quite smoothly. -joe On

Re: How often do you update your django?

2008-03-25 Thread Joseph Heck
that feature." can get a bit tiresome. > > In terms of updating, its (for me) as easy as going to the directory and > running git-svn fetch (or most probably in your case: svn up ). > > -justin > > > On Tue, Mar 25, 2008 at 1:26 PM, Joseph Heck <[EMAIL PROTECTED]> wr

Re: How often do you update your django?

2008-03-25 Thread Joseph Heck
It's more than a file - it's more like a directory :-) If you're new to django, you might find it a lot easier to start with the release version. The trunk has been reasonably stable lately, but there's no promise that it will remain so - and you might find yourself in a bind if you loose track o

Re: unit testing Q

2008-03-25 Thread Joseph Heck
Absolutely - the "making a seperate DB" is all wrapped in "django-admin.py test" or "./manage.py test" - which does a number of things for you. You don't have to use that at all - and just running standard python unit tests will work against your system. You'll need to set up your environment to u

Re: Showing day in html but cannot check the day on django

2008-03-25 Thread Joseph Heck
Python has a number of good date/time packages that you can use to do this... why don't you look into one of those. -joe On Tue, Mar 25, 2008 at 12:53 AM, soe <[EMAIL PROTECTED]> wrote: > > Hi all, > I would like to check the current day on the django not on html, mean > today is monday or t

Re: Django hosting service running Os C

2008-02-20 Thread Joseph Heck
For something as specific as MacOS X based hosting, that's a damn good price. -joe On Mon, Feb 18, 2008 at 7:35 AM, Dj Gilcrease <[EMAIL PROTECTED]> wrote: > > On Feb 17, 2008 3:12 PM, Flavio Curella <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I developed a small application using django

Re: How/where do you add middleware (was: empty PATH_INFO with LiteSpeed / FastCGI)

2008-02-20 Thread Joseph Heck
Austin, There's an excellent overview of the how's and why's of Middleware at http://www.djangoproject.com/documentation/middleware/ Fundamentally, you're just specifying a class that you've implemented somewhere. It can be in a folder or not - that's just matching python's module structure to t

Re: django runserver freeze after 10-15 min

2008-02-16 Thread Joseph Heck
Mark was also the one who got me working it. :-) At OSCON 2007 as well... On Feb 16, 2008 12:47 PM, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > > On Sat, 2008-02-16 at 12:43 -0800, Joseph Heck wrote: > > The link to Gordon's page is much nicer than the hackery I d

Re: "Presales" questions

2008-02-16 Thread Joseph Heck
There isn't a visual interface for creating new fields, but don't let that stop you. It is really very straight forward and well documented. If you don't own the printed version of the django book, I'd recommend hitting their web site and reading or at least glancing through Chapter 5 (http://djan

Re: django-admin.py just doesn't go

2008-02-16 Thread Joseph Heck
Johan is right on - it sounds like all you need to do it get django-admin.py on your path. -joe On Feb 16, 2008 7:35 AM, Johan Liseborn <[EMAIL PROTECTED]> wrote: > > On Feb 16, 2008 1:46 PM, doNascimento <[EMAIL PROTECTED]> wrote: > > I'm on mac OS X (10.4) > > Installed the official release (0

Re: django runserver freeze after 10-15 min

2008-02-16 Thread Joseph Heck
The link to Gordon's page is much nicer than the hackery I did some time back, but I thought I'd pipe in with a comment that the WSGIServer from CherryPy works very nicely. We've embedded it into our Django Queue Service project (I yanked the WSGIServer directly - didn't need the rest: http://code

Re: django-admin.py just doesn't go

2008-02-15 Thread Joseph Heck
Need just a little more information... First - what platform are you working on? Second, how did you install django? It might be as simple as needing to set some execute permissions (linux or Mac), bind .py to a specific program (win), or just have you invoke "python django-admin.py" to work aro

Re: django-queue-service documentation

2008-01-30 Thread Joseph Heck
I'm always willing to take suggestions. We've expanded on the basics in the "unstable" branch - mostly focusing on adding a pure REST interface, which Rajesh has done a wonderful job with. It does have it's own settings when using it standalone - it's a pretty straight-up Django application that w

Re: django-queue-service documentation

2008-01-30 Thread Joseph Heck
gt; creating a empty directory or by cloning an existing one. When > cloning a repo, after saving, a post_save signal calls mercurial's > hg.clone function, and the screen waits until this is done, which can > be a while for larger repos, or one on slower servers. > > I

Re: django-queue-service documentation

2008-01-27 Thread Joseph Heck
Sorry for the lack of docs - I think we've all been focused elsewhere, and the project is being somewhat quiet right now. Do you want to integrate it into your application directly, or use it as a standalone critter? What kind of information on using it would be most useful to you? I've got some

Re: Performance of a django website

2007-12-11 Thread Joseph Heck
Definitely take that specific dynamic page and profile it - see what's happening and why its slow. That's clearly your first bottleneck to work on from the data you've provided. There's a wiki page on that very process here: http://code.djangoproject.com/wiki/ProfilingDjango and there's additiona

Re: Performance of a django website

2007-12-11 Thread Joseph Heck
Add on to Rajesh's list - what pages are you requesting and have you profiled them to understand what's taking long? -joe On Dec 11, 2007 10:08 AM, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > > Hi Richard, > > > > > When I stress test the dynamic part of the site, I am only getting about > > 300

Re: static on separate what?

2007-12-09 Thread Joseph Heck
running the media off a non-standard port without a front-end proxy to make it "look" like it's coming from somewhere on Port 80 may get you some trouble. In particular, we found that a lot of folks behind firewalls and in corporate environments simply didn't get anything on the media server *unle

Re: Combating submission form Spam

2007-12-05 Thread Joseph Heck
I'd recommend something along those lines - otherwise they'll hit you hard and keep coming! -joe On Dec 5, 2007 4:50 PM, Darryl Ross <[EMAIL PROTECTED]> wrote: > Hey All, > > One of the websites I run has started getting spam via the contact form. > > What is the recommended way of dealing with

Re: MacOS X Leopard + mod_pyton + mysql problems

2007-10-30 Thread Joseph Heck
Hey Chris, How did you install the MySQL/Python library? Did you use MacPorts? A pre-made binary? On 10/30/07, crudolph <[EMAIL PROTECTED]> wrote: > > Hi, > > I was able to get django/python running via mod_python under the > apache2 installation under Leopard (MacOS X 10.5). However once I > st

Re: newform: Why Doesn't This work

2007-10-16 Thread Joseph Heck
The "choice = " is getting evaluated as a class, and the self.q_prime is referring to an instance of the class myForm. At least I think that's what's happening here... -joe On 10/16/07, johnny <[EMAIL PROTECTED]> wrote: > > Below is my form class. Inside myForm, I tried doing this: > > choice

Re: OT: How did you handle asynchronous tasks?

2007-10-16 Thread Joseph Heck
On 10/16/07, David Larlet <[EMAIL PROTECTED]> wrote: > 2007/10/15, Joseph Heck <[EMAIL PROTECTED]>: > > > > Hi David, > > > > If you'd be willing to indulge me, why doesn't DQS doesn't fit your > > requirements? I'd love to have

Re: OT: How did you handle asynchronous tasks?

2007-10-15 Thread Joseph Heck
Hi David, If you'd be willing to indulge me, why doesn't DQS doesn't fit your requirements? I'd love to have some explicit feedback on where it could be improved to match your needs. And yes, I know there's a LOT of places where it could be improved... :-) -joe On 10/15/07, David Larlet <[EMAIL

Re: custom method for view

2007-10-04 Thread Joseph Heck
Get an instance of the model and call getValue() on it. i.e. my_model_instance = myClass.objects.get(pk=12) my_model_instance.getValue() -joe On 10/4/07, Goon <[EMAIL PROTECTED]> wrote: > > probably a dumb question, what's the syntax for calling a method in > models.py from views.py? > > so li

Re: Sending encrypted email

2007-10-04 Thread Joseph Heck
ight" way to send an encrypted message with GPG is, but that might be something of use... -joe On 10/4/07, Joseph Heck <[EMAIL PROTECTED]> wrote: > Nothing built in - You're going to have to head towards the low-level > libraries to make this happen. > > -joe &

Re: Sending encrypted email

2007-10-04 Thread Joseph Heck
Nothing built in - You're going to have to head towards the low-level libraries to make this happen. -joe On 10/4/07, Francis <[EMAIL PROTECTED]> wrote: > > Hello, > > I need to send an email with a encrypted part in it. Is there a built- > in way to do this in python or django (since it is a dj

Re: django database setup problem

2007-10-04 Thread Joseph Heck
ument 2 of âPyErr_SetStringâ from > incompatible pointer type > error: command 'gcc' failed with exit status 1 > -------- > >

Re: django database setup problem

2007-10-03 Thread Joseph Heck
You're on the right track - missing the MySQL python libraries. It looks like Python is also missing the zlib libraries... not sure which OS you're using, but there's probably an "apt-get install ..." or "rpm -Uvh ..." command that will get you the MySQL Python libraries that you need. Looking on

Re: python script

2007-10-03 Thread Joseph Heck
just modify sys.path as you need... On 10/3/07, Xan <[EMAIL PROTECTED]> wrote: > > In http://code.djangoproject.com/ticket/5534 there is a howto for > doing that. > But it's only when the script is in the root project directory. > What happens if we want the script in other location? What line we

Re: fell sad will a newform implement

2007-10-02 Thread Joseph Heck
Narrow this down and you should be able to work through it. First - is the view getting invoking correctly, regardless of what newforms is doing? If you're running on a dev server instance (i.e. django-admin runserver), then try printing out the request.POST or request.GET in the view to see what

Re: Post question

2007-10-02 Thread Joseph Heck
Yes, absolutely. You have all the form data in the request object that comes into the view - you can use that to tweak data and send off another request externally. It's relatively high latency, but it definitely is possible. -joe On 10/1/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I d

Re: Create and send post data to a view?

2007-10-01 Thread Joseph Heck
Right on - a better solution if you're keeping it all in the same server! -joe On 10/1/07, Marty Alchin <[EMAIL PROTECTED]> wrote: > > On 10/1/07, Joseph Heck <[EMAIL PROTECTED]> wrote: > > You could do it by having your view act as a proxy. Basically > >

Re: Create and send post data to a view?

2007-10-01 Thread Joseph Heck
You could do it by having your view act as a proxy. Basically instantiate a new connection to the view in question from your web application using urllib2 or the like. Then get the results, process them as you wish, and send the results of that post-processing (if any) back to the original client

Re: USE HTML

2007-09-23 Thread Joseph Heck
Django has an excellent starter tutorial at http://www.djangoproject.com/documentation/tutorial01/ that should get you started with what you're asking and want to know. Do the tutorial, it's worth it. -joe On 9/23/07, mayank bhargava <[EMAIL PROTECTED]> wrote: > > How to use html or how to creat

Re: how to implement "stay logged on this computer until i log out"?

2007-09-23 Thread Joseph Heck
You can certainly access cookies manually and do with them as you like. That's how we've implemented a "remember who it was that last logged in from this computer" kind of feature. There's a set_cookie() method on the request object that can do this work for you - but it's not thoroughly document

Re: ORM / Performance

2007-09-18 Thread Joseph Heck
e out Django horizontally to achieve the scale you need. -joe On 9/18/07, yezooz <[EMAIL PROTECTED]> wrote: > > > > On Sep 18, 10:23 pm, yezooz <[EMAIL PROTECTED]> wrote: > > On Sep 18, 10:14 pm, "Joseph Heck" <[EMAIL PROTECTED]> wrote: > &g

Re: ORM / Performance

2007-09-18 Thread Joseph Heck
two words: intelligent caching Know what you're asking for commonly, and cache it up with memcache. That will do you a world of benefit. -joe On 9/18/07, yezooz <[EMAIL PROTECTED]> wrote: > > hi all, > > I'm sure many of you run high traffic websites in Django and I'm very > curious how you're

Re: Django, CherryPy and threading

2007-08-28 Thread Joseph Heck
You get to decide the version of "safe" - i've done something similiar with a little REST queuing app and run it up to fairly significant loads without issue. -joe On 8/28/07, Justin Johnson <[EMAIL PROTECTED]> wrote: > > > I've managed to get Django working nicely with CherryPy using WSGI. > Pr

Re: Web developement with Python

2007-08-27 Thread Joseph Heck
To answer your specific question about can Django handle 100 page hits/sec, the answer is yes. Like any other technology, how you achieve that scale depends on a lot of things other than just the framework. There's a nice (but not detailed) interview about Pownce at http://immike.net/blog/2007/07

Re: Help with Django installation on OSX 10.4.10

2007-08-26 Thread Joseph Heck
Use the path settings from my earlier post - that fits perfectly with MacPorts and should do you. -joe On 8/26/07, Brandon Taylor <[EMAIL PROTECTED]> wrote: > > Hi everyone, > > I scrapped my custom install of Python 2.4.4 and Django in favor of an > install from MacPorts. So, now I have Python

Django Queue Service

2007-08-25 Thread Joseph Heck
For anyone interested, I've made available the code (using Django) to a project that implements a message queue for use with Django (or anything, really) projects. The brilliantly conceived name is "Django Queue Service", and the source is available at http://django-queue-service.googlecode.com/.

Re: Help with Django installation on OSX 10.4.10

2007-08-25 Thread Joseph Heck
It is most likely an improper reference in django-admin.py to the location of python - or the "wrong" python. If you invoke python in your terminal, which do you get? BTW: I used the MacPorts install of Python, and I keep the following in my .profile: export PATH=/opt/local/bin:/opt/local/sbin:

Re: non-event driven method called?

2007-08-23 Thread Joseph Heck
common problem, but a pretty straightforward solution. You can run a script via cron that imports and uses Django bits as you like - we do that quite often. Just make sure you have your environment set up appropriately when you invoke the script - adding in the proper PYTHONPATH and such. -joe O

Re: cmemcached etc

2007-08-13 Thread Joseph Heck
What platform are you trying to install this onto? -joe On 8/13/07, TheMaTrIx <[EMAIL PROTECTED]> wrote: > > Ok, I've used memcached for quite some time with PHP sites and that > was rather easy. > > Now I see you can use it with Django, but to get memcached support you > need to either install

Re: full-text indexing

2007-08-08 Thread Joseph Heck
There was a very impressive demonstration of SOLR at OSCON this year, and it looks very, very easy to set up for light(i.e. reasonable but not-heavy) usage. The default install comes pretty much ready to roll - you'll have to tweak out a "schema" description of what you're indexing, and work on a

Re: remember me feature

2007-08-01 Thread Joseph Heck
If you want something that lasts longer than a session (for how-ever you configured it on your system), then you might consider writing your own cookie, and checking for it at the relevant places. I don't use this mechanism for authentication, but as a little additional personalization touch to re

Re: learning django's HttpRequest Object and Middleware

2007-07-31 Thread Joseph Heck
The middleware is loaded by whatever is serving your requests, and when it loads it'll process through that file - invoking "foofunc()" in the path and executing it. I'm not sure I understand your second question though. -joe On 7/31/07, james_027 <[EMAIL PROTECTED]> wrote: > > Hi Thomas > > >

Re: Django Blocking/ Background Jobs

2007-07-30 Thread Joseph Heck
A side conversation from the Django BOF at OSCON this year made some noises about "TheSchwartz" (http://code.sixapart.com/trac/TheSchwartz) - a Perl job queue that SixApart (Brad FitzPatrick) has made available. I'd heard there were now Ruby and Python bindings to it, but I haven't found the relev

Re: tsearch2 problems in postgres?

2007-07-30 Thread Joseph Heck
We pre-process the search query with our own simple code, converting "and" and "or" and verifying that the resulting query is acceptable. Ultimately, we fall back to a method that just checks against TSearch2 itself to verify the query is "OK": def _validate_query(querystring): """ validates

Re: Can Google index Django's pages?

2007-07-16 Thread Joseph Heck
You can optimize a bit for Google as well by implementing a sitemap (see: http://www.djangoproject.com/documentation/sitemaps/) -joe On 7/13/07, felixhummel <[EMAIL PROTECTED]> wrote: > > Thanks for this fine answer, Julio! > Now nothing is going to hold me back! ;) > > On Jul 13, 8:22 pm, "Juli

Re: request

2007-07-10 Thread Joseph Heck
Hi Sreelatha, When you say "send a messae to multiple users", do you mean display a message on your site to a set of users? There's a couple of different ways to attack this kind of problem - but the easiest is to have a view that queries a storage place (likely a model) and displays any message

Re: installation issues

2007-07-09 Thread Joseph Heck
Where are you getting stuck? I assume you it works - it's just a matter of getting the pieces/parts installed. -joe On 7/8/07, surfwizz <[EMAIL PROTECTED]> wrote: > > I am having trouble installing Django on Mac OSX 10.4.10. Any help > would be welcome. Thanks! > > > > > --~--~-~--~--

Re: Django books application i18n

2007-07-09 Thread Joseph Heck
I'm not 100% sure I understood what you were asking. -joe On 7/8/07, Gianluca <[EMAIL PROTECTED]> wrote: > > Thanks...but in my case? > I have thought to extends the "change_form.html" generic template. But > how can I refer to a field of my data model? ( book nam

Re: Django books application i18n

2007-07-06 Thread Joseph Heck
I think most everything that you'd like to know is detailed out at http://www.djangoproject.com/documentation/i18n/ -joe On 7/6/07, Gianluca <[EMAIL PROTECTED]> wrote: > > Hello, > I'm following the Django tutorial about books application. How can I > internationalize this application? > For exa

Re: Using simplejson

2007-06-21 Thread Joseph Heck
my JSON and name is its one of the values present in that > list) then it doesnt get recognized, is gives me Type mismatch error , is > there any conversion or decode i need to do ? > > > On 6/20/07, Joseph Heck <[EMAIL PROTECTED]> wrote: > > > > If I understa

Re: classes

2007-06-21 Thread Joseph Heck
Ahhh! Thanks, didn't know (obviously) about that one! -joe On 6/21/07, Aidas Bendoraitis <[EMAIL PROTECTED]> wrote: > > Actually, type is a function, not a method. > type(x) == x.__class__ > > Regards, > Aidas Bendoraitis aka Archatas > > > On 6/18/07,

Re: Graphs and django

2007-06-20 Thread Joseph Heck
I've been using FusionGraphs (flash based graphing, generating the "data" through XML templates) with good success. It's not directly in python using PIL or anything, but it's been quick and effective. -joe On 6/20/07, Gerry Steele <[EMAIL PROTECTED]> wrote: > > i was wondering if anyone had any

Re: Using simplejson

2007-06-20 Thread Joseph Heck
If I understand correctly, that sounds reasonably doable - what is your question? Taking JSON from whatever source and generating a form in HTML is pretty much straight javascript and/or templating. -joe On 6/20/07, cess <[EMAIL PROTECTED]> wrote: > > Hi All, >I am very new to the Django fra

Re: classes

2007-06-18 Thread Joseph Heck
x = '123' x.__class__ will give a reasonable answer, x.type() doesn't. (Python 2.4) If you can get away with using type(), it's probably a lot cleaner to use... -joe On 6/18/07, Aidas Bendoraitis <[EMAIL PROTECTED]> wrote: > > or type() > > On 6/7/07,

Re: get subversion revision-number in a django-project

2007-06-15 Thread Joseph Heck
I don't know about Gabor, but I actually use it in a dashboard view on my site to know what version of the software is deployed at any given time. Very handy that way. -joe On 6/15/07, Udi <[EMAIL PROTECTED]> wrote: > > Mind if I ask why? > > Udi > > > > > --~--~-~--~~~-

Re: get subversion revision-number in a django-project

2007-06-15 Thread Joseph Heck
generally invoking "svnversion" is the easiest way to get this. i.e. "svnversion ./trunk" return the subversion version # for the directory "trunk". -joe On 6/15/07, David Reynolds <[EMAIL PROTECTED]> wrote: > Gabor, > > On 15 Jun 2007, at 9:18 am, Gábor Farkas wrote: > > > > > hi, > > > > in

Re: newbie seeks relevant examples

2007-06-14 Thread Joseph Heck
Just so you're aware - switching from a Web Start application to Django is a fairly significant change in how you attack some problems. With WebStart, you have a full user interface API with Swing (or whatever you're using) running in it's own JVM, and in Django you're pushing this all into a brow

Re: new forms and read-only rendering

2007-06-13 Thread Joseph Heck
That kind of mechanism doesn't exist within Newforms. If you want to display a representation of an model object, you're better off looking at generic views for that sort of functionality. -joe On 6/13/07, eXt <[EMAIL PROTECTED]> wrote: > > Hello > >I use new forms library in my application

Spread and Django

2007-06-13 Thread Joseph Heck
Has anyone investigated or used Spread (spread.org) as a messaging bus between systems, either using Django or not? I am looking for something to transport messages between systems - basically a message queue mechanism. Spread seemed like it might do the trick, and has some reasonable python libr

Re: How to set up full text field in models.py?

2007-06-07 Thread Joseph Heck
Nothing built in to Django enables that - you have to do it externally to the Django framework. On 6/7/07, Warvin Barker <[EMAIL PROTECTED]> wrote: > > Hi! > > I can set up fulltext indices via MySql directly, but is there a way to do > this in models.py? > > Thanks! > > -Warren > > > > --~--~-

Re: classes

2007-06-07 Thread Joseph Heck
.__class__ On 6/7/07, Lic. José M. Rodriguez Bacallao <[EMAIL PROTECTED]> wrote: > how can I know insede a method the type of my class dynamicaly? > > -- > Lic. José M. Rodriguez Bacallao > Cupet > > > --~--~-~--~~~---~--~~ You received this message because you a

Re: Django Deployment Headache (Apache Permissions?)

2007-06-06 Thread Joseph Heck
ded apache to the group bestx. This is the group that the > user 'thebest' belongs to. > > > > On Jun 6, 6:07 pm, "Joseph Heck" <[EMAIL PROTECTED]> wrote: > > What user does apache run as - set group read permissions (at least) to > > that. >

Re: Django Deployment Headache (Apache Permissions?)

2007-06-06 Thread Joseph Heck
What user does apache run as - set group read permissions (at least) to that. If you're using Ubuntu or Debian, it is likely "www-data", so the following commands (as root) would do the trick: chgrp -R www-data /home/thebest/TheBest/ chmod -R g+r /home/thebest/TheBest/ -joe On 6/6/07, [EMAIL P

Re: robots.txt?

2007-06-05 Thread Joseph Heck
Yes, you'd set in something like: SetHandler None (which is exactly what I've done) -joe On 6/5/07, Rob Hudson <[EMAIL PROTECTED]> wrote: > > I'm not using mod_rewrite currently (and may even have it turned off > in Apache to save memory). Is there another solution? > > I have my static

Re: problem representation

2007-06-04 Thread Joseph Heck
tle. It is ultimatley a tradeoff choice that you need to make for your own code. -joe On 6/4/07, Lic. José M. Rodriguez Bacallao <[EMAIL PROTECTED]> wrote: > that is repeating a lot of common information about my models, what about > DRY, reusing, etc? > > On 6/4/07, Joseph Hec

Re: query parameters for search

2007-06-04 Thread Joseph Heck
While it may look ugly, it's actually pretty effective - depending on what you want to enable with search queries overlaid on URL's. If you only had simple (i.e. one word) terms, you could write the query into the URL itself, but I found that using a url like /search/ and then appending on ?q=...

Re: Big app, big db, all users are authenticated

2007-06-04 Thread Joseph Heck
Another thing to keep an eye out for is referencing one model from another - when loading up the choices for something that has > 1000 possible associated objects, then system will take a while to pull all those into place. Setting "raw_admin_id" in the model will help alleviate this, but you loo

Re: problem representation

2007-06-04 Thread Joseph Heck
Maybe a foreign key relationship would work, but you might just consider adding all those attributes to each model. Unless you think you'll end with really sparse tables, it may be worth it for the simplicity. You wouldn't want to use a one-to-one table for common elements among different models.

Re: SVN revision for 0.96?

2007-05-29 Thread Joseph Heck
12 2007. > > andrew > > On May 29, 1:01 pm, "Joseph Heck" <[EMAIL PROTECTED]> wrote: > > Is the question "What's the URL for the 0.96 release?" > > > > browse:http://code.djangoproject.com/browser/django/tags/releases/0.96 > > > > che

Re: SVN revision for 0.96?

2007-05-29 Thread Joseph Heck
Is the question "What's the URL for the 0.96 release?" browse: http://code.djangoproject.com/browser/django/tags/releases/0.96 checkout: svn co http://code.djangoproject.com/svn/django/tags/releases/0.96 -joe On 5/29/07, Andrew <[EMAIL PROTECTED]> wrote: > > Anyone know? We were working off th

Re: The Coding Is Wrong

2007-05-29 Thread Joseph Heck
Your question is far to vague for anyone here to help you. You need to ask an explicit question, giving an example. -joe On 5/29/07, xzh <[EMAIL PROTECTED]> wrote: >I am a rookie of Diango . I have problem.I wrote a template then > test it in the browser, the coding was not I want . How can

Re: Best practice: How to test site using openid-only login

2007-05-29 Thread Joseph Heck
You might take a look at twill (http://twill.idyll.org/) - Although I find it a tad trickier to get rolling with than Selenium, it has the functionality that you want (emulating a browser, including cookies) and can be 'programmed' to walk to an OpenID login site and back again following redirects

Re: How to delete a session

2007-05-23 Thread Joseph Heck
<[EMAIL PROTECTED]> wrote: > > > On May 23, 10:18 pm, "Joseph Heck" <[EMAIL PROTECTED]> wrote: > > > > > The session is a model in Django - so you can delete it like any other - > > > > > x=request.session > > > x.delete() > &

Re: Explicit SQL not working ...

2007-05-23 Thread Joseph Heck
When you're done with the command (assuming you're not being explicit about the transactions), use: transaction.commit_unless_managed() to force the commit. -joe On 5/23/07, ZebZiggle <[EMAIL PROTECTED]> wrote: > > More info ... > > I wrote a little program to execute the query directly via p

Re: LIKE '%something%' custom queries

2007-05-23 Thread Joseph Heck
Don't put the % inside of " characters, or Python will attempt to evaluate it out. Alternately, escape it so it doesn't eval. I generally form up my custom SQL strings outside of the execute() method to make debugging this kind of thing a tad easier. -joe On 5/23/07, [EMAIL PROTECTED] <[EMAIL PR

Re: How to delete a session

2007-05-23 Thread Joseph Heck
The session is a model in Django - so you can delete it like any other - x=request.session x.delete() There's also the daily_cleanup.py script included with Django that just goes straight to the database: http://code.djangoproject.com/browser/django/trunk/django/bin/daily_cleanup.py -joe On 5/

Re: newforms unique field(s)

2007-05-22 Thread Joseph Heck
I thought the same thing. :-) I'll take a whack at wringing it together and submitting it as a patch, and you can be appalled at my slaughtering of your fine explanation. -joe On 5/21/07, simonbun <[EMAIL PROTECTED]> wrote: > > Great stuff again Malcolm. Perhaps it should be rehashed a bit and p

Re: newforms unique field(s)

2007-05-21 Thread Joseph Heck
What is the "general way" to add your own validation to forms under the newforms framework? Subclassing and adding in your clean_* methods? Using decorators or the such around existing validation? Adding your own custom Field objects and setting their "clean" methods? -joe On 5/21/07, Matt <[EM

Re: Search options

2007-05-11 Thread Joseph Heck
We determined that Postgres was portable enough to any platform we'd host on, and went with TSearch2 and have been pretty happy. Having done hard-core search work in a previous life (www.singingfish.com), I know it isn't everything you can get in the search world, but it was sufficient for our nee

Re: How well should I know Python before using Django?

2007-05-09 Thread Joseph Heck
Beginner, at least in my opinion. YMMV. On 5/9/07, walterbyrd <[EMAIL PROTECTED]> wrote: > Before attempting to use Django, a person should have a Python > programming skill level of: > > 1) beginner > 2) intermediate > 3) expert > > To use Django, a developer should have an exceptionally strong

Re: Scalability / Traffic-Volume Numbers

2007-05-09 Thread Joseph Heck
Back in February, TrenchMice was hit with a reasonable load from a front-page Slashdot article, and they wrote it up at http://www.cogitooptimus.com/2007/02/11/wow-we-made-it/ I helped them with some load testing before the site ever went live, and it looked to be able to handle it with aplomb. T

Re: Issue with database Postgresql :(

2007-05-08 Thread Joseph Heck
Using django syncdb is fine - just make sure the database itself is set up with utf-8 encoding. I used that very command just prior to running "django-admin.py syncdb" You might check the archives of this group for similiar topics - I recall seeing discussion on this previously, and I think they

Re: Issue with database Postgresql :(

2007-05-08 Thread Joseph Heck
You need to deal with whatever encoding the file is in. But you're also running out of my area of knowledge in regards to text encodings. -joe On 5/8/07, Gerard M <[EMAIL PROTECTED]> wrote: > > Thanks for all your help guys, but I'm facing another little thing > here, if I'm getting the word fro

Re: problems with spawning new subprocesses with development server

2007-05-08 Thread Joseph Heck
task just to spawn a child > process and continue the parent. I have a feeling that it is still > perfectly doable. > > Ilja > > On May 8, 8:01 pm, "Joseph Heck" <[EMAIL PROTECTED]> wrote: > > For a light (i.e. short) duration process that you want results

Re: Issue with database Postgresql :(

2007-05-08 Thread Joseph Heck
You'd want to write that as w = u'ataché' to make sure python knew you were pushing out a unicode string, but an ASCII string. -joe On 5/8/07, Gerard M <[EMAIL PROTECTED]> wrote: > > Thanks for your help Rafael, but I got into another trouble trying to > encode my string like this; > I have th

Re: Using Django Models outside of Django

2007-05-08 Thread Joseph Heck
Generally outside and prior to any thread initiation should be fine. -joe On 5/8/07, johnny <[EMAIL PROTECTED]> wrote: > > Since I have my code in threaded manner, do I have to put the > following code inside threaded function or outside? > > from os import environ > environ['DJANGO_SETTINGS_MOD

Re: Issue with database Postgresql :(

2007-05-08 Thread Joseph Heck
when you created your database, did you set the encoding to UTF-8? When we set up our database, we used: createdb -E='utf-8' -Upostuser databasename I'm not familiar enough to Postgres to know if you can convert the encoding of a database after it's been created. -joe On 5/8/07, Gerard M <

Re: problems with spawning new subprocesses with development server

2007-05-08 Thread Joseph Heck
For a light (i.e. short) duration process that you want results from to return to the user, it's fairly straightforward. Here's some code we're using to report our current code revision in an admin dashboard: def get_code_revision(): import os x = os.popen("/usr/bin/svnversion /u/django/w

Re: How do you get at a RadioFieldRenderer object from a template? (newforms)

2007-05-07 Thread Joseph Heck
Interesting solution Bill! Thanks for sharing! I'll see if I can't make that mechanism work for me... Malcolm's response was also great in detail, and now I think I need to digest some and see how I can use it, and if there's a good generic solution for me. -joe On 5/7/07, Bill Fenner <[EMAIL P

  1   2   3   >