Customize behavior of admin inlines

2010-10-22 Thread Bojan Mihelac
I would like to customize behavior of admin inlines interface so when the editor edit a parent model he is offered with all possible variations of child objects. Here is simplified use case: class Shirt(models.Model): name = models.CharField(max_length=80) class Color

Re: Behaviour of related objects

2009-10-26 Thread Bojan Mihelac
On Oct 26, 5:22 am, Preston Holmes wrote: > On Oct 25, 2:55 pm, Bojan Mihelac wrote: > > > Hi all, > > > given an many_to_one doctests with Reporter/Article models, the > > following example would fail with "IntegrityError: > > many_to_one_article.rep

Behaviour of related objects

2009-10-25 Thread Bojan Mihelac
Hi all, given an many_to_one doctests with Reporter/Article models, the following example would fail with "IntegrityError: many_to_one_article.reporter_id may not be NULL": >>> r = Reporter(first_name='John', last_name='Smith', email='j...@example.com') >>> a = Article(headline="This is a test",

Re: Suggestion: IPAddressFields should take auto_now and auto_now_add

2009-05-29 Thread Bojan Mihelac
James, I don't think model should know anything about request like is IP address. This would violate MVC principle. Bojan On May 29, 1:25 am, JamesJOG wrote: > I have a model with an IPAddressField (1) and some views that have to > write to that field every time they save (2) ... Wouldn't it be

Re: Pass result of a template filter to tag

2009-05-26 Thread Bojan Mihelac
On May 26, 11:05 am, Bojan Mihelac wrote: > Hi all, > > is there a way to pass result of a template filter to some tag for > further processing? > > {% some_tag content|textile %} > > The best I came so far is something like: > > {% textile content as cont

Re: Pass result of a template filter to tag

2009-05-26 Thread Bojan Mihelac
On May 26, 11:27 am, Sam Kuper wrote: > 2009/5/26 Bojan Mihelac > > > is there a way to pass result of a template filter to some tag for > > further processing? > > > {% some_tag content|textile %} > > > The best I came so far is something like:

Pass result of a template filter to tag

2009-05-26 Thread Bojan Mihelac
Hi all, is there a way to pass result of a template filter to some tag for further processing? {% some_tag content|textile %} The best I came so far is something like: {% textile content as content2 %} {% some_tag content2 %} With this textile, or any other filter should be rewritten as a tag

Re: Add fields to another app model

2008-12-05 Thread Bojan Mihelac
> > Have a poke around in loads of the project on Google Code though, see > what other people are doing, and how they're tackling problems like > you'll soon start having your own ideas about how to do stuff. > > Hope all that helps. > > RM > > On Dec 4, 8:45 am,

Add fields to another app model

2008-12-04 Thread Bojan Mihelac
Hi all! I am looking for right way to add fields to model that is in another app. At first I created mysite application and in models.py put from satchmo.contact.models import Contact Contact.add_to_class("company_name", models.CharField(max_length = 200)) that raises exception ProgrammingError

Re: Deploying Django Apache mod_python

2008-09-25 Thread Bojan Mihelac
Would this help: PythonPath "['/home/user/projects', '/home/user/projects/myproject'] + sys.path" Bojan On Sep 25, 6:17 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to deploy my django project, but when I go to any urls of > the project I get this error: > > Mod_pytho

Re: Open URL from Django

2008-09-07 Thread Bojan Mihelac
Eric, thanks for answer, this make sense and I am aware of TestClient. Was not sure if this is an error... Bojan On Sep 7, 2:02 pm, Eric Abrahamsen <[EMAIL PROTECTED]> wrote: > On Sep 7, 2008, at 6:40 PM, Bojan Mihelac wrote: > > > > > I have try similiar code under bo

Re: Open URL from Django

2008-09-07 Thread Bojan Mihelac
I have try similiar code under both Django dev server and Apache/ mod_python. Apache did load the result, while Django server did not. Is this maybe threading issue? here is samplecode: #views.py from django.http import HttpResponse from django.core import urlresolvers import urllib2 def test_

Open URL from Django

2008-09-07 Thread Bojan Mihelac
Hi all, I am trying to load page that is on the same server but Django just hangs. If connection on another sever is opened it works as expected. Is this because the local server does not support more then 1 request at a time, or some other thing? This is minimized code: #views.py from django.

Re: Nesting inlines with django-admin

2008-08-31 Thread Bojan Mihelac
If this is impossible/hard to achive is maybe possible to achive this with virtual attributes on model that are not mapped to database table and to override save() method on model to save this virtual attributes in specific tables? On Aug 31, 6:25 pm, Bojan Mihelac <[EMAIL PROTECTED]>

Nesting inlines with django-admin

2008-08-31 Thread Bojan Mihelac
solution would be helpful. Thanks, Bojan Mihelac --~--~-~--~~~---~--~~ 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