Re: correct list for newforms admin questions? named urls / replacing admin root page

2008-06-17 Thread Brian Rosner
the newforms-admin branch. See ticket #6470 [1]. At this point your best bet is to hardcode the URLs. [1]:http://code.djangoproject.com/ticket/6470 Brian Rosner http://oebfare.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Re: Display image in django admin

2008-06-19 Thread Brian Rosner
On Jun 19, 2008, at 11:34 AM, Leon Yeh | New Avenue.net wrote: > > def thumbnail(self): > return """""" % (self.photo) After the function add thumbnail.allow_tags = True. Brian Rosner http://oebfare.com --~--~-~--~~---

Help with mod_python and dynamic vhosts

2008-06-22 Thread Brian Ritchie
is inserted into the filename is then derived from # the IP address of the virtual host. So I'm looking for a mix of dynamic vhosts for all of my domains except one select vhost that gets handled by mod_python. Any insight would be helpful. Thanks. Brian --~--~-~--~~---

Re: Do you code django with Komodo?

2008-06-25 Thread Brian Luft
and I'm glad to see others are interested. I'd appreciate any help, ideas, and suggestions as things get going. I also have no experience with XUL or mozilla extensions so it will be a learning process throughout. Stay tuned... Cheers -Brian On Jun 25, 12:32 am, Jörn Paessler <[EM

Re: Convert string to html

2008-06-25 Thread Brian Luft
http://www.djangoproject.com/documentation/templates/#automatic-html-escaping On Jun 25, 10:36 am, TigerHawk <[EMAIL PROTECTED]> wrote: > Hello, > This is my first post and I'm fairly new to Django/Python. I am having > a little trouble getting a string converted to html. > > Here is my view cod

Re: Common data in templates

2008-06-25 Thread Brian Luft
Try these links: http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext http://www.djangoproject.com/documentation/templates_python/#writing-your-own-context-processors -Brian On Jun 25, 11:51 am, Juanjo Conti <[EMAIL PROTECTED]> wrote: > I

Re: python-admin.py startproject error

2008-06-25 Thread Brian Luft
django-admin.py is a python script that should be run from the command line (not the Python interpreter) -Brian On Jun 25, 12:50 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm going through the tutorial and after importing django and running > the django-ad

Re: Django inserts an empty string into IntegerField?

2008-06-25 Thread Brian Luft
In response to your side question: http://www.djangoproject.com/documentation/model-api/#null -Brian On Jun 25, 2:12 pm, Huuuze <[EMAIL PROTECTED]> wrote: > Between you and Karen, I've resolved the problem.  I had a bug here: > > >> zip = forms.CharField(max_length=5

Re: views.py: Always a simple return?

2008-06-25 Thread Brian Luft
Have you thought about using comet? Here is a link to an example implementation using orbited: http://www.rkblog.rk.edu.pl/w/p/django-and-comet/ -Brian On Jun 25, 1:56 pm, "Richard Dahl" <[EMAIL PROTECTED]> wrote: > Generally with HTTP, you would configure your server to

Re: Unexpected Keyword Argument 'radio_admin'

2008-06-26 Thread Brian Rosner
hed your copy of Django from newforms-admin to trunk.\ Brian Rosner http://oebfare.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: newforms and views.generic.create_update.create_object

2008-06-26 Thread Brian Rosner
On Jun 26, 2008, at 1:23 PM, timc3 wrote: > > Might be a stupid question but how did you apply the patch? Get inside your Django directory and execute:: patch -p0 < the_path.diff That should get it going. Let me know if you have any more questions. Brian Rosner http://oe

Re: Full list of Django features?

2008-06-26 Thread Brian Luft
; a good framework should reduce the boring, repetitive work but you'll still have to solve some problems on your own. Personally I'd rather solve those problems using Python than other languages I've used. Python itself has a tremendous ecosystem of libraries and modules. -Brian

Re: CheckboxInput unchecked at formload

2008-07-01 Thread Brian Luft
Yes there is a way :) However, in order for us to help you, it will probably be necessary for you to post some snippets (on dpaste.com for example) so we can see how you are instantiating and rendering your Form. -Brian On Jul 1, 8:36 am, Bobby Roberts <[EMAIL PROTECTED]> wrote: > I

