Re: What happened to django-updates?

2008-04-14 Thread James Bennett
On Mon, Apr 14, 2008 at 10:43 AM, John-Scott <[EMAIL PROTECTED]> wrote: > There hasn't been any updates on the django-updates mailing list since > March 18. At the time, someone on IRC said they thought it was due to > the traffic from the sprint but that was a month ago. I am tracking > trunk

Re: Enterprise applications with Django

2008-04-16 Thread James Bennett
On Wed, Apr 16, 2008 at 8:05 AM, Hussein B <[EMAIL PROTECTED]> wrote: > Is it possible to create enterprise applications (in the same context > of Java EE applications, highly concurrent, distributed ...) with > Python? Google seems to manage it... -- "Bureaucrat Conrad, you are technically

Re: mail in base64

2008-04-17 Thread James Bennett
On Thu, Apr 17, 2008 at 10:16 PM, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > (1) What version of Django are you using (the mail infrastructure has > changed a bit between 0.96 and trunk, from memory)? He was using Django 0.96, and running into this (fixed on trunk) issue: http://code.djan

Re: how do designers create content

2008-04-19 Thread James Bennett
On Sun, Apr 20, 2008 at 1:33 AM, lee <[EMAIL PROTECTED]> wrote: > designers. Do the designers use text base editting like ultraedit or > or graphics based software like dreamweaver? Most of the artist I know > don't do much coding and are into photoshop, illustrator and > dreamweaver. Most of

Re: 'dict' object has no attribute 'autoescape'

2008-04-23 Thread James Bennett
On Wed, Apr 23, 2008 at 6:59 PM, falcon <[EMAIL PROTECTED]> wrote: > 94. if (context.autoescape and not isinstance(output, > SafeData)) or isinstance(output, EscapeData): Right there's your problem. you've ended up passing a plain dictionary someplace where Django was expecting you to

Re: Disabling autoescaping when calling render_to_string

2008-04-26 Thread James Bennett
On Sat, Apr 26, 2008 at 9:38 PM, Darryl Ross <[EMAIL PROTECTED]> wrote: > So my question is, is there an argument which will disable auto-escaping? > If not, would there be some merit to adding some functionality that allows > this, either as an argument or perhaps to make the auto-escaping only

Re: Updating django forms makes me...

2008-04-27 Thread James Bennett
On Sun, Apr 27, 2008 at 7:17 AM, notfound <[EMAIL PROTECTED]> wrote: > No, that's a hosted server, I don't have access to Apache > unfortunately. Is there any other way I could make it reload the code? Not really, no. In a production deployment, the code stays resident in memory for the life of

Re: SUM on a model

2008-04-27 Thread James Bennett
On Sun, Apr 27, 2008 at 8:47 AM, Darryl Ross <[EMAIL PROTECTED]> wrote: > I use: > >total = sum([obj.amount for obj in Model.objects.all()]) As of the merge of qsrf, this will also work: total = sum(Model.objects.values_list('amount', flat=True)) Plus there's the SoC project which will

Re: Updating django forms makes me...

2008-04-27 Thread James Bennett
On Sun, Apr 27, 2008 at 10:28 AM, notfound <[EMAIL PROTECTED]> wrote: > What could be the reason here that it sometimes works, sometimes does not? Multiple server processes; each one has its own copy of the code, and refreshes independently. -- "Bureaucrat Conrad, you are technically correct

Re: Odd Multi Select Behavior

2008-04-27 Thread James Bennett
On Sun, Apr 27, 2008 at 1:39 PM, Alex Ezell <[EMAIL PROTECTED]> wrote: > but if I log the value of "request.POST['point_list']" I see this: > > 37​.​4482804​,-​122​.​12251 > > It's like it doesn't know that it's a list. This makes it problematic > to do anything with the values in point

Re: Queryset-refactor branch has been merged into trunk

2008-04-28 Thread James Bennett
On Mon, Apr 28, 2008 at 8:32 AM, Juanjo Conti <[EMAIL PROTECTED]> wrote: > Could you give me a url where new features are explained? > Is this backwards compatible or should I svn up with care? Well, there's the wiki page Malcolm linked up in his original post... -- "Bureaucrat Conrad, you a

Re: Django on Jython - anybody doing it?

2008-04-30 Thread James Bennett
On Wed, Apr 30, 2008 at 9:44 PM, rich <[EMAIL PROTECTED]> wrote: > More out of curiosity than anything else, is anybody using Django on > Jython? Several people are, and are actively involved in improving both Jython and Django to work better together; a number of bugs have been reported to bot

