Re: development server and settings.MEDIA_ROOT

2008-01-18 Thread Grindizer
> But why django use this path but not that was defined at > settings.MEDIA_ROOT? Because ADMIN_MEDIA_PREFIX is set to "/media/" so the url "http:// localhost:8000/media/" makes django point to the admin media directory. To serve your own media juste choose another url for that, may be like thi

Re: I think the django's froms js too complicated and not flexible , is there anybody agree?

2008-01-17 Thread Grindizer
Writing a html form is a very repetitive task: design a form (generaly taken from some db field), prepare the html, render it, get the result, validate it, and save it to db. newforms lib gathers all what this tasks have in commun (and some times more) and i'am really convinced that it is far to b

Re: Private (owner) vs. public records

2008-01-17 Thread Grindizer
can save us a lot of work, and result in a more clear views code and template. I know that it is not very good, but it is like evil, it is tempting :-) On 17 jan, 12:07, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Jan 17, 2008 5:00 AM, Grindizer <[EMAIL PROTECTED]> w

Re: Private (owner) vs. public records

2008-01-17 Thread Grindizer
- If you want retrieve all Person objects that can be viewed by a user, this is possible with this query: persons = Person.objects.filter( Q(owner=my_user) | Q(public=True) ) my_user is the current logged user, so this query, in designed to be executed in a view function. - If you want to retri

Re: problem with django admin after update to development version

2008-01-14 Thread Grindizer
on. > > > """ > > Tried home1 in module prog_innov.views. Error was: 'module' object has > > no attribute 'home1' > > """ > > > Uncomment it or remove this view from urls.py > > > On 14 янв, 17:29, Ro

Re: ManyToManyField - referencing attribute

2008-01-14 Thread Grindizer
{% for cat in client.categories.all %} {% ifequal cat category %} ... {% endif %} {% endfor %} I don't really test it, but think it should work. But i think olso that it is not a good approch: If your goal is to do somthing only with cleints that belong to a specifique category (given to te

Re: problem with django admin after update to development version

2008-01-14 Thread Grindizer
> #def home1(request) > # return HttpResponseRedirect('http://www.innovatorieuropei.com/ are this lines commented in you code ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to thi

Re: Curious bugs with middleware (but possible with other features).

2008-01-13 Thread Grindizer
On 13 jan, 13:14, Alex Koshelev <[EMAIL PROTECTED]> wrote: > You wrote: > >  P/ >   APP2/ >     middlewares.py -> MyMiddleware > > And then: > 'P.APP2.middlewares.ProfileMiddleware', > > MyMiddleware != ProfileMiddleware > > Is it right? &g

Curious bugs with middleware (but possible with other features).

2008-01-13 Thread Grindizer
Hello. I have one project let say P, In this project i define several applications, APP1, APP2, APP3 In INSTALLED_APPS of my settings i add those application with full name, ("P.APP1", "P.APP2", etc.) and all was working fine. (Admin interface and front end). After i wrote a middleware class f

Re: Problem with two applications importing models from each other?

2008-01-11 Thread Grindizer
On 10 jan, 22:00, Josh Ourisman <[EMAIL PROTECTED]> wrote: > It's for the purpose of defining foreign keys. Basically, ClassA1 > needs to be able to reference ClassB1 and ClassB2 as foreign keys, > while ClassB3 needs to reference ClassA1 as a foreign key. > > More specifically, the project has

Re: models and python circular import

2008-01-11 Thread Grindizer
On 8 jan, 14:54, Alex Koshelev <[EMAIL PROTECTED]> wrote: > Its very strange that so "hard linked" applications can produce clean > and logic architecture:) g ! :-) You were rigth, finally i review my project's logic, and then put ModelsA3 where it shoud be, i.e in app B, and now it's more

models and python circular import

2008-01-08 Thread Grindizer
Hello. I have a project with at least 2 applications A, which define ModelA1, ModelA2, ModelA3 (and other). B, which define ModelB1, ModelB2. And I have these dependencies: In A: - ModelsA1 need as a foreign key ModelB1 - ModelsA2 need ModelB2 (ManyToManyField) In B: - ModelB2 need ModelA3 (F

Re: Stupid template question

2007-12-14 Thread Grindizer
have you take a look at the django documentation ? http://www.djangoproject.com/documentation/templates/#for Because we can see this :) {% for key, value in data.items %} {{ key }}: {{ value }} {% endfor %} On 14 déc, 08:03, Steve Freitas <[EMAIL PROTECTED]> wrote: > I have a dictionary, an