Re: Development File Structure

2008-07-01 Thread Brian Luft
Any 3rd-party Python package or module that you intend to use needs to be on the Python path. The Django documentation actually provides some instructions on how to accomplish this: http://www.djangoproject.com/documentation/install/#install-the-django-code -Brian On Jul 1, 8:53 am, [EMAIL

Re: memcache not used?

2008-07-01 Thread Brian Luft
In your settings file you have indicated that memcached is running on port 112211 but your process listing shows it running on 11211. -Brian On Jul 1, 9:34 am, "Oscar Carlsson" <[EMAIL PROTECTED]> wrote: > Hi! > > For some reason, django doesn't seem to add

Re: Need help filtering a queryset

2008-07-01 Thread Brian Luft
filter out occurrences based on date in that step. -Brian On Jul 1, 9:51 am, Brandon Taylor <[EMAIL PROTECTED]> wrote: > Hi everyone, > > I have Events and Occurrences of an Event. Occurrence contains a > foreign_key for the Event. > In my template, I need to display the Event and

Re: Need help filtering a queryset

2008-07-01 Thread Brian Luft
m model manager for your events model. That might be the best option for retrieving the joined set of events with current occurrences in one fell swoop in a nice abstracted manner. -Brian On Jul 1, 10:12 am, Brian Luft <[EMAIL PROTECTED]> wrote: > Ok, you are asking for a list of events

Re: Development File Structure

2008-07-01 Thread Brian Luft
TED]> wrote: > On 1 juil, 20:12, [EMAIL PROTECTED] wrote: > > > brian, thnx. > > > i got python2.5 installed and django9.6 installed. when i run my > > python command line and import django and test the version it works. > > however when i run the command prompt in win

Re: CharField as text?

2008-07-01 Thread Brian Luft
What is your purpose in defining a form field if it won't be used for user input? On Jul 1, 12:46 pm, Stuart Grimshaw <[EMAIL PROTECTED]> wrote: > Is it possible (with newforms) to either display a CharField as just > text, or have it's value used as the label on another field? I'm > displaying

Re: Using SQLite in production

