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: 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: 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: 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: 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 > > > > --~--~-

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: 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

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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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:

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-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

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: 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: 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: 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-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-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 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-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: "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 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: 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: 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: 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: 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: 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: 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 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: 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: 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: 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: 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: 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: Captcha example

2007-02-20 Thread Joseph Heck
I used a very slight variation off that same code base - so let me take a stab at explaining what the general idea is behind how captcha was implemented - In the view where you're going to display a captcha, generate first a "captcha" that just goes into the database - a combination of a UUID, the

Re: Need help - Template problem

2007-02-22 Thread Joseph Heck
I was confused by this a couple of times as well - it *looks* like you can specify the width and size of those form fields from inside the model, but CSS is the best way to do it. Each form field will have it's own ID - in the case of "{{form.username}}" you should expect to see the form id "id_use

Re: Running Django locally on Mac OS X, error with database connection

2007-02-23 Thread Joseph Heck
Well, I wrote those instructions... :-) >From the traceback, you don't seem to be using the Python 2.4 from DarwinPorts/MacPorts (assuming you installed that). That is generally because your PATH hasn't been updated on the command line. You want to make sure you get the lines: PYTHONBIN=/opt/loc

Re: Running Django locally on Mac OS X, error with database connection

2007-02-23 Thread Joseph Heck
enclosed / > Frameworks/Python.framework/Versions/2.4/bin), though I really don't > know if that's important or not.) > > Thoughts on what I need to fix to get my .bash_profile to work > properly? > > Thanks once more in advance! > > On Feb 23, 12:02 pm, "

Re: Running Django locally on Mac OS X, error with database connection

2007-02-23 Thread Joseph Heck
.3_1+darwin_8 (active) > readline @5.1.004_0 (active) > sqlite3 @3.3.13_0+darwin_8 (active) > subversion @1.4.3_0 (active) > zlib @1.2.3_0 (active) > benjamin-chaits-powerbook-g4-15:~ benjaminchait$ > > On Feb 23, 1:40 pm, "Joseph Heck" <[EMAIL PROTECTED]> wrot

Re: Running Django locally on Mac OS X, error with database connection

2007-02-23 Thread Joseph Heck
/opt/local/bin/python > -V > -bash: /opt/local/bin/python: No such file or directory > > On Feb 23, 2:03 pm, "Joseph Heck" <[EMAIL PROTECTED]> wrote: > > If you enter the command "/opt/loca/bin/python -V" do you get Python > > 2.4.something? > >

Re: Running Django locally on Mac OS X, error with database connection

2007-02-23 Thread Joseph Heck
chait$ ls -l /opt/local/bin > > total 256 > > -r-xr-xr-x 1 root admin 48092 Feb 22 17:48 daemondo > > -r-xr-xr-x 1 root admin 65403 Feb 22 17:48 port > > lrwxr-xr-x 1 root admin 19 Feb 22 17:48 portf -> /opt/local/bin/ > > port > > -r-xr-xr-x 1 r

Re: Running Django locally on Mac OS X, error with database connection

2007-02-23 Thread Joseph Heck
t; Django rather than install via SVN--should I bother setting up the SVN > if I'm just learning it? > > Thanks once more! > > On Feb 23, 4:05 pm, "Joseph Heck" <[EMAIL PROTECTED]> wrote: > > The django that's currently installed is installed with the

Re: Running Django locally on Mac OS X, error with database connection

2007-02-26 Thread Joseph Heck
TH=/opt/local/bin:/opt/local/sbin:$PYTHONBIN:$PATH > > benjamin-chaits-powerbook-g4-15:~ benjaminchait$ /usr/local/bin/python > -V > Python 2.4.3 > > And trying to run "/opt/local/bin/python -V" results in: > -bash: /opt/local/bin/python: No such file or directory > > On F

Re: Generate a tree List...

2007-02-28 Thread Joseph Heck
The templates don't support that kind of functionality directly. You'll probably want to create your own template tag that will do for you - you can recurse to your heart's content in Python. Check out the docs at http://www.djangoproject.com/documentation/templates_python/ for a good overview. Ma

Re: "cannot import" errors when doing an import of an app's models

