Re: 'ValidationError' object has no attribute 'message_dict'

2010-02-09 Thread Joseph Kocherhans
On Feb 9, 2010, at 12:47 AM, Kenneth Gonsalves wrote: > hi, > > I am using the latest revision 12398. I am trying model validation - but the > simplest validation possible is giving me an error - if the data is valid, no > error, but on invalid data I get the traceback appended below. Am I

Re: 'ValidationError' object has no attribute 'message_dict'

2010-02-09 Thread Joseph Kocherhans
On Feb 9, 2010, at 9:12 AM, Karen Tracey wrote: > On Tue, Feb 9, 2010 at 2:11 AM, Kenneth Gonsalves wrote: > On Tuesday 09 Feb 2010 12:29:48 pm Karen Tracey wrote: > > > simplest validation possible is giving me an error - if the data is > > > valid, no > > > error, but on

Re: ModelForm, one form, two models

2008-09-22 Thread Joseph Kocherhans
On Mon, Sep 22, 2008 at 8:57 AM, diN0bot <[EMAIL PROTECTED]> wrote: > > Seems like Joseph's problem is typical for User/Profile work. > > Initially I used the same inheritance model as he does. Working with a > single form in the view and template is a win for code re-use and > simplicity. > > I

Re: ModelForm, one form, two models

2008-09-10 Thread Joseph Kocherhans
On Wed, Sep 10, 2008 at 6:59 AM, Michel Thadeu Sabchuk <[EMAIL PROTECTED]> wrote: > > Hi guys, > > What is the best way to work with 2 models on the same forms? Suppose > I have the following case: > > class Profile(models.Models): >user = models.ForeignKey(User) >some_data =

Re: Overriding save_add/save_change fails when using NFA?

2008-07-22 Thread Joseph Kocherhans
On Tue, Jul 22, 2008 at 5:12 PM, Huuuze <[EMAIL PROTECTED]> wrote: > > I'd appreciate it if someone else chimed in, but it appears as though > the HOWTO contains a typo. I've looked at the older versions of > Django and the NFA branch and none of them include the "model" > parameter in the

Re: editing an image with ModelForm

2007-12-25 Thread Joseph Kocherhans
On 12/25/07, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > hi, > > using ModelForm for an ImageField, and following the documentation, I > find that all the other data gets transferred to the form except the > filename. The form loads with an error on the file input: 'this field > is

Re: ModelForm and required fields

2007-12-23 Thread Joseph Kocherhans
On 12/23/07, Julien <[EMAIL PROTECTED]> wrote: > > Hi there, > > I don't understand why the form doesn't validate when I don't fill out > a ManyToManyField. > > Here's the code: > > class Participant(models.Model): > project = models.ForeignKey(Project, related_name='participants') >

Re: How to initialize M2M field in new ModelForm?

2007-12-22 Thread Joseph Kocherhans
On 12/22/07, Yatla <[EMAIL PROTECTED]> wrote: > > I need to initialize a selection in a M2M field of the Document > ModelForm during the first GET of a form that creates a new Document - > classes and view as follows: > > class DocumentForm(forms.ModelForm): > class Meta: > model =

Re: docs for the new ModelForm() class

2007-12-11 Thread Joseph Kocherhans
On 12/11/07, John M <[EMAIL PROTECTED]> wrote: > > I love newforms, and as soon as I 'master' form_for_instance/model, > you guys come out with something totally awesome, sub-classing > something called ModelForm, wow. > > now, where do i get 'docs' for this? Would the developer group be >

Re: how fixtures can be load in django tests?

2007-11-20 Thread Joseph Kocherhans
On 11/20/07, michel bruavics <[EMAIL PROTECTED]> wrote: > > Hi djangos, > > I check out the django.test.client and want to load a fixture file > called "myfixture.xml". > > I added in my project setting a folder (called fixtures): > FIXTURE_DIRS = ('/workspace/project/fixtures/') > >

Re: initial data ignored for Form with __init__

2007-11-13 Thread Joseph Kocherhans
On 11/13/07, Ken <[EMAIL PROTECTED]> wrote: > > I'm using 0.96. I define the following form > > class TForm(forms.Form): > admin = forms.ChoiceField() > x = forms.IntegerField() > > def __init__(self, data=None, **kwargs): > super(TForm, self).__init__(data, kwargs) >

Re: newforms-admin fieldsets classes question

2007-11-10 Thread Joseph Kocherhans
On 11/10/07, Karen Tracey <[EMAIL PROTECTED]> wrote: > Was it intended to change the type of the 'classes' value in an Admin field > (now fieldset in newforms-admin) specification from string to tuple? The > old doc here: > > http://www.djangoproject.com/documentation/model-api/#classes > >

