Re: user restrictions in admin interface

2007-11-27 Thread chrominance
Your best bet is to take the responsibility of data entry away from the admin interface, and just write your own. You can hook into generic views (which contains a basic set of create/update/delete views for data entry) and user permissions (if you want to specify whether users can do certain

FreeComment, the approved field, and django_comment_utils

2007-07-12 Thread chrominance
I'm attempting to integrate James Bennett's awesome comment_utils package (http://www.b-list.org/weblog/2007/06/25/hacking-comments- without-hacking-comments) into my Django project in order to gain some control over comment moderation. Having played nanny to several Wordpress blogs over the

Re: Django, shared hosting memory limits and memory optimization

2007-06-02 Thread chrominance
That's a bit creepy. If not the DEBUG issue, then what? The parent Apache process hasn't budged from 3MB since the restart and I can't imagine what else would have changed between the 90MB period and the 30MB period. I loaded my project from svn so there were no .pyc files initially, I've never

Re: Django, shared hosting memory limits and memory optimization

2007-06-02 Thread chrominance
Epilogue: it looks like the major culprit behind my skyrocketing memory usage was indeed my failure to properly restart all the apache processes; it looks like the parent process was still storing debug info from when I had DEBUG=True in my settings.py, so that setting it to False and soft

Re: Many-to-Many with quantities

2007-06-01 Thread chrominance
class PizzaTopping(models.Model): pizza = models.ForeignKey(Pizza, help_text = 'Toppings to go on Pizza: num in admin is how many will show up in Pizza', edit_inline = models.TABULAR, num_in_admin = 3,

Re: access user.id

2007-05-30 Thread chrominance
> return HttpResponse(user.id) #just to test > > it returns error > MOD_PYTHON ERROR > TypeError: argument 1 must be string or read-only buffer, not long > besides all that long error page That's because HttpResponse expects a string (or read-only buffer) and you've

Re: Django, shared hosting memory limits and memory optimization

2007-05-29 Thread chrominance
> Depends on what RSS means for that platform when running ps. This may > count private memory used plus shared memory use. If Webfaction is > counting shared memory use in your 40MB limit would suck somewhat, as > they would be double counting across all processes. > > If you run 'top' it

Re: Django, shared hosting memory limits and memory optimization

2007-05-29 Thread chrominance
Kbytes here only, versus 200-500Kbytes for children. > > Anyway, work out whether how you are restarting Apache is killing of > the parent process. If not work out how to restart Apache so it is. > Also look at how much memory the parent is using and see if it is > small. > &g

Re: Django, shared hosting memory limits and memory optimization

2007-05-29 Thread chrominance
processes peaked at about 85MB. If there's a memory leak in my application, it wouldn't still leak after I've restarted apache, would it? I'll try the Webfaction forum too. Thanks, and keep the advice coming! On May 29, 8:15 pm, "Jay Parlar" <[EMAIL PROTECTED]> wrote: > On 5/29/07,

Django, shared hosting memory limits and memory optimization

2007-05-29 Thread chrominance
I've recently put up a newspaper site on Webfaction that was developed without much concern for memory limits--coming from PHP, my knowledge of memory issues is practically nil. Of course, Webfaction's plans all have memory limits, and we're currently on Shared 1, which imposes a 40MB limit.

Re: contextual ForeignKey?

2007-04-26 Thread chrominance
You may also want to look at this prelim generic relations UI for the admin view: http://net-x.org/weblog/2006/nov/29/django-generic-relations-made-easier/ On Apr 25, 8:58 pm, Drasty <[EMAIL PROTECTED]> wrote: > Thanks for the suggestion. Even if it doesn't work--I haven't really > looked at

Re: regroup, dictsort and ordering objects

2007-04-26 Thread chrominance
Never mind, I didn't realize that a) dictsort doesn't work so well when passed related objects, and b) dictsort does great when passed FIELDS of related objects, say, SportType.name. Problem = solved! --~--~-~--~~~---~--~~ You received this message because you

regroup, dictsort and ordering objects

2007-04-22 Thread chrominance
I feel like maybe I've stretched the templating system to the breaking point, but I'll ask anyways in case there's a solution. I'm putting together templates for a calendar app, specifically one to hold sports games/results. The first trick is I want to use the same model for games already

Preventing saving of objects in admin: how to send message back to the user?

2007-04-18 Thread chrominance
I've read the Django docs on overriding the save() function on models, and preventing an object from saving looks really easy. However, the example in the docs fails silently--if you're working in the admin interface and your object doesn't save because you've triggered a "don't save this

Bad SQL when ordering a model by related models

2007-04-06 Thread chrominance
I'm having problems with ordering based on related fields that may be a clone of the issue brought up in ticket 1576 (http:// code.djangoproject.com/ticket/1576), though because that problem was so old and the ticket was closed I wasn't sure where I should bring this up. Also, it could just be my