2007-02-28 Thread Joseph Heck
I got a bit lost on what paths changed where - post your PYTHONPATH, DJANGO_SETTINGS_MODULE, and the path to where your code is and it should become more clear. -joe On 2/28/07, CosyGlow42 <[EMAIL PROTECTED]> wrote: > > > I'm a newbie to the Django/Python world and are looking for answers to > a

Re: Django apps

2007-02-28 Thread Joseph Heck
http://code.djangoproject.com/wiki/DjangoPoweredSites has quite a list... although I expect you're looking more for the resources list on http://code.djangoproject.com/wiki/DjangoResources -joe On 2/28/07, Alessandro Ronchi <[EMAIL PROTECTED]> wrote: > > > Is there any place where I can find dj

Re: how can i find a full source code for complete django

2007-02-28 Thread Joseph Heck
You can also look into http://code.djangoproject.com/wiki/DjangoResources -joe On 2/28/07, Nathan R. Yergler <[EMAIL PROTECTED]> wrote: > > > On 2/28/07, Mary <[EMAIL PROTECTED]> wrote: > > > > thank you for the quick reply > > I went the 1st link in the search which was > > > http://www2.jeffcro

Re: "cannot import" errors when doing an import of an app's models

2007-03-02 Thread Joseph Heck
set? -joe On 2/28/07, CosyGlow42 <[EMAIL PROTECTED]> wrote: > > > > > On Mar 1, 11:51 am, "Joseph Heck" <[EMAIL PROTECTED]> wrote: > > I got a bit lost on what paths changed where - post your PYTHONPATH, > > DJANGO_SETTINGS_MODULE, and the path to where yo

Re: Getting up and running

2007-03-02 Thread Joseph Heck
it looks like you don't have the prerequisites that Django needs already installed. Check the docs at http://www.djangoproject.com/documentation/install/ - it'll point you to http://initd.org/tracker/psycopg where you can get the libraries for python to talk with PostgreSQL. -joe On 3/2/07, [EMA

Re: openId cookbook updates?

2007-03-05 Thread Joseph Heck
I riffed off those directions and the Zyon's code, but I found that the Zyon's code really didn't help me that much - I think it was written to an earlier version of the openID libraries from Janrain. Anyway, I used the request.session and a store built in to Postgres for my implementation. Determ

Re: QuerySet's get() method in template?

2007-03-05 Thread Joseph Heck
You would want a custom tag (or filter) for that. I typically set it up to process that through views, but most of our work is done in the views and we've not expressed a huge amount of work in the custom tags. -joe On 3/5/07, akonsu <[EMAIL PROTECTED]> wrote: > > > hello, > > can a template invo

Re: Any known issues with ChangeManipulators and large objects?

2007-03-12 Thread Joseph Heck
Kudo's to Ivan - It's a pretty good answer. I think the metaphor breaks down when you get to >1000 items that could pop up in a select field, but at least you don't get his when just using a plain-jane manipulator with this fix. I think I'll stick with the tendency towards using raw_id_admin=True

Re: low performance of FastCGI deployment

2007-03-12 Thread Joseph Heck
Have you done any profiling to see where your bottlenecks are? There's a decent set of notes on profiling Django at http://code.djangoproject.com/wiki/ProfilingDjango and an even greater writeup at http://www.rkblog.rk.edu.pl/w/p/django-profiling-hotshot-and-kcachegrind/. Apache+Mod_Python and Lig

Re: Django keeps growing, performance keeps dropping

2007-03-12 Thread Joseph Heck
Take a shot at enabling the profiling (Jeremy provided a link a few msgs back) - it'll give you a huge amount of detail. -joe On 3/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Well crud. My host won't turn on slow query logging. So, if you know > you've got a bunch of not-so-good que

Re: Connection reset by peer error on POST content longer than about 6k chars...

2007-03-16 Thread Joseph Heck
The django development server isn't multithreaded by default, and it's probably having some trouble serving back the files. There were some hacks/mods on this last a few months back talking about how to change the dev server so that it was multithreaded and make it a tad more reliable. I'm afraid

Re: postgesql commit problem?