Re: Backwards incompatibility with fancy PostgreSQL queries and QS-RF

2008-04-30 Thread James Bennett
On Wed, Apr 30, 2008 at 11:43 PM, Barry Pederson <[EMAIL PROTECTED]> wrote: > any thoughts on the best way to do this now with QS-RF? Well, the official database API docs say [1]: "In some rare cases, you might wish to pass parameters to the SQL fragments in extra(select=...)`. For this purpose

Re: persistence of variable in views.py

2008-05-01 Thread James Bennett
On Thu, May 1, 2008 at 1:23 AM, skunkwerk <[EMAIL PROTECTED]> wrote: > I have a variable defined by a function call in my views.py that's at > the global level at the start of the file (ie is not inside any other > function, though the variable is not prefixed by 'global'). As this > takes a

Re: HEAD requests causing AttributeError

2008-05-01 Thread James Bennett
On Thu, May 1, 2008 at 4:39 AM, omat <[EMAIL PROTECTED]> wrote: > I don't see why someone / something is hitting with HEAD requests. Can > it be a security issue? No, it's not a security issue. It probably means you've enabled the middleware view-documentation middleware ("django.middleware.doc

Re: django-tagging doesn't work with qs-ref

2008-05-02 Thread James Bennett
On Fri, May 2, 2008 at 1:05 PM, bcurtu <[EMAIL PROTECTED]> wrote: > How can I solve this parse_lookup problem? > Cheers Have you considered looking at that project's bug tracker? http://code.google.com/p/django-tagging/issues/detail?id=106&can=1&q=queryset-refactor -- "Bureaucrat Conrad, yo

Re: child edit causes duplication with model inheritance

2008-05-04 Thread James Bennett
On Sun, May 4, 2008 at 12:58 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > if you add an "A" object then edit it and hit save it duplicates > itself. Does anyone else have this trouble with model inheritance? The admin does not currently support model inheritance. This is a known and docum

Re: child edit causes duplication with model inheritance

2008-05-04 Thread James Bennett
On Sun, May 4, 2008 at 3:29 AM, bobhaugen <[EMAIL PROTECTED]> wrote: > Does that mean newforms-admin includes qs-ref? That is, newforms- > admin includes all of the most current svn trunk? The ideal way to find out this sort of information is to watch the development timeline: http://code.dja

Re: /admin Cross-Site Scripting (XSS) issue!

2008-05-07 Thread James Bennett
On Wed, May 7, 2008 at 12:31 PM, Chunlei Wu <[EMAIL PROTECTED]> wrote: > /admin/index.php/%22%3E%3Cscript%3Ealert%283939%29%3C/script%3E/ > > I am surprised the passed javascript code is indeed executed. Can > somebody verify that? Is it a big threat? Which version of Django is this happening

Re: Django equivilent of PHP date in templates.

2008-05-07 Thread James Bennett
On Wed, May 7, 2008 at 2:06 PM, DuncanM <[EMAIL PROTECTED]> wrote: > Would I have to create a template tag, or is there anyway of just > sticking it straight into the template? > > Something similar to what the following php returns: > date("F j, Y"); You probably want to read the list of bui

Re: /admin Cross-Site Scripting (XSS) issue!

2008-05-07 Thread James Bennett
On Wed, May 7, 2008 at 1:45 PM, mw <[EMAIL PROTECTED]> wrote: > It worked for me and I have one of the fairly recent copies from SVN. > (not like today up to date, but pretty up to date) Visiting the precise URL he pasted, in current Django trunk (SVN revision 7514), I get a 404. And I can't s

Re: /admin Cross-Site Scripting (XSS) issue!

2008-05-07 Thread James Bennett
On Wed, May 7, 2008 at 2:51 PM, Richard Dahl <[EMAIL PROTECTED]> wrote: > Excellent, good catch, when logged out it does indeed display the > alert, I image it has to do with the 'next' property, which is not, I > believe, escaped, as it is not entered into the DB or presented to any > other u

Re: /admin Cross-Site Scripting (XSS) issue!

2008-05-07 Thread James Bennett
Also, for future reference, please remember that if you think you've found a security problem in Django the correct action is to send email to [EMAIL PROTECTED] -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~

Re: /admin Cross-Site Scripting (XSS) issue!