Re: What's going on with Row Level Permissions?

2007-10-11 Thread Joseph Kocherhans
On 10/11/07, arv43 <[EMAIL PROTECTED]> wrote: > > Does anyone know how and if Generic Authorization and RLP are going to > fit together? It says on the RLP page to look at Generic Authorization > to know how they do, but I am not sure how they do. Maybe am missing > something. > Are they both

Re: Newforms Field Limit Question

2007-10-11 Thread Joseph Kocherhans
On 10/10/07, machineghost <[EMAIL PROTECTED]> wrote: > > I recently attempted to implement a very large form using the newforms > library, and I discovered that if a form contains more than 45 fields > it generates a "too many values to unpack" error when you try to > render it in a template.

Re: newforms-admin raw_id_fields performance problem

2007-10-09 Thread Joseph Kocherhans
On 10/9/07, Brian Rosner <[EMAIL PROTECTED]> wrote: > > On 2007-10-09 14:39:57 -0600, "Joseph Kocherhans" <[EMAIL PROTECTED]> said: > > > > > On 10/9/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > >> > >&g

Re: newforms-admin raw_id_fields performance problem

2007-10-09 Thread Joseph Kocherhans
On 10/9/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > This raises some alarm bells. Why on earth are we futzing around in > ChangeManipulators here? They are entirely oldforms-related and the > whole point is to remove any reliance on them. > > This might well be a bug and in an area that

Re: Two newform best practice questions

