> 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
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
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
- 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
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
{% 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
> #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
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
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
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
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
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
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
13 matches
Mail list logo