2008-05-07 Thread James Bennett
On Wed, May 7, 2008 at 3:18 PM, Richard Dahl <[EMAIL PROTECTED]> wrote: > If I said that this condition is indicative of an XSS attack vector I > may as well say that Apache is vulnerable to a Denial of Service > attack because 'after I ran apachectl stop, I could no longer get to > my website

Re: Group by for querysets

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

Re: Handle on request object from custom tag

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

ANNOUNCE: Security bugfix releases

2008-05-13 Thread James Bennett
In accordance with our security policy[1], a set of releases is being issued tonight to fix a security vulnerability reported to the Django project. This message contains a description of the vulnerability, a description of the changes made to fix it, pointers to the the relevant patches for each

Re: IntegerField - SQL type changed?

2008-05-15 Thread James Bennett
On Thu, May 15, 2008 at 5:34 AM, Amit Ramon <[EMAIL PROTECTED]> wrote: > Was there any change in django in the recent months that could explain this? > Namely, could it be that a couple of months ago django would indeed generate > a varchar(20) for this field, and now it generates int(11)? I'll

Re: how to avoid uploading .py source files to shared hosting server

2008-05-16 Thread James Bennett
On Fri, May 16, 2008 at 5:02 AM, ydjango <[EMAIL PROTECTED]> wrote: > I have propriety commercial code and some formula/ algo > implementations which I do not want to expose. > Hence I do not want to upload .py source files If your host's setup would allow other users to view this code, you have

Re: how to avoid uploading .py source files to shared hosting server

2008-05-16 Thread James Bennett
On Fri, May 16, 2008 at 9:15 AM, ydjango <[EMAIL PROTECTED]> wrote: > Yes, that was another thing on my mind, how to encrypt password in > settings.py You don't. I think either you misunderstand how shared hosting works, or you have an extremely bad host. -- "Bureaucrat Conrad, you are technic

Re: how to avoid uploading .py source files to shared hosting server

2008-05-16 Thread James Bennett
On Fri, May 16, 2008 at 11:52 AM, ydjango <[EMAIL PROTECTED]> wrote: > I do not want to make it easy for some one who breaks in , either a > outsider or may be an rougue hosting provider employee or contractor, > to easily get access to all the information - data and code. Again: if this is your

Re: Legacy Databases - custom filter?

2008-05-18 Thread James Bennett
On Sun, May 18, 2008 at 4:10 PM, Dougal <[EMAIL PROTECTED]> wrote: > How would I then do this SQL manually? I know writing SQL is to be > avoided but is there an easy way to execute SQL commands? Writing SQL is *not* to be avoided. Using an ORM is basically a trade-off, where some things are supp

Re: Printing out HTML that doesn't get converted to

2008-05-18 Thread James Bennett
On Mon, May 19, 2008 at 12:51 AM, Tomás Garzón Hervás <[EMAIL PROTECTED]> wrote: > I think, you use the {% autoescape off %} text to escape {% endautoescape %} > Search more information of autoescape en django documentation Turning autoescaping on and off for large sections of a template is a sor

Re: Django experts wanted

2008-05-19 Thread James Bennett
On Mon, May 19, 2008 at 10:56 AM, Jim R. Wilson <[EMAIL PROTECTED]> wrote: > I am compiling a contact list of Django experts who may be interested > in opportunities under the right circumstances. I am not a recruiter > - I'm a regular developer who sometimes gets asked for referrals when > I'm n

Re: "request"object within models.py

2008-05-19 Thread James Bennett
On Mon, May 19, 2008 at 3:24 PM, enri57ar <[EMAIL PROTECTED]> wrote: > How access to request object within models ? Pass it as an argument the same as any other value. Magical hacks to try to make it available otherwise are likely to land you in trouble later on. -- "Bureaucrat Conrad, you are

Re: "request"object within models.py

2008-05-19 Thread James Bennett
On Mon, May 19, 2008 at 3:45 PM, Richard Dahl <[EMAIL PROTECTED]> wrote: > how do you pass the request object to models? Same way you pass any argument to any function or method in Python: write your function/method to accept the argument, and pass it from the code that calls the function/method.

Re: "request"object within models.py

2008-05-19 Thread James Bennett
On Mon, May 19, 2008 at 4:10 PM, Tim Chase <[EMAIL PROTECTED]> wrote: > It's the last bit that can throw folks...many folks seem to use > very nice/helpful bits of the framework that abstract the save() > call so it's never thought-about. Wouldn't adding a parameter to > save() stymie the admin a

Re: user.is_authenticated is always false using default login