2008-07-02 Thread Brian Luft
n get away with running sqlite in a production setting. However, please don't interpret this as a recommendation from me. -Brian On Jul 2, 5:20 am, David Marko <[EMAIL PROTECTED]> wrote: > I'm just considering using SQLite in small Django project(in > production environ

Re: Trouble activating the admin interface

2008-07-02 Thread Brian Luft
Do you have 'django.contrib.auth' and 'django.contrib.contenttypes' in your INSTALLED_APPS setting? On Jul 2, 10:20 am, Fernando Rodríguez <[EMAIL PROTECTED]> wrote: > Hi, > > I'm learning django with "the definitve guide to django". On chapter 6, > I tried to activate the admin interface fro the

Re: Newforms Admin - Overriding the Save Method of an Inline Model

2008-07-02 Thread Brian Rosner
ck into how model formsets work. It might help you uncover why this is. > > Brian Rosner http://oebfare.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

Re: Help with templatetags

2008-07-04 Thread Brian Luft
mucking around with custom template libraries. -Brian On Jul 4, 8:44 am, [EMAIL PROTECTED] wrote: > i setup a custom template tag for my index page called recent_news. > > i tried to setup a second template tag for the page called > more_news.py. the first is working as recent_news.py.

Re: Setting up Django

2008-07-10 Thread Brian Jackson
On Thursday 10 July 2008 10:28:30 am Greg Lindstrom wrote: > Hi Everyone- > > I am in the process of putting up my first Django site and am to the > point of getting it off my laptop and onto a hosted service. The > company I am doing this for has an existing relationship with web.com > and wan

Re: Django/CAS/login_url and @permission_required

2007-02-23 Thread Brian Beck
On Feb 23, 5:31 pm, "Chris Green" <[EMAIL PROTECTED]> wrote: > What is happening in the CAS case, is it redirects to the CAS login > url, which says the user is authorized and redirects to this > particular login page and it repeats forever if the user does not have > authorized permissions. > > H

Field default values don't seem to work as expected

2007-02-27 Thread Brian Rosner
, but the default parameter would seem like it should handle that for me. Is my belief that the default parameter of the field should be inserting 0.00 instead of None (which is turned into NULL) correct? Brian --~--~-~--~~~---~--~~ You received this message

Re: django on mediatemple (dv) box?

2007-03-07 Thread Brian Rosner
l put itself where it should go. I believe this is in /etc/httpd/modules which symlinks to /usr/lib/httpd/modules. Restart apache and you should be ready to go. -- Brian Rosner http://www.brosner.com/blog --~--~-~--~~~---~--~~ You received this message because you

Re: django on mediatemple (dv) box?

2007-03-07 Thread Brian Rosner
On 2007-03-07 09:49:48 -0700, "leland" <[EMAIL PROTECTED]> said: > > brian - thanks for that info! i recompiled mod_python (made a backup > first), but when i try to restart apache i get this error: > > Cannot load /etc/httpd/modules/mod_python.so int

Re: newb: newforms and passing an extra parameter: forms.SalesForm(request.POST, p_id)

2007-03-16 Thread Brian Rosner
p_id into SalesForm. It sounds like there is a simpler solution to this as opposed passing it into the form class which shouldn't really care about p_id at all. -- Brian Rosner http://www.brosner.com/blog --~--~-~--~~~---~--~~ You received this message because

Showing images in Django Admin

2007-04-04 Thread brian corrigan
Hi all, I have a django model and want to include an image field. Is there a way of displaying this field in the admin templates as an image (not the string path of the image) or do I have to write my own template for that? Cheers Brian

Re: Index in admin

2007-04-09 Thread Brian Rosner
orms-admin is on its way to help resolve this issue. Take a look at newforms-admin branch: django/newforms/formsets.py. This is what is going to be used for edit_inline functionality which does enable the functionality to be there. --

Updating Django .95 -> .96 on Mac

2007-04-09 Thread brian mckinney
I am attempting to upgrade from .95 to .96 using the setup script both times and was not able to get my mac to look at the new version, since the old path is through 'Django-0.95-py2.4.egg', and the new path is simply located under 'django'. Could someone shed a bit of light on this? --~--~

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

2007-04-10 Thread brian mckinney
Thanks Jay, this worked perfectly. Can anyone shed some light on the purpose of the easy-install.pth file? Is this just adding django to the system path? On Apr 10, 8:56 am, "Jay Parlar" <[EMAIL PROTECTED]> wrote: > Which directory does the .egg file and the 'django' directory live? > /Librar

Re: Drop-down choice or create new; how to handle?

2007-04-10 Thread Brian Rosner
provide, but I have a quick question about the UI of it. How would something this this handle a foreign key model that had more than one required field to save itself? Just wondering if you came across something like that. To me it would seem that creating a custom widget that

Re: Anything special needed in URLconf for tilde?

2007-04-10 Thread Brian Beck
On Apr 10, 8:10 pm, "ryan k" <[EMAIL PROTECTED]> wrote: > > Am I missing something simple? I'm not sure, but it might be that tildes aren't valid URL characters. Web browsers have to violate the spec in order to support this thanks to someone screwing up a long time ago... --~--~-~--~--

Re: Anything special needed in URLconf for tilde?

2007-04-10 Thread Brian Beck
On Apr 10, 8:31 pm, "Brian Beck" <[EMAIL PROTECTED]> wrote: > I'm not sure, but it might be that tildes aren't valid URL characters. > Web browsers have to violate the spec in order to support this thanks > to someone screwing up a long time ago... It might a

Re: Testing Framework and Fixtures

2007-04-11 Thread Brian Luft
I've run into problems as well with the fixture functionality. The short of it is that this is a new feature to the framework and likely the kinks will be worked out in the coming weeks. In the meantime you might check out one of these as a workable temporary solution: http://www.djangosnippets.

Re: Testing Framework and Fixtures

2007-04-11 Thread Brian Luft
tting. Thanks for the update Russell, nice to see the aggressive work being put into this very useful aspect of the framework. Cheers -Brian On Apr 11, 5:22 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 4/12/07, Merric Mercer <[EMAIL PROTECTED]> wrote: > &g

Re: Newforms: adding a date picker

2007-04-14 Thread Brian Rosner
You will want to check out how to create widgets. Here might be an example you are looking for as well as a an example in general. http://code.djangoproject.com/browser/django/branches/newforms-admin/django/contrib/admin/widgets.py On 2007-04-14 11:32:53 -0600, Ray Cote <[EMAIL PROTECTED]> s

foreign key, edit_inline, multiple times

2007-04-17 Thread brian corrigan
number_in_admin? I want to have it so that a user can add any amount of CarModels through the CarManufacturer. Is this possible? Thanks in advance, Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Psychopg 2 Install

2007-04-17 Thread Brian Luft
idea and a requisite for scalability, it also introduces complexities and configuration/security considerations. Start simple, verify and get comfortable with the setup, and then take steps to achieve the setup you desire. Hope this helps. -Brian On Apr 17, 6:23 pm, Mark Jarecki <[EMAIL PROTEC

Re: Need dedicated hosting for Django

2007-04-17 Thread Brian Luft
I just grabbed a WebFaction account based on previous recommendations and though its only been a few days I've been well pleased with what they offer. The control panel is very slick and they make it ridiculously easy to set up an environment with your web framework of choice (Django of course ;)

Re: Psychopg 2 Install

2007-04-18 Thread Brian Luft
If you're having trouble configuring Postgres in a client/server setup, I would search and direct your questions to postgres mailing lists and forums and look for tips relating specifically to your OS. -Brian On Apr 17, 9:38 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wro

Re: __str__ referencing variables in other classes

2007-04-20 Thread Brian Luft
itle + ','.join( [ '%s %s' % (m.first_name,m.last_name) for m in self.member.objects.all() ] ) Your thinking is correct - if it was a ForeignKey then you could simply reference the Person properties via self.member. -Brian On Apr 20, 10:12 am, Jason Murray <[EMAIL PROTEC

Newforms SelectDateWidget does not generate ID

2007-04-22 Thread Brian Victor
ed ID settings like auto_id? Thanks! -- Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from t

Re: How do I pass label's attributes in newforms

2007-04-25 Thread Brian Rosner
> I don't think it's possible to add a class attr to the label tag that Django generates through its lazy form methods. You can pass an attrs dictionary to a widget. Check into widgets, there are some good examples in the newforms_admin branch. The only other alternative to specifyi

Re: Setting up psycopg2

2007-04-27 Thread Brian Luft
assume the same for the version in the Ubuntu repos. Of course you can always verify yourself by running "pg_config" Also, any reason you're building psycopg from source rather than using the apt package? Cheers -Brian On Apr 27, 10:18 am, HenrikG <[EMAIL PROTECTED]> wrote: >

Re: Setting up psycopg2

2007-04-28 Thread Brian Luft
ython-psycopg2 -- zope3 version zope-psycopgda2 - Zope database adapter based on python-psycopg2 I'm on Feisty with the standard repositories. Happy coding Cheers _Brian On Apr 28, 1:14 am, HenrikG <[EMAIL PROTECTED]> wrote: > Thanks for the tip Brian! > I checked with pg_config --con

Re: connecting to multiple databases

2007-05-01 Thread Brian Luft
that my pitiful plea plants the tiniest of seeds in the brilliant django dev minds and here's to hoping that more in the community share my viewpoint and make themselves heard. Thanks for listening. Cheers -Brian --~--~-~--~~~---~--~~ You received this message bec

Re: connecting to multiple databases

2007-05-01 Thread Brian Luft
away. Of course that happens anyway (what no ajax support? what no clunky templating engine? i pass...) - you know the story. It is very fortunate that we have a solid framework being driven by talented, dedicated people I can tell you that much :) Cheers -Brian On May 1, 9:37 pm, "Russell Kei

Re: connecting to multiple databases

2007-05-02 Thread Brian Luft
onal) and/or use case (write-only, read-only, replication, data mining). Cheers -Brian On May 2, 8:04 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I've just posted over in django-dev that I'm intersted in taking over > maintenance of this branch ... I&#x

Re: No POST data

2007-05-03 Thread Brian Luft
he value from that form you might try some pre-submit processing and transfer the value to a hidden field. Cheers -Brian On May 3, 11:36 am, tomass <[EMAIL PROTECTED]> wrote: > I realise this is likely something trivial I am missing, and I'm aware > ofhttp://code.djangop

Re: How do they do the filters in admin?

2007-05-03 Thread Brian Rosner
key/ > value pair to the end of the link. > > /?object_id__exact=2 > > How then, does this get implemented into the query to yield correct > results? > > Sincerely, > > > Check out the ChangeList class here: http://code.djangoproject.com/browser/django/tr

Multiple projects on one domain - anyone have a good solution?

2007-05-11 Thread Brian Beck
So usually when I need to do this I just do a bunch of trial and error in lighttpd and get stuff mostly working, but I've never been happy with it. I want to have a Django project 'mounted' at /rta and another at / crime, both at the same domain. Sadly lighttpd doesn't support URL rewriting insid

Re: django vps hosting

2007-05-15 Thread Brian Luft
I've been using WebFaction and have been happy with it so far. The plan I'm using is actually a shared hosting plan. While you do share an OS instance with others, you still get shell access. They have a slick control panel that makes it easy to drop in various frameworks and applications (eg.

Re: Aggregate function in django

2007-05-17 Thread Brian Beck
On May 17, 7:47 am, Brij <[EMAIL PROTECTED]> wrote: > Please help me getting the django database api for this query which i > can use in the my view and send the object to my template to display > the result Hi, check out this snippet I posted that tries to make similar SQL like this reusable. Un

Categorization of Two Models

2007-05-22 Thread Brian Rosner
ement this? I first thought about using generic relations, but not 100% sure on how to go about it. -- Brian Rosner http://www.brosner.com/blog --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&

Re: "showable" but not "editable" field in the Admin screens

2007-05-22 Thread Brian Rosner
You may also want to check out http://code.djangoproject.com/ticket/3990. On May 22, 5:19 am, "Seiji - technics" <[EMAIL PROTECTED]> wrote: > Hi all, > > Is there a way to show as specific field in the admin screens but > without permitting to edit it? > I want something similar to "editable=Fals

Re: Generell Questions on Django

2007-05-24 Thread brian corrigan
We have used Django along side Java applications by using Jython and HTTP requests from the Java to Django and vice versa. So if your colleagues need more "serious" application features there are ways to plug them into Django (although I'm sure some people might not agree with the method) :) On

Re: newforms-admin raw_id_fields performance problem

2007-10-09 Thread Brian Rosner
moved from it. Patches are welcome. (And no Malcolm, > that's not directed at you ;) Your wish is my command ;) http://code.djangoproject.com/ticket/5720 > > Joseph > > [1] > http://code.djangoproject.com/browser/django/branches/newforms-admin/django/contrib/admin/options.py#L503

Re: Switching between databases with same project/model

2007-10-12 Thread Brian DeGeeter
no easy answer to my dynamic db settings. I'd be interested in the complex answer if anyone has one. Specifically for the command line tool we have. Editing the settings.py with a sed script seems so crude. Thanks, -Brian On 10/12/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: &g

Re: Switching between databases with same project/model

2007-10-15 Thread Brian DeGeeter
Thanks. That's exactly what I need. My dynamic settings needs are not really that dynamic. I haven't had a chance to read up on the various environment variables. Looks like that's what I'll be doing next. Regards, -Brian On 10/13/07, Russell Keith-Magee <[EMAIL PR

Djangonauts in Amsterdam, Prague, or Krakow?

2007-10-19 Thread Brian Luft
My wife and I are travelling through Eastern Europe for the next 2 months. (we're starting in Amsterdam though). I'd love to meet up with any Djangonauts for a little chat. I like beer, wine, Django, and open source software if anyone can spare a few minutes for a chat :) Che

Re: Backend does not find views

2007-10-29 Thread Brian Morton
Deleting your checkout and re-checking out the SVN tree couldn't hurt. Can you tell us more about your environment? What OS? What version of Python? What web server are you using? On Oct 29, 3:53 am, oversize <[EMAIL PROTECTED]> wrote: > Hello, > my (very strange) problem is: When i want to e

Re: New Forms Foreign key field Filtered choices

2007-11-02 Thread Brian Rosner
What you really need is to use the formfield_callback argument to form_for_instance. This allows you to override the default fields that are returned for a given field in the model [1]. There is an open bug, [2], that will allow for an easier way of overriding the queryset that is ultimately ren

Taconite + jquery + Django

2007-11-08 Thread Brian Costlow
Just thought I'd pass this along. I've been lurking about learning as I work on a couple of Django-based projects, and thought it was time to share something back. I've been having a lot of success with this combination in an app I've been tweaking and extending the past week. It's basically a w

Re: Expiring cache entries through model save()

2007-11-30 Thread Brian Morton
Thanks for the advice Malcolm. I am going to give this more thought and see if I can come up with a generic high performance hash function. On Nov 30, 3:26 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2007-11-30 at 12:08 -0800, Brian Morton wrote: > > I have an i

Expiring cache entries through model save()

2007-11-30 Thread Brian Morton
I have an interesting idea that I am not quite sure how to pursue. I'm wondering if any of you have figured this out already. What I would like to do is set the cache expiration for a particular object in the cache to be very high, and then delete the item from the cache when an instance of its m

Help debugging Django/MySQLdb exception

2007-12-04 Thread Brian Morton
I'm not sure what could be causing this problem. This is a loader script that is loading a CSV and using the Django ORM to do lookups and inserts. This is on a workstation with 1GB of memory running Ubuntu Gutsy (the MySQL server is local also). I'm using MySQLdb 1.2.2 and there do not seem to

Re: Help debugging Django/MySQLdb exception

2007-12-06 Thread Brian Morton
, the "key" would repeat and the row would not be inserted. However, no exception was ever raised about a duplicate primary key on save(). I am puzzled by this. Why would it not complain about a primary key violation? On Dec 5, 12:29 pm, "Karen Tracey" <[EMAIL PROTECTED]

Re: Performance of a django website

2007-12-11 Thread Brian Morton
Are you serving static content from the same apache instance? Also, what kind of network connectivity do you have between your web and mysql servers? It sounds like apache might need some tuning in terms of thread parameters. Have you enabled caching yet? Turn on the cache framework site-wide

Re: Performance of a django website

2007-12-11 Thread Brian Morton
there athttp://www.djangosnippets.org/snippets/93/ > > -joe > > On Dec 11, 2007 10:49 AM, Richard Coleman <[EMAIL PROTECTED]> wrote: > > > > > Brian Morton wrote: > > > Are you serving static content from the same apache instance? Also, > > > wh

Re: Performance of a django website

2007-12-11 Thread Brian Morton
Sorry, just saw your earlier post about debug being turned off. I would say it is definitely time to start profiling your code. On Dec 11, 2:11 pm, Brian Morton <[EMAIL PROTECTED]> wrote: > Joseph raises a good point. I only recently discovered what a > performance killer DEBUG

Re: Performance of a django website

2007-12-11 Thread Brian Morton
http://www.djangoproject.com/documentation/db-api/#select-related On Dec 11, 1:18 pm, Joe <[EMAIL PROTECTED]> wrote: > I've found the largest memory hog to be the native way related tables > are setup. > > Check class definitions with related tables and edit as such: > > class ...(models.Mode): >

Re: How do you add the edit of another object from another object's admin view

2007-12-17 Thread Brian Rosner
Yes, you can. This is called edit_inline in Django. Check out [1] and read that section. It will show you how to accomplish edit_inline. [1]: http://www.djangoproject.com/documentation/model-api/#many-to-one-relationships Thanks. -- Brian Rosner http://oebfare.com --~--~-~--~--

Re: database API filter() vs get()

2007-12-17 Thread Brian Rosner
database won't be hit until it is evaluated. Ex. it is iterated over in a for loop, you do a[0].id, or you provide a step in the slice a[::2]. .get will actually hit the database when called. -- Brian Rosner http://oebfare.com --~--~-~--~~~---~--~~ You re

Problem with Django model from twisted, _mysql_exceptions.InterfaceError: (0, '')

2007-12-18 Thread Brian Costlow
p on where I might start to look next or what to try would be appreciated. Regards, Brian Environment Red Hat Enterprise 4. Python 2.3.4 (version that is stock with RHLE 4). MySQL 5.0.27 (RPM from MySQL AB for RHEL 4) MySQLdb 1.2.1p2 -- compiled on this box against the libs from 5.0.27 Dj

Re: how to handle a zero-based pagination in templates as one-based?

2007-12-20 Thread Brian Rosner
zero-based, but > page_range (for the template-output) is one-based. > > this wouldn't be a problem if i could switch to 1-based object- > pagination. so how do i dow? write my own object-pagionation-subclass? > > -- Brian Rosner http://oebfare.com --~--~

Re: Admin-editable configuration for Django?

2007-12-21 Thread brian corrigan
Unless these are settings that Django needs lite configured apps or db settings I can't see why you wouldn't use a config file, especially if it is just for mail settings. On Dec 20, 10:32 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > James Bennett napisał(a): > > >> While this might work for the

Re: How to make fields with editable=False visible in the Admin interface

2007-12-21 Thread brian corrigan
On Dec 21, 2:20 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Dec 20, 2007 9:03 AM, GodOfGeeks <[EMAIL PROTECTED]> wrote: > > > The problem is that when I set the fields to editable=False then they > > won't be visible in the adminModel > > The admin interface is deliberately designed not

Re: File Upload perfomance

2007-12-31 Thread Brian Rosner
red in memory then written to disk. Clearly you can see this being a problem with large files of 600-900 MB. Check out [1] which has patches to stream large files to disk before saving it in its destination directory as defined by upload_to in your FileField. [1]: http://code.djangoproject.com/t

Re: how to deal with inherited template context variables?

2007-12-31 Thread Brian Costlow
Sam, Am I missing something, or is there a reason you don't just factor out the common bits into a function or set of functions in views.py, or a library it imports? For a couple of simple things we do on multiple sites (e.g. we do friendly names including Title and Suffix etc, from data in the

Re: Django is more?

2008-01-02 Thread Brian Costlow
We have a Django web application that also uses parts of Django to feed data to the database automatically. There's an application built in Twisted that receives messages from various other servers and 'does something' based on the message. One of the 'does somethings' is using the Django ORM f

Simple CAS 1.0 authentication

2006-11-27 Thread Brian Beck
#x27;t forget to put 'your_site.cas' in INSTALLED_APPS and enable 'django.contrib.auth'. Also see cas/backends.py if you have a way to automatically determine the user's name and e-mail from the username (from LDAP for example), or if you need to implement more of the CAS protocol

Re: More questions on models

2006-11-27 Thread Brian Beck
rItem(quantity=10, price=1.5, total=2, order=o, product=p).save() >>> OrderItem(quantity=5, price=10.5, total=20, order=o, product=p).save() Here's the part you want: >>> o.orderitem_set.all() [, ] Hope that helps. -- Brian Beck Adventurer of the First Order --~--~

Re: Session problems

2006-11-28 Thread Brian Ray
ssions were not working properly for many reasons. I can recall once I build mod_python linking to the wrong libraries, and some strange stuff happened. -- Brian Ray (http://kazavoo.com) --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

Re: Simple CAS 1.0 authentication

2006-11-30 Thread Brian Beck
Quick followup in case anyone is interested (anyone? Bueller?)... One problem is handling the admin site, which doesn't really account for an authentication backend that doesn't know the user's password (making the login form useless). So, without wanting to hack up django.contrib.admin, here's

Re: Simple CAS 1.0 authentication

2006-11-30 Thread Brian Beck
Alright, I'm gonna throw a question out there, maybe someone can help. As shown above I can intercept the admin index page in order to not display the login form which doesn't make sense for CAS authentication. However, this only works if the user needs to be authenticated and requests the index

Registering defaults for custom settings

2006-11-30 Thread Brian Beck
Hi, If I'm developing middleware or an app that I want a user to be able to configure in their settings.py, how should I go about setting defaults in there? I checked out django.conf, and it just looks like global_settings.py registers the defaults for every possible module included with Django.

Re: Help with admin views

2006-12-01 Thread brian corrigan
y, from Django source, where ever the template directory is that you are pointing to in your settings.py Hope this helps and that I haven't confused anyone else but me Cheers Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Simple CAS 1.0 authentication

2006-12-01 Thread Brian Beck
Alright, I fixed things up a bit and went for the middleware approach. The CAS module can now intercept all admin interface requests and do the appropriate authentication routine instead of showing the login form. Everything can now be configured in settings.py as well so there's no need to muck

Re: Auto-login with REMOTE_USER

2006-12-01 Thread Brian Beck
I just wanted to add that if you want to use this method in combination with the bundled admin interface, you're gonna have to intercept any admin requests and do the authentication so that it won't show the login form. Check the latest post in the CAS authentication thread, the middleware code t

Re: Auto-login with REMOTE_USER

2006-12-01 Thread Brian Beck
I don't understand how this is related to the admin interface. Anyway, shouldn't it go after the standard auth middleware, so that django.contrib.auth.middleware doesn't clobber the request.user that the middleware posted above sets? And you still need to take into account the admin interface's

Re: Auto-login with REMOTE_USER

2006-12-01 Thread Brian Beck
Brian Beck wrote: > I don't understand how this is related to the admin interface. Anyway, > shouldn't it go after the standard auth middleware, so that > django.contrib.auth.middleware doesn't clobber the request.user that > the middleware posted above sets? And

Re: Auto-login with REMOTE_USER

2006-12-01 Thread Brian Beck
Ivan Sagalaev wrote: > Brian Beck wrote: > > I don't understand how this is related to the admin interface. > > Admin interface won't display a login page if you already have > request.user set to an existing user. (if I'm not mistaken :-) ). Yep, okay. I wa

Re: Overwriting the save-function in automatic admin?

2006-12-02 Thread Brian Beck
Hi Tim, James Bennett wrote about how to do this not too long ago, check it out here: http://www.b-list.org/weblog/2006/11/02/django-tips-auto-populated-fields -- Brian Beck Adventurer of the First Order --~--~-~--~~~---~--~~ You received this message because

Re: Simple CAS 1.0 authentication

2006-12-04 Thread Brian Beck
tonemcd wrote: > Again, thanks heaps for making this available - it's done the business > for me! Tone, Awesome! Glad it worked. :) Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Dja

Validation Summary

2006-12-07 Thread Brian Morton
I can't figure out how to make a validation summary on a form. I have examined the code in forms\__init__.py, and it reveals nothing about where the complete list of field/error pairs are stored. I would like to do a for loop on that dictionary and output a validation summary, then mark each

Multiple models on one form

2006-12-08 Thread Brian Morton
I am trying to write a custom form that will handle updates for several models. What is the best way to do this? Do I have to write a custom manipulator to handle the data? Or can I create a hybrid view of several different default manipulators? --~--~-~--~~~---~

Newforms and composite widgets

2006-12-09 Thread Brian Victor
n my hypothetical composite field above, it would return a single datetime object. Is there a way to obtain this behavior? -- Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gro

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