2007-09-26 Thread Joseph Kocherhans
On 9/26/07, Mark Green <[EMAIL PROTECTED]> wrote: > > I say thanks for the pointer, too. > A quick question (since you seem to be involved with this), is there any > reason to have django not prefix the form fields by default with, say, > the model-name (so prefix='' or prefix='somethingelse' can

Re: Two newform best practice questions

2007-09-26 Thread Joseph Kocherhans
On 9/26/07, Przemek Gawronski <[EMAIL PROTECTED]> wrote: > > I'm using several forms (newforms) to build one html form. One thing to > watch out for is common field names in your django form classes. So if > you have two django forms and they both have a field 'date' for example, > then handling

Re: is has_{add,change,delete}_permission working?

2007-09-21 Thread Joseph Kocherhans
On 9/21/07, A. Reppel <[EMAIL PROTECTED]> wrote: > > I'm using newforms-admin, and i've put into the model option class a function: > > def has_add_permission(self,req): return False > > but I still see the "add' button in the admin index page and in other places. > > Are these options actually

Re: Foreign key error "Reverse query name for field 'foo' clashes with field Foo.bar"

2007-09-12 Thread Joseph Kocherhans
I believe > > the sticking point has been finding a syntax that is backwards > > compatible, but also elegant and intuitive. > > This is closed to sovle, form memory .There is a ticket somewhere, but I > can't find it at the moment. Joseph Kocherhans started things

Re: Custom forms in newforms-admin

2007-08-09 Thread Joseph Kocherhans
On 8/9/07, eXt <[EMAIL PROTECTED]> wrote: > > Sorry that I'm not exacly on the topic but I'd like to know what is > current state of newforms-admin. Is it safe to use it in application > or is it still too early? I would say it's too early unless you are comfortable fixing bugs and maintaining

Re: form required field question

2007-06-01 Thread Joseph Kocherhans
On 6/1/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Thanks... that does look like what I'm looking for. I don't really > understand how I'd put it in a model, though... I've got a situation > where if the choose a, they need to choose from one list, if they > choose b, they need to choose

Re: newforms.clean_data vs. newforms.cleanED_data

2007-05-15 Thread Joseph Kocherhans
On 5/15/07, canen <[EMAIL PROTECTED]> wrote: > > This changed was committed yesterday. See here > http://groups.google.com/group/django-developers/browse_thread/thread/c87a893a4d7c50a0/32f777bafd3cdb35#32f777bafd3cdb35 > for the discussion that lead to the change. > > On May 15, 10:43 pm,

Re: newforms with no pre-set number of fields

2007-03-16 Thread Joseph Kocherhans
On 3/16/07, Todd O'Bryan <[EMAIL PROTECTED]> wrote: > > On Fri, 2007-03-16 at 17:41 +, Rubic wrote: > > Just use a ChoiceField with a radio or checkbox widget. > > > > http://www.djangosnippets.org/snippets/26/ > > > > -- > > Jeff Bauer > > Rubicon, Inc. > > Sorry, wasn't clear. I know how

Re: newforms dateField

2007-03-14 Thread Joseph Kocherhans
On 3/14/07, Grupo Django <[EMAIL PROTECTED]> wrote: > > Hello, I have noticed that the field DateField in the newforms library > doesn't validate all right when introducing data. > I have this code: > > FormClass = forms.models.form_for_model(Model) > form = FormClass(data) > data =

Re: Error with a model? (I think)

2007-03-06 Thread Joseph Kocherhans
On 3/6/07, Austin Govella <[EMAIL PROTECTED]> wrote: > > What does this mean? > > "unbound method contribute_to_class() must be called with TextField > instance as first argument (got ModelBase instance instead)" > > > > And how do I know where to look to find the problem? It looks like an error

Re: Solution: change only a subset of a model's field in newforms

2007-02-28 Thread Joseph Kocherhans
On 2/28/07, akaihola <[EMAIL PROTECTED]> wrote: > > It must be a common need to allow the user to change only some fields > of an object and keep old values for the rest. > > So far with newforms this has involved copying values explicitly from > the database object to the form object. Looking at

Re: Using Authentication Framework

2007-02-28 Thread Joseph Kocherhans
On 2/28/07, MattW <[EMAIL PROTECTED]> wrote: > > Dear All, > > I am trying to use the users/ authentication framework supplied with > Django. I wrote something very simple myself, but would arther use the > bundled system. > > I have a urls.py file with: > > (r'^login/$', login), >

Re: direct_to_template, extra_context

2007-02-27 Thread Joseph Kocherhans
On 2/27/07, va:patrick.kranzlmueller <[EMAIL PROTECTED]> wrote: > > from django.conf.urls.defaults import * > > urlpatterns = patterns('', > (r'^stars/', 'django.views.generic.simple.direct_to_template', > {'template': 'site/stars/stars_overview.html'}, extra_context= > {'category':

Re: direct_to_template, extra_context

2007-02-27 Thread Joseph Kocherhans
On 2/27/07, va:patrick.kranzlmueller <[EMAIL PROTECTED]> wrote: > > why doesn´t this work? > (r'^stars/', 'django.views.generic.simple.direct_to_template', > {'template': 'site/stars/stars_overview.html'}, extra_context= > {'category': 'stars', 'subcategory': 'none'}), > > the error is "invalid

Re: Threaded versus forked how can I tell?

2007-02-15 Thread Joseph Kocherhans
On 2/1/07, Jakub Labath <[EMAIL PROTECTED]> wrote: > > Is there a way to detect in my code if I'm running in prefork or threaded > mode? Your best bet is probably through mod_python. I'd probably start by looking here first: http://www.modpython.org/live/current/doc-html/module-apache.html

Re: Auto-login with REMOTE_USER

2006-12-01 Thread Joseph Kocherhans
On 12/1/06, dchandek <[EMAIL PROTECTED]> wrote: > > I've spent a few hours digging around, but can't seem to find a > straightforward answer ... > > I have an Apache module that does user authentication and sets the > REMOTE_USER variable with the user name. This is completely independent > of

Re: Users from custom authentication backend cannot login

2006-10-23 Thread Joseph Kocherhans
On 10/23/06, Florian Heinle <[EMAIL PROTECTED]> wrote: > > I created my own authentication backend which gets users from another > table (webforum). I used > http://www.djangoproject.com/documentation/authentication/#writing-an-authentication-backend > as a starting point and the final backend

Re: Closing connection in apache-mod_python-django0.91-postgresql-WinXP

2006-10-11 Thread Joseph Kocherhans
On 10/11/06, AlexK <[EMAIL PROTECTED]> wrote: > > I have multi user access issue in my app.Logs show, that 1 request > closes DB connection, which can be used by other request. May be reason > of apache Win version is not thread-safe..has anybody idea, how to > workaround it? > I consider moving

Re: admin interface / permissions: app name not listed

2006-10-11 Thread Joseph Kocherhans
On 10/11/06, patrickk <[EMAIL PROTECTED]> wrote: > > when assigning permissions, there´s a list of installed apps/models, > like: > posting | can add posting > posting | can change posting > ... > > the problem is, if I have several models with the same name (e.g. > category) within different

Re: Re: automatically login after email confirmation

2006-10-09 Thread Joseph Kocherhans
On 10/9/06, SanPy <[EMAIL PROTECTED]> wrote: > > Chris Moffitt wrote: > > > > > I've was tripped up by this too. Can you try something like this: > > > > user = authenticate(username=data[*'user_name'*], > > password=data[*'password'*]) > > login(request, user) > > > > This seems to

Re: One project, multiple apps, all using their own DB

2006-09-15 Thread Joseph Kocherhans
On 9/15/06, Jason Murray <[EMAIL PROTECTED]> wrote: > > I'm a django newbie (still working on the first app). I'm trying to figure > out how to do something, only conceptually at this point. So I have no > errors to send. > > I host a few apps on my home machine. They each use their own DB (on

Re: Serving multiple projects based on different Django versions

2006-09-15 Thread Joseph Kocherhans
On 9/15/06, Rob Hudson <[EMAIL PROTECTED]> wrote: > > Here's something I realized we're going to have to face one day as I > read the post on the new Forms and Manipulators... > > We have an active project we're coding against 0.95. Fast forward to 6 > months or so after 1.0 is released and we

Re: Mac vs. PC for Django work.

2006-09-13 Thread Joseph Kocherhans
On 9/13/06, keukaman <[EMAIL PROTECTED]> wrote: > > I am in the market for a notebook computer that I will be doing my web > design work on. Could I get some comments related to which is better > for Django work - P.C. or Mac, as well as some pros & cons of each? I use OS X as well for all my

Re: Re: Creating graphs in Django application

2006-09-08 Thread Joseph Kocherhans
On 9/8/06, Andy Robinson <[EMAIL PROTECTED]> wrote: > > I have just added an article to the Wiki on how to create charts using > ReportLab's graphics library I hope this helps! > > http://code.djangoproject.com/wiki/Charts Very cool. Thanks Andy! I didn't know ReportLab did anything but pdf

Re: How do I parse XML in a Django view?

2006-08-18 Thread Joseph Kocherhans
On 8/18/06, Mike <[EMAIL PROTECTED]> wrote: > > We have been creating a content management system in Django which > (despite a few learning bumps) has gone swimmingly. Now, we have > reached an impasse. We have some applications running elsewhere on the > site whose xml data we need to access and

Re: login requires only one argument?

2006-08-17 Thread Joseph Kocherhans
On 8/17/06, halmcelroy <[EMAIL PROTECTED]> wrote: > > It seems the api for the login method has changed. When I try to use > the login method like so: > login(request,user), I get an error that login has just 1 argument, and > 2 are provided. When I provide just the request object to the login >

Re: Multiple applications One server Big problem.

2006-08-15 Thread Joseph Kocherhans
On 8/15/06, Seth Buntin <[EMAIL PROTECTED]> wrote: > > When I restart my server, and go to /ncate/manager I get the right > application. But if I log out of that application and go to > /kate/tick/ I get the /ncate/manager application. This will happen > visa-versa. I first go to /kate/tick,

Re: Http authentication and the multiple auth backend model.

2006-08-09 Thread Joseph Kocherhans
On 8/8/06, Pawel J. Sawicki <[EMAIL PROTECTED]> wrote: > > So my question is the following :) > > Does the new "Multiple Auth Backend" model really make the "middleware > approach" for the http authentication obsolete? It doesn't make the middleware approach obsolete, though it should. The login

Re: Re: Template widget size

2006-07-28 Thread Joseph Kocherhans
On 7/28/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > Once we take one thing, where does it stop? Ultimately, we are going to > have to draw the line and it will seem arbitrary to people who aren't > thinking of this as "every single presentation item in a model is there > as a slight

Re: Bug in login method?

2006-07-10 Thread Joseph Kocherhans
On 7/10/06, mamcxyz <[EMAIL PROTECTED]> wrote: > > The login method in django\django\contrib\auth__init__.py > > say: > > def login(request, user): > """ > Persist a user id and a backend in the request. This way a user > doesn't > have to reauthenticate on every request. > """ >

Re: SuspiciousOperation: User tampered with session cookie

2006-06-27 Thread Joseph Kocherhans
On 6/27/06, Patrick J. Anderson <[EMAIL PROTECTED]> wrote: > > I've heard that the problem might be related to md5 hashing (someone > just recently posted it here in the groups with the same error > message). I suspect that it is. I've run into the same problem when I inadvertently changed the

Re: Site testing How-To

2006-06-06 Thread Joseph Kocherhans
On 6/6/06, Todd O'Bryan <[EMAIL PROTECTED]> wrote: > > Does anyone know of a way to get all attributes of a module into > another module while overriding just a few? I think you want tocreate something like testsettings.py, and in that file do something like: from myproject.settings import

Re: Nose about future

2006-06-06 Thread Joseph Kocherhans
On 6/6/06, Nagy Károly <[EMAIL PROTECTED]> wrote: > > 1. what are those areas of api or framework where we encounter major > rewrites interfacing with it > 2. arrival time of 1.0 This is the most up to date plan for 1.0 http://code.djangoproject.com/wiki/VersionOneFeatures When will it be

Re: Member logins and member management

2006-05-26 Thread Joseph Kocherhans
On 5/26/06, Rob Hudson <[EMAIL PROTECTED]> wrote: > > I've built a small website for a club with Django trunk so far and it's > working very well. I'm ready to start thinking about member management > -- user account creation, logins, member list and details pages, etc. > > IIRC, there was some

Re: Admin, display related 'last modified' field

2006-05-25 Thread Joseph Kocherhans
On 5/25/06, Eric Walstad <[EMAIL PROTECTED]> wrote: > > Yes, I suspect this is more than a one-off issue. I'd also like to see the > last modified timestamp on the Project's related ProjectFiles. Can you point > me to documentation on how to whip up a new admin widget and direct the admin >

Re: Admin, display related 'last modified' field

2006-05-25 Thread Joseph Kocherhans
On 5/25/06, Eric Walstad <[EMAIL PROTECTED]> wrote: > > My 'Projects' admin form has 'Notes'. Notes have a non-user-editable 'note > date' DateTimeField. I haven't been able to figure out how to get the note > date to get displayed in the admin interface in such a way that it's visible > but

Re: unescaped html in admin column

2006-05-25 Thread Joseph Kocherhans
On 5/25/06, qhfgva <[EMAIL PROTECTED]> wrote: > > In order to fit more columns of data on the screen in the admin, I > tried the following: > > # for use in list_display > def combined_cols(self): > return '%s%s%s' % (self.col1, self.col2,sel.col3) > > Which displayed the '' in the output. >

Re: ordering by foreign key

2006-05-22 Thread Joseph Kocherhans
On 5/22/06, Douglas Campos <[EMAIL PROTECTED]> wrote: > i have a model formed by : > vendor = foreign key > name, ver, rev, etc > > how can i order by vendor first? > ordering = [ 'vendor', 'name' ] fails > > any ideas? Ordering by a foreign key isn't technically supported at this point, but

Re: no INSTALLED_APPS

2006-05-19 Thread Joseph Kocherhans
On 5/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Stirman$ echo $PYTHONPATH > /Users/Stirman/Library/Frameworks/Python.framework/Versions/2.4:/Users/Stirman/Development/django_src > > still same issue?! > > On #2, I assume you were referring to the PYTHONPATH, not the PATH, > right?

Re: no INSTALLED_APPS

2006-05-19 Thread Joseph Kocherhans
On 5/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > >>> import sys > >>> print sys.path > ['', > '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python23.zip', > '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3', >

Re: no INSTALLED_APPS

2006-05-18 Thread Joseph Kocherhans
On 5/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > same thing: > > File > "/Users/Stirman/Development/django_src/django/bin/django-admin.py", > line 2, in ? > from django.core import management > ImportError: No module named django.core > > Man, didn't know we would be jumping

Re: no INSTALLED_APPS

2006-05-18 Thread Joseph Kocherhans
On 5/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I think we're getting closer... fixed my .bashrc file, both the PATH > and PYTHONPATH var's as follows: > > PATH=$PATH:$HOME/bin:/usr/local/bin:/usr/local/mysql/bin:$HOME/Development/django_src/django/bin >

Re: no INSTALLED_APPS

2006-05-18 Thread Joseph Kocherhans
On 5/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Okay, my easy-install.pth only has one line now: > /Library/Python/2.3/site-packages/setuptools-0.6a9-py2.3.egg > > I found my newer installation of django at: > ~/Development/django_src > > and my PYTHONPATH variable in .bashrc: >

Re: no INSTALLED_APPS

2006-05-18 Thread Joseph Kocherhans
On 5/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Still the same error... maybe this is an indication that my svn install > didn't work as I thought it did. If I do have teh dev build of django, > where would I find it? That error is definitely related to the egg though. The newest

Re: no INSTALLED_APPS

2006-05-18 Thread Joseph Kocherhans
On 5/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > errr, kind of confused: > > /Library/Python/2.3/site-packages/Django-0.91-py2.3.egg/django/ > > The .egg is a directory with the django stuff in it? If I remove that > directory and try to start a django project, I get: I would have

Re: multi-auth branch

2006-05-16 Thread Joseph Kocherhans
On 5/16/06, gabor <[EMAIL PROTECTED]> wrote: > > Joseph Kocherhans wrote: > > On 5/16/06, Douglas Campos <[EMAIL PROTECTED]> wrote: > >> the multi-auth branch targets some kind of 100% external auth? because > >> i've seen some approach using ldap+djang

Re: multi-auth branch

2006-05-16 Thread Joseph Kocherhans
On 5/16/06, Douglas Campos <[EMAIL PROTECTED]> wrote: > the multi-auth branch targets some kind of 100% external auth? because > i've seen some approach using ldap+django users I'm not sure what you mean by "100% external" but the backends that get used are controlled by the

Re: Using existing database shema

2006-05-16 Thread Joseph Kocherhans
On 5/16/06, Filipe <[EMAIL PROTECTED]> wrote: > Do you think I'll find difficulties in using model classes with my own > data persistency logic? In such case, will I loose other features > besides the ORMapping itself? (I've read something about loosing > autogenerated admin pages, form

Re: multi-auth branch

2006-05-16 Thread Joseph Kocherhans
On 5/16/06, Douglas Campos <[EMAIL PROTECTED]> wrote: > Does anyone have news about it? progress, etc The implementation is pretty much finished and committed. I have most of the docs written, but I still need to review and commit them. Someone has already written an LDAP backend and posted it

Re: Runserver from 0.95 problems

2006-05-12 Thread Joseph Kocherhans
On 5/12/06, tomass <[EMAIL PROTECTED]> wrote: > > Installed from subversion. Ran "django-admin.py startproject > greenleaftech; cd greenleaftech; python manage.py runserver" and I get > the following. Can anyone help out? > > Thanks, Tom > > > python manage.py runserver > Validating models... >

Re: Database replication question

2006-05-12 Thread Joseph Kocherhans
On 5/12/06, hernan43 <[EMAIL PROTECTED]> wrote: > > Some time ago there was a > thread(http://groups.google.com/group/django-users/browse_thread/thread/d08f4975da831bb/42a458eba506cda9?q=database+replication=1#42a458eba506cda9) > on the Django list that alluded to adding this type of capability

Re: Best practice for separating Model and Control?

2006-05-11 Thread Joseph Kocherhans
On 5/11/06, Ned Batchelder <[EMAIL PROTECTED]> wrote: > > Is there some way to put the model and the logic in two separate places > but somehow end up with an object class with real methods? Am I making > any sense? I think what you may want to do there (and this may be a shot in the dark) is

Re: Model Inheritance

2006-05-11 Thread Joseph Kocherhans
On 5/6/06, Jason F. McBrayer <[EMAIL PROTECTED]> wrote: > > Let me know when and how I can help on the new-auth branch. I've commited the code at this point, but I still need to revise the docs I've written. I hope to commit those tonight. For an example of how to write a backend you can check

Re: Accessing request.user in urls.py

2006-05-09 Thread Joseph Kocherhans
On 5/9/06, tomass <[EMAIL PROTECTED]> wrote: > > The subject says it, really. Is there any way to access the > request.user in the urls.py. Nope, and there won't be due to decoupling and all. I'd recommend creating your own view that just wraps the generic view. Something like this: from

Re: Subclassing question

2006-05-08 Thread Joseph Kocherhans
On 5/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I've created the following model: > > class Place(models.Model): > name = models.CharField(maxlength=100) > > class Continent(Place): > pass > > class Country(Place): > superLocal = models.ForeignKey(Continent) > > In the

Re: Install woes: error "python: can't open file 'django-admin.py' "

2006-05-05 Thread Joseph Kocherhans
On 5/5/06, jbrewer <[EMAIL PROTECTED]> wrote: > > How do I get things "on my path"? Where is the file that points all > this stuff together? This is drifting waaay off topic but here's the short answer :)

Re: Model Inheritance

2006-05-05 Thread Joseph Kocherhans
On 5/5/06, Jason F. McBrayer <[EMAIL PROTECTED]> wrote: > > "Joseph Kocherhans" <[EMAIL PROTECTED]> writes: > > > Yeah, it hasn't been implemented yet. I'd be (pleasantly) surprised to > > see it finished before the end of the summer. Your best bet is

Re: Install woes: error "python: can't open file 'django-admin.py' "

2006-05-05 Thread Joseph Kocherhans
On 5/5/06, jbrewer <[EMAIL PROTECTED]> wrote: > > If I just run "port install py-sqlite" I get a -bash: port - command > not found. But if I use PortAuthority (GUI) then it does it. > > I am wondering if the darwin port folder is located in /opt/local/bin > and the other stuff (svn, fcgi) is in

Re: Install woes: error "python: can't open file 'django-admin.py' "

2006-05-05 Thread Joseph Kocherhans
On 5/5/06, Glenn Tenney <[EMAIL PROTECTED]> wrote: > > On Fri, May 05, 2006 at 06:23:48PM -, jbrewer wrote: > > But when I used DarwinPorts of SQLite it installed Python 2.4 here: > > > > /opt/local/bin - and located here also is sqlite3 > > Remember, I said to look at ALL of the comments

Re: save() called 2 times.

2006-05-05 Thread Joseph Kocherhans
On 5/5/06, Davide Bertola <[EMAIL PROTECTED]> wrote: > > Victor : in that post it says that _post_save() is called twice, I > tryed to create that _post_save() but I see nobody calls it. _post_save is a hook method that was used before the magic-removal branch was merged. Now you just override

Re: syncdb

2006-05-05 Thread Joseph Kocherhans
On 5/5/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I'm new so bear with me :) What should I be using instead of > "manage.py syncdb" for the DB stuff? I am attempting to do the > Tutorial on the site but i have noticed there have been changes to the > Framework since the tutorial was

Re: Model Inheritance

2006-05-05 Thread Joseph Kocherhans
On 5/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I want to use Model Inheritance, so I read this article > http://code.djangoproject.com/wiki/ModelInheritance > but it seems that it's only a proposal and has not been implemented, > right? > Does it mean that I can't use it at this

Re: Install woes: error "python: can't open file 'django-admin.py' "

2006-05-04 Thread Joseph Kocherhans
On 5/4/06, jbrewer <[EMAIL PROTECTED]> wrote: > > I have tried to install the MySQLdb and keep getting this error: > > error: command 'gcc' failed with exit status 1 > > at the end of a bunch of stuff. > > When I do a "locate MySQLdb" command nothing comes back, so I am > assuming it isn't

Re: Install woes: error "python: can't open file 'django-admin.py' "

2006-05-04 Thread Joseph Kocherhans
On 5/4/06, jbrewer <[EMAIL PROTECTED]> wrote: > > raise ImproperlyConfigured, "Could not load database backend: %s. > Is your DATABASE_ENGINE setting (currently, %r) spelled correctly? > Available options are: %s" % \ > django.core.exceptions.ImproperlyConfigured: Could not load database >

Re: How can users only edit their own files?

2006-04-27 Thread Joseph Kocherhans
On 4/27/06, Norbert <[EMAIL PROTECTED]> wrote: > > I remember reading somewhere in the docs a while back that this was not > officially supported. Has this changed in MR, or has someone > implemented this with a hack or two? It's still not supported, and likely won't be until sometime after 1.0

Re: Manipulators and non-editable fields

2006-04-21 Thread Joseph Kocherhans
On 4/21/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I'm trying to validate fields for a comments app I'm working on. As > part of the model I have a few non-editable fields, IP address and date. > Can non-editable fields be validated or even saved when using a > manipulator? By

Re: maxlength in the Admin site

2006-04-19 Thread Joseph Kocherhans
On 4/19/06, Joseph Kocherhans <[EMAIL PROTECTED]> wrote: > On 4/19/06, argus <[EMAIL PROTECTED]> wrote: > > > > Is there any reason that there's not a way to specify/override the size > > of the form field that gets used in templates (separately from what > >

Re: maxlength in the Admin site

2006-04-19 Thread Joseph Kocherhans
On 4/19/06, argus <[EMAIL PROTECTED]> wrote: > > Is there any reason that there's not a way to specify/override the size > of the form field that gets used in templates (separately from what > gets used in the admin interface)? I can't think of one, and it's been > something of a thorn in my

Re: database tables creation error: [magic-removal]

2006-04-18 Thread Joseph Kocherhans
On 4/18/06, Douglas Campos <[EMAIL PROTECTED]> wrote: > > Thanks, Don't It need to be more verbose at docs? > > If i can help... The docs in the link I sent you are very explicit and they are the primary docs for Models and Fields. Are there other docs that you're talking about? Joseph

Re: database tables creation error: [magic-removal]

2006-04-18 Thread Joseph Kocherhans
On 4/18/06, Douglas Campos <[EMAIL PROTECTED]> wrote: > > even if I specify the blank=True flag on field creation, it insists on > creating the field on database with NOT NULL You must use null=True as well. See http://www.djangoproject.com/documentation/model_api/#general-field-options Joseph

Re: Importing external modules/classes

2006-04-13 Thread Joseph Kocherhans
On 4/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I've developed a library of code in python that I reuse across multiple > projects, and I wanted to be able to use some of these classes/modules > with Django but I've had some problems. I have defined the PYTHONPATH > env variable (in

Re: How to exclude in limit_choices_to (magic removal)

2006-04-03 Thread Joseph Kocherhans
On 4/3/06, Rudolph <[EMAIL PROTECTED]> wrote: > > Is this worth a bug report? Seems like a bug ... > Yeah. Please file a ticket. This is a bug. Joseph --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Using Two Combo Boxes and moving items between them

2006-03-31 Thread Joseph Kocherhans
On 3/31/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I want to create a form that has a section with two combo boxes, the > first combo box is a list of items. The user can then use buttons to > move an item from one combobox to the other. The items in the second > combobox I want to read

Re: OneToOneField

2006-03-29 Thread Joseph Kocherhans
On 3/29/06, Joseph Kocherhans <[EMAIL PROTECTED]> wrote: > > If someone would file a ticket for this (if they haven't already) that > would be great. I'll look at it in a few days if no one else has. I'm > trying to wrap up some other project this week. Oops. Nevermind about

Re: OneToOneField

2006-03-29 Thread Joseph Kocherhans
On 3/29/06, layik <[EMAIL PROTECTED]> wrote: > > Hello there, > > sorry to bother you. > > I was wondering if you have solved your OneToOne problem. if so could > let me know how I could solve it as well?? > thanks > > > ChaosKCW wrote: > > Agreeded, I am trying to use OneToOne in MR branch and

Re: First topic

2006-03-09 Thread Joseph Kocherhans
On 3/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Could talk how many web sites (at least, some famous) are done with > Django? There's a list on Django's homepage http://www.djangoproject.com/ And also on the wiki http://code.djangoproject.com/wiki/DjangoPoweredSites Joseph

Re: Disabled fields in admin interface

2006-03-07 Thread Joseph Kocherhans
On 3/7/06, JirkaJ <[EMAIL PROTECTED]> wrote: > > Hello, > i am a newbie with django so sorry for propably stupid question :). > Is it possible to make some field visible and not editable in admin > interface? when i set editable option to False it disappeared from that > interface(as is said in

Re: LDAP _without_ built-in Django user authentication

2006-03-07 Thread Joseph Kocherhans
On 3/7/06, Matt <[EMAIL PROTECTED]> wrote: > > I've read about a 'hack' Jason Huggins posted a month ago. He > implements LDAP support for his Django app, but it requires every user > to be in both LDAP and the user database table. This seems pointless > to me. Either you use Django's built-in

Re: putting a database object in a session

2006-03-05 Thread Joseph Kocherhans
On 3/5/06, Jeremy Jones <[EMAIL PROTECTED]> wrote: > > Is it bad form to put a database object in a session variable? It > really just feels wrong, but it works. Typically, I would just put the > object's ID in a session variable and retrieve the object when I next > needed it, but I

Re: meta.Admin 'fleids' option

2006-01-23 Thread Joseph Kocherhans
On 1/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi! > > I'm trying to use class 'collapse' in 'fields' option, like this: > class META: > ordering = ['title'] > admin = meta.Admin( > list_display = ('title',), > fields = ( >

Re: create object method

2006-01-14 Thread Joseph Kocherhans
On 1/14/06, The Boss <[EMAIL PROTECTED]> wrote: > > but when I try to put a check into add_related that says to create a > new group if the person doesn't yet have one > (by using > g=group.Group(name='x') > g.save() > > it tells me that global name groups is not defined, despite having > defined

Re: Django and MS SQL

2006-01-12 Thread Joseph Kocherhans
On 1/12/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > On 1/12/06, Rich Bakos <[EMAIL PROTECTED]> wrote: > > The pymssql driver only supports DB-LIB, which is way outdated and you > > wont have access to functionality added to MSSQL after version 6.5. > > This is not the best option IMHO. > >

Re: Common Practice with Models and Views

2006-01-11 Thread Joseph Kocherhans
On 1/11/06, Mike <[EMAIL PROTECTED]> wrote: > > Hi, > > With models, is it common practice to place all models in a single file > or multiple files? (I have a huge model) > > With views, is it common practice to place all views in a single file? > It seems like django encourages that by removing

Re: manipulators and action log

2006-01-09 Thread Joseph Kocherhans
On 1/8/06, patrickk <[EMAIL PROTECTED]> wrote: > > > when using AddManipulator or ChangeManipulator, is there a convenient > > way of logging actions in admin_log? > > hmm, something wrong with this question? > i´d really appreciate some help. Could you be a little more specific? Currently,

  1   2   >