2008-05-20 Thread James Bennett
On Tue, May 20, 2008 at 10:32 AM, Andrew English <[EMAIL PROTECTED]> wrote: > Do I need to explicitly call authenticate and login in my own view to > populate the user data? From what I read, it seems that the > django.contrib.auth.views.login does that automatically. There's a difference betwee

Re: Authentication for whole app

2008-05-20 Thread James Bennett
On Tue, May 20, 2008 at 7:14 PM, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > If you want to use HTTP Basic authentication, then put everything > under/behind Apache and use Apache to do it. If you want to use form > based authentication with same user database across all applications > gets a bi

Re: Authentication for whole app

2008-05-20 Thread James Bennett
On Tue, May 20, 2008 at 8:57 PM, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > Let me ask my own question then. If one is running multiple Django > instances, does Django provide anything that would help with single > sign on (SSO) across all the distinct Django application instances? Well, they

Re: Authentication for whole app

2008-05-20 Thread James Bennett
On Tue, May 20, 2008 at 9:11 PM, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > But is it true SSO? If they're all on the same domain or subdomains of the same domain, and you do the cookies right, it is. If they're not all on the same domain (or authentication realm for Apache-based auth), there

Re: Reusable models?

2008-05-21 Thread James Bennett
On Wed, May 21, 2008 at 12:29 PM, Aidas Bendoraitis <[EMAIL PROTECTED]> wrote: > One use case could be, for example, > the Institution model with title and description fields in project A, > then the Institution model with title, description, and address fields > in project B, > and then the Insti

Re: User.get_profile() (was: Re: Reusable models?)

2008-05-21 Thread James Bennett
On Wed, May 21, 2008 at 2:00 PM, Jeremy Bornstein <[EMAIL PROTECTED]> wrote: > This brings up something I don't quite get: Django provides > user.get_profile(), but the ORM makes it just as easy to say > user.userprofile (assuming your profile model is called > "UserProfile"). Is there any reason

Re: New Django Site

2008-05-21 Thread James Bennett
On Wed, May 21, 2008 at 3:27 PM, Bret W <[EMAIL PROTECTED]> wrote: > There are several more complex surveys and sites for this type of > information, but none that are quick and easy. No comment on technical aspects, but do bear in mind that: 1. Many employers forbid employees to disclose this i

Re: Authenticated user from models.py

2008-05-21 Thread James Bennett
On Wed, May 21, 2008 at 7:35 PM, Juanjo Conti <[EMAIL PROTECTED]> wrote: > Ugly. Is this the only way? Sigh. No, "ugly" is magical global variables and things that appear out of thin air. Code that's clean and understandable, where you can clearly see where everything comes from and what it's d

Re: Authenticated user from models.py

2008-05-21 Thread James Bennett
On Wed, May 21, 2008 at 8:23 PM, Patrick J. Anderson <[EMAIL PROTECTED]> wrote: > Passing a Request object should work in application views, but what if > one wants to capture that information on every save() call, including in > the admin? > > What would be an elegant and beautiful approach to so

Re: Avoiding code duplication with many similar models

2008-05-25 Thread James Bennett
On Sun, May 25, 2008 at 10:13 PM, Trevor Caira <[EMAIL PROTECTED]> wrote: > So while it is possible to do this with model inheritence, at least > the most obvious solution involves a lot of code duplication. A situation like this is often an indicator that you haven't sufficiently abstracted what

Re: How to Implement "Most Viewed"?

2008-05-25 Thread James Bennett
On Sun, May 25, 2008 at 9:08 PM, jonknee <[EMAIL PROTECTED]> wrote: > Unless you cache the view. Just update it once an hour/day. You still have to record the raw number of hits somewhere. Doing this in the database, in real time, is often not possible because it does lead to one write per page v

Re: hanging os.system() when doing pdf generation

2008-05-27 Thread James Bennett
On Tue, May 27, 2008 at 11:05 AM, Milan Andric <[EMAIL PROTECTED]> wrote: > Worked just fine from the interpreter but I noticed some stuff being > returned on stdout (same as on cmd line). So I added the --quiet > option to htmldoc and now it seems fine and returns 0 in the > interpreter. Maybe

Re: may be BUG. SyntaxError: non-keyword arg after keyword arg

2008-05-28 Thread James Bennett
On Wed, May 28, 2008 at 4:32 AM, sector119 <[EMAIL PROTECTED]> wrote: > Is it a bug, or I misunderstood something in filter usage? It looks like you have stray whitespace or line breaks in the middle of things which should be continuous text. This would, naturally, lead to strange behavior. For e

