Hello,
I think you should use virtualenv for lot of reasons:
* it is easy to use
* you can even change you python interpreter according context without
mixing accidentally libs from previous version, for example
* you can test if upgrading a library, module, app doesn't break your
project (yo
Hello,
I don't accuratly understand what your asking for, sorry. Have you seen
what's in http://docs.djangoproject.com/en/1.2/topics/auth/ ? I think
that views.password_change already manages what your describing. If not,
could you express what doesn't fit your expectations, please?
Regards
Axel,
You should use "related_name" attribute in your models.ForeignKey fields.
Regards
Le 18/09/2010 08:26, Axel Bock a écrit :
Hello,
I am currently experimenting with a little webapp, and I have the
following problem. I want to assign two properties of the same type to
a class. (Stupid)
Hello,
I was quite laconic previously in order to spare you my "english". Sorry
if you found this rude.
Well, you describe the relashionship from one model perspective (Meal)
while setting your field (side1).By setting Field side1 in Meal as
models.ForeignKey, you state that a Meal has a re
Hello,
You're assuming that form are called only from views. Some Form methods
are mostly used inside templates like as_p for example. Another
assumption you made is that all url point to html ressources. Images,
javascripts can have their url. Generation of pdf, csv and AJAX
mechanics are o
Le 25/09/2010 14:52, werefr0g a écrit :
You're assuming that form are called only from views. Some Form
methods are mostly used inside templates like as_p for example.
Sorry for the double post but this statement is far from accurate (to be
kind with myself). You can use form in a tem
Hello,
I'm not legitimate to answer you but I'm adding other options that
experienced people can comment.
I'd rather use a ForeignKey in that context but I don't have to think to
much to performances in my apps. You can easily add status, handle i18n
this way. I must confess that writing "d
Hello,
I searched the web for your error message and found that maybe you
should see at INSTALLED_APPS level [1].
Regards,
[1] http://www.pubbs.net/200908/django/40799-django-sites-framework.html
--
You received this message because you are subscribed to the Google Groups "Django
users" gr
Hello,
The following is quite long but reflects a non developper point of view.
I'll expose briefly that business analysis already splits logic and why
I think you should follow previous recommandations. I'll finish "out of
subject" commenting your documentation request.
> Split business lo
Hi,
You should check that your file is actually utf-8 encoded and add the
folliwing right after shebang:
# -*- coding: utf-8 -*-
Le 29/09/2010 18:59, jean polo a écrit :
Hi.
I get an 'UnicodeEncodeError' if I upload a file (ImageField) with non-
ascii chars in my application (django-1.2.1).
Isn't the filename a string?
It may not be the solution but I think you should try them at least
since they are very quick to apply. As I saw something implying os
module I thought that before Django handles the string, it must encode
by os module.
I found that using previously written step
Jean,
Sorry, the three points are:
> # -*- coding: utf-8 -*- line
> checking the module's file is actually utf-8 encoded
> using codecs module for file like read/ write operations.
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to t
Tu peux m'envoyer ton fichier ? je vérifie son encodage. Sinon, quel
OS utilises-tu ?
Le 29/09/2010 23:14, jean polo a écrit :
On Sep 29, 10:38 pm, werefr0g wrote:
Jean,
Sorry, the three points are:
># -*- coding: utf-8 -*- line
> checking the module's file i
Sorry, sorry I proposed Jean to send me the actual file to check
its encoding. I asked for his OS too in order to see what editor are
available and how it allows to "transcode" the text.
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To
Hello,
I think you should use something like alt="{{ object.title }}" /> in your template: you want to output images'
url in your template, not the "object" itself. You'll find explanations
in [1] and [2].
Regards
[1]
http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.
Hello,
You have defined "MyClass" for "foo" application in its models.py, and
you want to use that class in your application "bar"?
You'll find how to use models from another app in Django documentation
[1]. A widly spread example is the import of User in your app from
django.contrib.auth [2
Bence,
I think your problem is related to the second case described in
documentation about validation fields that depend on each other [1].
Just an observation about your design, if I may: I believe you should
explicitly set and store both addresses. You will ease user task by
providing a wi
Hi Matt,
I think your form should use GET method, not POST method: there is no
modification implied when submitting it.
Now, I'm perfectly fine using parameters in the url as it is meaningful:
your accessing the search ressource and passing it a parameter. It's
different for a ressource that
Hello,
Sorry if I misunderstand, but what is wrong about using a ModelForm on
your Film bounded to the film instance?
Regards
--
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.
Hello,
You should substitute 'subgallery_set' to 'subGallery_set' (different in
case) or specify a related_name [1] .
Regards
[1]
http://docs.djangoproject.com/en/dev/topics/db/queries/#many-to-many-relationships
--
You received this message because you are subscribed to the Google Groups
On Thu, Mar 3, 2011 at 11:50 AM, werefr0g wrote:
Hello,
Sorry if I misunderstand, but what is wrong about using a ModelForm on your
Film bounded to the film instance?
My bad... how did I missed the intermediary model involved in the
ManyToMany relashionship. Sorry.
When I tried that I kept
sorry, I failed to pass the request to the view's function,..
Le 04/03/2011 22:08, werefr0g a écrit :
On Thu, Mar 3, 2011 at 11:50 AM, werefr0g wrote:
Hello,
Sorry if I misunderstand, but what is wrong about using a ModelForm on your
Film bounded to the film instance?
My bad... how
Le 05/03/2011 00:01, kgardenia42 a écrit :
Thanks. This is pretty close to what I'm doing. However, I'd like to
not have to write all the associated boiler-plate (i.e. I have to
figure out if any film/actor relationships have been deleted since the
last save and explicitly write code to remo
Hello,
Can Model.clean() method help you? [1] You'll still have to pay
attention to validation before trying to save your instances.[2]
Regards,
[1]
http://docs.djangoproject.com/en/dev/ref/models/instances/#django.db.models.Model.clean
[2] http://docs.djangoproject.com/en/dev/releases/1.2/
Hi,
As far I can tell from the documentation, to use Django's extended
TestCase, you should use django.test.TestCase [1]. Using
django.utils.unittest allows you to benefit from python 2.7 unittest2
library, [2]
Regards,
[1]
http://docs.djangoproject.com/en/dev/topics/testing/#django.test.T
Well,
MAX_CUISINES = 3
def clean(self):
# three cuisines max. allowed
if self.pk is None:
# That's the case that raise the error
# you're inserting a new Restaurant
pass
else:
# Here, you're editing an existing Restaurant
Hello,
I'd rather check for self.pk as you can use primary_key argument on a
field whatever is its name.
Regards,
--
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 unsubscr
Hello,
If you use a paginator [1], you'll prepare the "index number" in the
view but this will provide all the context you need in your template.
Regards,
[1] http://docs.djangoproject.com/en/dev/topics/pagination/
--
You received this message because you are subscribed to the Google Groups
Check this link.
http://www.djangobook.com/en/2.0/chapter19/
I think this is an example about what you are looking for:
__
_{% for lang in LANGUAGES %}
{{ lang.1 }}
{% endfor %}_
__
On Tue, Mar 15, 2011 at 3:04 PM, werefr0g <mailto:weref...@yahoo.fr>> wrote:
Sorry again,
Actually, the doc tell us the way [1]. Simply use {{ forloop.counter }}
or {{ forloop.counter0 }}.
Regards,
--
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 u
Well... here is the lin (right into the relevant section) :
http://docs.djangoproject.com/en/dev/ref/templates/builtins/#for
--
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 u
Hi Bobby,
Maybe some mistake on your url.py, for example if you have an app named
"app" and a model named "model", you'll try to get this url to add a new
"model"
/admin/app/model/add/
Usually, you'll write your urls.py like this:
(r'^app/', include('app.urls')),
(r'^admin/', includ
Hello,
I believe you need related_name, for disambiguation at least. Maybe by
setting a db_table you can bypass the related_name but I'm not convinced.
Actually, I'm "parasiting" your post to ask when "[we]'d prefer Django
didn't create a backwards relation"?
Regards,
--
You received this
Hi,
you can try {{ list.0.title }}
Regards,
--
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 this group, send email to
django-users+unsubscr...@googlegroup
Hi,
After seeing this [1], I use a "conf" package inside all my apps, with a
'settings.py' file.
Done properly, this enables you to provide defaults with your apps while
allowing to define custom settings at project level if iinside you
apps.conf.settings you check first if this value is set
Hank,
Would you mind posting the link on the list? I may be wrong, but I
believe that sending a message directly to someone is not in the
"etiquette". You'll also help keeping this list stalker friendly.
Regards,
--
You received this message because you are subscribed to the Google Groups "D
IMHO, while dealing with database data modifications from a csv file,
you should not let default commit on each save(). This will help you
preserve data from accidents (if something is wrong inside the serie,
maybe the serie shouldn't be processed) and you'll have better speed
processing these
Hello,
Maybe you mean:
>>> result =
A.objects.select_related().annotate(num_b=Count('b')).aggregate(max_num_b=Max(num_b))
>>> result['max_num_b']
In that case, you take each A value, count for each its related B
occurences, then retain the highest count.
Regards,
Le 06/04/2011 16:25, be
Well, I don't think it is safe but you can first retrive Max('pk') then,
you can increment its base 36 related number then use the result's
string equivalent.
Le 11/04/2011 08:48, GKR a écrit :
I meant to say not random. serial eg:
..
..
2A00A
2A00B
..
..
..
2A00Z
2A010
2A011
..
...
2
Are you using python 3?
--
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 this group, send email to
django-users+unsubscr...@googlegroups.com.
For more option
40 matches
Mail list logo