2007-03-16 Thread Joseph Heck
Try: transaction.commit_unless_managed() I originally found it in the django scripts code ( http://code.djangoproject.com/browser/django/trunk/django/bin/daily_cleanup.py), and it forces a commit when you're not under transaction management. I never found any references to it in the documentation

Re: a very slow view, > 30secs to load

2007-03-29 Thread Joseph Heck
You can also whack together a quick Python logger to do the logging, which is what we've done in the past. Some example code for you: in the __init.py__ for the views (so the logger can be used anywhere) from django.conf import settings import logging # Grabs or creates a new logging object wit

Re: development version

2007-04-02 Thread Joseph Heck
If you use the current trunk, don't be surprised if changes are made that you have to react to when you get an update on it. It's good stuff, but if you're not willing to track it as you update and change/fix things appropriately, you'd be much better off getting a "release" version. That "bleedin

Re: Updating Django .95 -> .96 on Mac

2007-04-10 Thread Joseph Heck
I found the same thing - easiest solution is to remove the old egg. I had to do this on all the systems (Linux, Win32, and Mac) when we upgraded from 0.95 to 0.96. If you're unsure where it's stashed, run python interactively and use the following the find out: import sys import pprint pprint.ppr

Re: Django on Windows for an intranet site

2007-04-19 Thread Joseph Heck
If you're new to Django, I'd generally recommend that you stick with released versions. Fewer things changing on you while you're learning. If you like diving in the deep end, the trunk is good - just be aware you'll be spending more time/energy with it. It's reasonably stable, but API changes are

Re: QUESTION .-

2007-04-24 Thread Joseph Heck
It isn't immediately available through the django setup - it expects that all accesses to the database from any given application will happen from a single userid that you (typically) specify in settings.py. There's nothing from stopping you opening your own cursors and doing what you want with ot

Re: Whether 2G RAM dedicated server could support a django site with 190 reqs/sec?

2007-04-27 Thread Joseph Heck
rah, rah, rah - I'll just pile on with the VPS solutions - but with the obvious addition: TEST IT. It's pretty straightforward to get the processing time, including the time of the queries, using all the django goodness that's already in place. At 20 page requests a second that aren't static/cache

Re: Custom django importing

2007-04-27 Thread Joseph Heck
Get rid of the copy in sites-package is the easiest solution - then just make sure the local copy is on your sys.path (PYTHONPATH). -joe On 4/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Hi > > I 'm in situation that I have a django directory and every time I > start django, it will

Re: Whether 2G RAM dedicated server could support a django site with 190 reqs/sec?

2007-04-27 Thread Joseph Heck
mother > company, Spry). If so, I'd have to second your choice, I have yet to find a > better host. > > On 4/27/07, Joseph Heck <[EMAIL PROTECTED]> wrote: > > > > rah, rah, rah - I'll just pile on with the VPS solutions - but with the > > obvious a

Re: Mac OS X + Django; how do I invoke the fcgi?

2007-04-30 Thread Joseph Heck
Hi Mark, Your question doesn't leave enough detail to really fill in an answer. Which instructions did you use (the URL), and where is it failing? If you've got Django set up with FCGI, you're probably routing the requests through either the built-in Apache server or something like Lighttpd or NGi

Re: Mac OS X + Django; how do I invoke the fcgi?

2007-04-30 Thread Joseph Heck
n the server is running, I move to another workstation and open > the browser. Then I enter URL that is mapped to that server, e.g. > dev.mophilly.com. The web server returns the main page. With that I > want to open the Django admin pages to make things are working. > > - Mark > > O

Re: Using Django outside of Django

2007-04-30 Thread Joseph Heck
Setting your python path in the environment and importing away works very well for me. I used django components frequently outside of the web interface, often driven by cron, to do background tasks. django-admin.py shell is handy, but I get as much from just setting up my environment and invoking

Re: How to open a new page with a bookmark

2007-05-01 Thread Joseph Heck
Maybe I'm missing something, but there's nothing specific in this example to Django - you would reference a link from within any page the same way as plain ole HTML. and then link to it with an Jump to foo. -joe On 5/1/07, Pythoni <[EMAIL PROTECTED]> wrote: > > > Let's suppose I have, in o