Re: Django and Comma-Formatting Numbers

2008-05-29 Thread James Bennett
On Thu, May 29, 2008 at 1:15 PM, David <[EMAIL PROTECTED]> wrote: > I had need of commas in floating-point numbers, and slightly modified > humanize.py with a floatcomma function: > > def floatcomma(value): >""" >Converts a float to a string containing commas every three digits. >For e

Re: local import or not for django apps?

2008-05-30 Thread James Bennett
On Thu, May 29, 2008 at 4:06 PM, Milan Andric <[EMAIL PROTECTED]> wrote: > Anyone happen to have a strong opinion on this? Should django > applications use local imports or package based imports? Sorry if > this has been mulled over a million times. Applications should expect to live on the Pyt

Re: Method .cache() for QuerySet

2008-06-02 Thread James Bennett
On Mon, Jun 2, 2008 at 11:58 AM, Marinho Brandao <[EMAIL PROTECTED]> wrote: > Meanwhile, I am not sure if it is safe as I need, so, I wish to know > your opinion about it: Review of patches proposed for Django should take place in the Django ticket tracker; djangosnippets is not the appropriate p

Re: How nicely does django play in a distributed environment?

2008-06-02 Thread James Bennett
On Mon, Jun 2, 2008 at 7:06 AM, Phillip B Oldham <[EMAIL PROTECTED]> wrote: > I'm looking at using django to replace our current CMS application > written in PHP. Currently we have two servers behind a load balancer, > and everything's nice and stable. We're getting a consistent month-on- > month

Re: How to import ModelForm Dynamically?

2008-06-02 Thread James Bennett
On Mon, Jun 2, 2008 at 9:06 AM, David.D <[EMAIL PROTECTED]> wrote: > views.py > == > def model_form(request, model_name): >form_class = __import__('products.models.%sForm'%model_name) >form = form_class() >... > > model_name is a string Unless you really grok how __import__() work

Re: "Includes" directory?

2008-06-02 Thread James Bennett
On Mon, Jun 2, 2008 at 1:29 PM, Huuuze <[EMAIL PROTECTED]> wrote: > I'm new to Django, so please be gentle. Basic question: when > developing a web app, I've typically created an "includes" directory > which stores commonly used functions or methods. From a best practice > standpoint, is it reco

Re: auto admin for production

2008-06-03 Thread James Bennett
On Tue, Jun 3, 2008 at 11:54 AM, pihentagy <[EMAIL PROTECTED]> wrote: >> Currently the admin interface doesn't handle row-level permissions. A >> user can be granted to edit articles, but not restricted to only their >> own. I *believe* this is a feature that will be added in newforms-admin. > > C

Re: why do i have to add this to Apache?

2008-06-03 Thread James Bennett
On Tue, Jun 3, 2008 at 2:17 PM, <[EMAIL PROTECTED]> wrote: > why is this necessary? do i have to do this for every project? > testproject.settings implies i do. You probably want to research how mod_python works in order to understand what the configuration directives are and which ones are nece

Re: django + google appengine?

2008-06-03 Thread James Bennett
On Tue, Jun 3, 2008 at 4:02 PM, <[EMAIL PROTECTED]> wrote: > google appengine seems like a good place to start, then i dont have to > get my own servers and stuff. > > is this easy integrateable? or doesnt google appengine and django work > together? There are a number of articles and tutorials

Re: why so slow?

2008-06-03 Thread James Bennett
On Tue, Jun 3, 2008 at 4:00 PM, <[EMAIL PROTECTED]> wrote: > im running part 2 of the tutorial right now and im inside the admin. > when connecting to localhost it is s slow, why? If you need to have a running dialogue with someone who can help you as you walk through the tutorial, consider

Re: Can Someone Do something about ALL THIS SPAM

2008-06-05 Thread James Bennett
Guys, this has been covered before, multiple times. But once more, with feeling: * The list is run through Google Groups, so Google's spam filtering is what's applied. * The way to train Google's spam filter is to use their spam-reporting mechanism. * The alternative to this is to start moderatin

Re: Caching question

2008-06-05 Thread James Bennett
On Thu, Jun 5, 2008 at 3:05 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I've read the caching documentation several times, but must be missing > some fine points. If I have > CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True > set, does per-view or template fragment caching override that? If you have

Re: Caching question

2008-06-06 Thread James Bennett
On Fri, Jun 6, 2008 at 2:11 PM, Peter Rowell <[EMAIL PROTECTED]> wrote: > I'm a little confused. The docs (http://www.djangoproject.com/ > documentation/middleware/#django-middleware-cache-cachemiddleware) > say, and the code appears to support it, that if > django.middleware.cache.CacheMiddleware

Re: ORM question

2008-06-06 Thread James Bennett
On Fri, Jun 6, 2008 at 6:57 PM, Dan W. <[EMAIL PROTECTED]> wrote: > I'm pretty new to django and so far so good except for one thing. When I > fetch model objects, their related objects are showing up as RelatedManager > and ManyRelatedManager objects intead of the types I created and modified in

Re: django programming project

2008-06-06 Thread James Bennett
On Fri, Jun 6, 2008 at 7:55 PM, david.watson <[EMAIL PROTECTED]> wrote: > I have a relatively simple django project that I need to get done. > I'm an experienced software engineer, but I don't have the cycles to > do this myself. I have, however, carefully thought out the > requirements and desig

Re: I need outsourcing

2008-06-06 Thread James Bennett
Once again: Please route job listings to djangogigs.com. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To p

Re: Django Suitable for this?

2008-06-08 Thread James Bennett
On Sun, Jun 8, 2008 at 1:05 AM, beetlecube <[EMAIL PROTECTED]> wrote: > I read a blog entry somewhere by someone contemplating the ideal type > of web application needs that Django best meets: Since it was > written originally for publishing articles in a newspaper environment, > it's good for b

Re: "more than 1 ForeignKey" error in newforms-admin

2008-06-09 Thread James Bennett
On Mon, Jun 9, 2008 at 2:08 PM, Andre Meyer <[EMAIL PROTECTED]> wrote: > i have a model with a class that has a foreign key and a subclass that has > another. this works well for creating the database, but the admin does not > like it. I believe your problem is that support for hierarchies of sub

Re: Painfully slow... why?

2008-06-10 Thread James Bennett
On Tue, Jun 10, 2008 at 7:42 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > At the risk of talking to myself, I may have found the cause of my > slowdowns: KeepAlive. Setting it OFF has -- so far -- made a HUGE > performance improvement. More than I saw from memcached, or anything > I've done

Re: SQLobject vs SQLAlchemy

2008-06-12 Thread James Bennett
On Fri, Jun 13, 2008 at 1:15 AM, Pepsi330ml <[EMAIL PROTECTED]> wrote: > i shall go read more about SqlObject then. If you're planning to use Django, and if you do not already have a very strong attachment to another ORM, consider just using the one that comes with Django. It will make your life

Re: Django Tutorial Clarification

2008-06-13 Thread James Bennett
On Fri, Jun 13, 2008 at 2:24 AM, wave connexion(BQ) <[EMAIL PROTECTED]> wrote: > Does this mean Django generated API code for you? No. The phrase "no code generation necessary" means precisely what it says: that, unlike some frameworks which require you to run a script which generates files of co

Re: django-registration with my custom user profile

2008-06-13 Thread James Bennett
2008/6/13 Chr1s <[EMAIL PROTECTED]>: > But still I don't know how to implement this, anyone could give me a > simple example? thanks very much This feature is intended for a situation where each of the following is true: 1. You have a custom user-profile model. 2. The user-profile model has been

Re: Roadmap to 1.0 and internationalization in db

2008-06-13 Thread James Bennett
On Fri, Jun 13, 2008 at 5:38 PM, Adrián Ribao <[EMAIL PROTECTED]> wrote: > I think I can make this work in three weeks, If I do, could it be > considered for Django 1.0? Since it appears that it wouldn't introduce any backwards-incompatible changes, I'd be against putting it on a 1.0 timeline; it

Re: Extending User model with model inheritance?

2008-06-13 Thread James Bennett
On Fri, Jun 13, 2008 at 10:54 PM, meppum <[EMAIL PROTECTED]> wrote: > With the query refactoring branch being merged to the trunk I wanted > to finally move some of the data I had put on my user profiles to a > derrived user model. I didn't see this mentioned in the documentation > and I wanted to

Re: Disconnected ORM objects

2008-06-13 Thread James Bennett
On Fri, Jun 13, 2008 at 11:01 PM, Karish <[EMAIL PROTECTED]> wrote: > I want to be able to use my ORM objects (eg, EmailMessage, > EmailAddress) in some cases without a database. For example, I want to > write a function like download_email_messages that will download email > messages and return a

Re: simple python math help.

2008-06-15 Thread James Bennett
On Sun, Jun 15, 2008 at 4:36 AM, Jarred Bishop <[EMAIL PROTECTED]> wrote: > it returns '0'. which isnt much help. how do i get '0.5' or '.5' ? This has a very long history, going all the way back to the C programming language (which the Python interpreter is written in, and which many currently-p

Re: problem with forms with db access

2008-06-15 Thread James Bennett
On Sun, Jun 15, 2008 at 7:58 AM, ./ed <[EMAIL PROTECTED]> wrote: > the problem is that when i add an entry to the aModel table it does > not update in the form (even with various reload scheme) > it does update when I 'touch' the python file. So my guess is the > problem lies in the 'compilation'

Re: Use new variables on templates

2008-06-15 Thread James Bennett
On Sun, Jun 15, 2008 at 11:29 AM, Eric Abrahamsen <[EMAIL PROTECTED]> wrote: > One of the things django does for you is make 'settings' available > everywhere. So if you want to use these constants in a template, you > should be able to do this in a view: Er. No, no it doesn't. If you want access

Re: Freelance Django Developers Urgently Needed

2008-06-17 Thread James Bennett
Hey, there, django-users subscribers! This is your periodic friendly reminder that the place for job listings is http://djangogigs.com/, which exists specifically to serve that purpose. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~---

Re: get_models

2008-06-19 Thread James Bennett
On Thu, Jun 19, 2008 at 7:02 PM, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > Short version: See also long version: http://www.b-list.org/weblog/2007/nov/03/working-models/ If these functions were to change, Django itself would need to undergo not-insignificant refactoring. And since such a

Re: get_models

2008-06-19 Thread James Bennett
On Thu, Jun 19, 2008 at 8:01 PM, Marty Alchin <[EMAIL PROTECTED]> wrote: > In fact, I'm confident enough that they're not going anywhere that I'm > in the process of documenting them on dead trees. I already beat you to it, at least partially (got some uses of get_model() in my book). -- "Bure

Re: get_models

2008-06-19 Thread James Bennett
On Thu, Jun 19, 2008 at 9:11 PM, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > This is just one of those areas that we haven't got around to > documenting yet. It doesn't mean we don't want to document this > feature - it just means other things have taken priority. We're always > open to contr

Re: Extending the method that is called the first time a model is deployed.

2008-06-22 Thread James Bennett
On Sun, Jun 22, 2008 at 4:41 AM, mwebs <[EMAIL PROTECTED]> wrote: > It seems as if these signals have to be used in management.py, but > what I need is something I can use directly in my model code. > Something like overloading a method. The fact that this should be > happen in the model-class is

Re: psycopg2

2008-06-24 Thread James Bennett
On Tue, Jun 24, 2008 at 11:28 AM, Will <[EMAIL PROTECTED]> wrote: > All I'm asking for is some reason to trust the integrity of psycopg, > and all I'm getting from you is sarcasm. Perhaps you could provide me > with some links? psycopg is used, happily, by everyone from hobbyists to Fortune 500 c

Re: psycopg2

2008-06-24 Thread James Bennett
On Tue, Jun 24, 2008 at 12:20 PM, Will <[EMAIL PROTECTED]> wrote: > I really didn't want to turn this into a fight, and I apologise if my > posts have seemed inflammatory. I'd just like to be able to trust all > my stack. Well, this is the thing: are you going to this level of detail on *every*

Re: Hooking up Users and Profiles

2008-06-24 Thread James Bennett
On Tue, Jun 24, 2008 at 2:53 PM, radioflyer <[EMAIL PROTECTED]> wrote: > I continue to struggle with what I see as some real limitations of the > User/UserProfile paradigm used by Django. Well, it doesn't cover every conceivable thing you might want to do, which is to be expected; out of the box,

Re: django naming conventions ?

2008-06-25 Thread James Bennett
On Wed, Jun 25, 2008 at 5:02 PM, PFL <[EMAIL PROTECTED]> wrote: > I have done some searching but could not find a set of standard naming > conventions that is recommended for Django objects: There's really not much that's Django-specific; as with most Python code, the recommendation is to follow

Re: psycopg2

2008-06-27 Thread James Bennett
On Fri, Jun 27, 2008 at 3:06 AM, Will <[EMAIL PROTECTED]> wrote: > Would I have to write an entire new backend for postgres, just to use > a different driver? You'd need a module that implements the interface of a Django database adapter while using another driver. A few months ago I saw an artic

Re: psycopg2

2008-06-27 Thread James Bennett
On Fri, Jun 27, 2008 at 6:19 AM, Will <[EMAIL PROTECTED]> wrote: > Ah, sorry. Reading the Django book had led me to believe I was stuck > with psycopg: The change which allows user-defined backends to be plugged in happened after the 0.96 release, so the book is accurate for 0.96. -- "Bureaucr

Re: Need help including a queryset in every view

2008-06-27 Thread James Bennett
On Fri, Jun 27, 2008 at 4:27 PM, Brandon Taylor <[EMAIL PROTECTED]> wrote: > What's the best way to go about this? Obviously I don't want to have > to pass the queryset into the context of every action, in every view > across the entire site :) Same way you make anything accessible to lots of dif

Re: help request using python_twitter api with django and errno 25

2008-06-27 Thread James Bennett
On Fri, Jun 27, 2008 at 11:02 PM, Hani <[EMAIL PROTECTED]> wrote: > My questions are: > 1. can anyone explain the error a little better to me? > 2. Is it a bug in the python-twitter api, or in django, or in my code? > 3. Is there a fix that does not involve using the patch? > 4. If I have to use t

Re: template via email

2008-07-01 Thread James Bennett
On Tue, Jul 1, 2008 at 8:37 PM, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Look at the render_to_string() method for converting templates to > strings: > http://www.djangoproject.com/documentation/templates_python/#the-render-to-string-shortcut And if you end up using a template to generate

Re: django+mod_python, caching or something else?

2008-07-02 Thread James Bennett
On Wed, Jul 2, 2008 at 7:09 AM, Alex Koshelev <[EMAIL PROTECTED]> wrote: > Client-side caching. Use the `never_cache` decorator No, that's not it at all. > On Jul 2, 3:43 pm, Mario <[EMAIL PROTECTED]> wrote: >> I look at sql log - django didn't query that, but always query lists, >> for example:

Re: Using SQLite in production

2008-07-03 Thread James Bennett
On Thu, Jul 3, 2008 at 8:28 PM, Alex Slesarev <[EMAIL PROTECTED]> wrote: > One more issue - if you change a model, then you have to drop database > and recreate it using syncdb (sqlite do not allow modifying tables and > columns). It is not so good for production use. This is not quite correct. S

Re: Create field from two others

2008-07-03 Thread James Bennett
On Thu, Jul 3, 2008 at 8:59 PM, lukeqsee <[EMAIL PROTECTED]> wrote: > > Can you take a first_name & a last_name field and then in the same > model make a field that is full_name? ie > first_name = models.CharField(max_length=75) > last_name = models.CharField(max_length=75) > full_name = models.Ch

Re: not allowing me to login to admin site

2008-07-08 Thread James Bennett
On Tue, Jul 8, 2008 at 4:33 AM, allisongardner <[EMAIL PROTECTED]> wrote: > Will look further into problem as it does not accept any of my user > logins that have been created by the admin site, even though I know i > am using the correct username and password. I do have shell access as > I am usi

Re: Where is the source code for Practical Django Projects?

2008-07-09 Thread James Bennett
On Wed, Jul 9, 2008 at 3:33 AM, Evan H. Carmi <[EMAIL PROTECTED]> wrote: > I am reading Practical Django Projects but am unable to find the online > source code. Does anyone know where this is located? I would think that > it would be at http://www.apress.com/book/view/1590599969. However, that >

Re: catalog of django apps?

2007-02-15 Thread James Bennett
On 2/15/07, James Tauber <[EMAIL PROTECTED]> wrote: > Has anyone give much thought to building a "Cheeseshop" for reusable > Django apps? A couple people have tried to start sourceforge-esque sites for hosting Django apps, but so far none of them have taken off. Personally, I've just been using G

Re: catalog of django apps?

2007-02-15 Thread James Bennett
On 2/15/07, James Tauber <[EMAIL PROTECTED]> wrote: > That would be great. In fact, it would be nice if many of the > component apps of the site were themselves available on the site for > building other software component catalog sites. Absolutely. I'm a fan of open-source sites (hopefully going

Re: 2 layer join

2007-02-16 Thread James Bennett
On 2/16/07, Michel Thadeu Sabchuk <[EMAIL PROTECTED]> wrote: > How do I select all the Cities from a State? I'm from sqlobject world > and I don't realize how can I do this with django. kansas_cities = City.objects.filter(region__state__name__exact='Kansas') -- "Bureaucrat Conrad, you are tech

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