Re: Django on EC2 and S3

2007-05-02 Thread Joseph Heck
You've pretty well nailed "issues with hosting on EC2" on the head. Some companies (non-Django related) are doing it, and they're backing up their databases to S3 and maintain a permanent proxy on dedicated hardware external to EC2 (as opposed to dyndns). To my knowedlge, there's not been much hea

Re: Is it possible to redirect with POST data?

2007-05-03 Thread Joseph Heck
No - redirect sends information back to the browser that causes the browser to make another request - GET style attributes can be easily included in there, but the "aside" kind of data that you have in a POST is not sent back. The closest you could get from a server side type of operation is some

Re: Mac OS X + Django; how do I invoke the fcgi?

2007-05-05 Thread Joseph Heck
we'll nail it down. -joe On 5/5/07, Mark Phillips <[EMAIL PROTECTED]> wrote: > > > On Apr 30, 2007, at 11:16 AM, Joseph Heck wrote: > > > django-fcgi.py --settings=myproject.settings --host 127.0.0.1 -- > > port 8882 --daemon) > > and that you didn't

Re: How to render newforms dynamically created fields?

2007-05-05 Thread Joseph Heck
A site I frequently work with has the forms mostly laid out using and CSS to style it up all nicely. The newforms doesn't have a as_dl method, and my designer is pitching a bit of fit that we can't give him the pieces/parts of the form to lay out with a more complex setup. When I looked into it,

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

2007-05-06 Thread Joseph Heck
I'm missing the connection in newforms to get to the pieces I want to manipulate in the templates. I have a newform with a single ChoiceField, set up with a RadioSelect() widget: example_choices = ((1,'a'), (2,'b'), (3,'c'),)

Re: Mac OS X + Django; how do I invoke the fcgi?

2007-05-06 Thread Joseph Heck
else, you should be using the same version of python for both development and running the project under fastcgi -joe On 5/6/07, Mark Phillips <[EMAIL PROTECTED]> wrote: > > On May 5, 2007, at 11:04 PM, Joseph Heck wrote: > > > Post what you have as your PYTHONPATH and th

Re: How to render newforms dynamically created fields?

2007-05-06 Thread Joseph Heck
basis to try and dive in here is: http://code.djangoproject.com/browser/django/trunk/tests/regressionte... On 5/6/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sat, 2007-05-05 at 23:13 -0700, Joseph Heck wrote: > > A site I frequently work with has the forms mostly l

Re: How to render newforms dynamically created fields?

2007-05-06 Thread Joseph Heck
Missed that final link: http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L643 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: How to render newforms dynamically created fields?

2007-05-06 Thread Joseph Heck
templates seems obvious once you know it, but a real pain to figure out before that. -joe On 5/6/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > Hey Joe, > > On Sun, 2007-05-06 at 21:13 -0700, Joseph Heck wrote: > > Actually, my example is sort of specific. I got the a

Re: CSS

2007-05-06 Thread Joseph Heck
The same way you'd include CSS in any general HTML file, there's nothing magic happening there with Django. We use both: in the header, and: - whatever makes the most sense for you, have at. We take advantage of {{ media_url }} in ours

Re: Need some help with Amazon S3

2007-05-06 Thread Joseph Heck
No idea about question #2 - it was my impression that S3 was a stateless mechanism and didn't support the concept of streaming, but I haven't read all that much about it, so I could easily be wrong. #1 is probably best resolved by taking advantage of the S3 REST interface and plugging that in to

Re: Translation of class names

2007-05-07 Thread Joseph Heck
Do you want your site to be mixed language, or always in Russian? Assuming you want the first, there's good instructions at http://www.djangoproject.com/documentation/i18n/. Make sure you have the middleware included and running, and then take advantage of the url/view setup to explicitly change

Re: is this a template bug?

2007-05-07 Thread Joseph Heck
My first thought is "what's in {{ item.inleiding }}". If it included the , then it would be displayed when you rendered that down. Do something like: {{ item.inleiding|escape }} to isolate that element and see what "pops out". On 5/7/07, Enquest <[EMAIL PROTECTED]> wrote: > > Consider the fo

  1   2   3   >