Maniac17 Sie. 23:57: Subject Model updates
I wonder how Django's object-relational mapping handles update to
models? Let's say I want to replace one old field with two new fields.
Can this be handled more or less automatically? Will I lose values from
this one field, or whole table, or whole
update :)
dot = [" dot "," [dot] ", " -dot- "," [kropka] "," _ "]
and
kropka = .
malpka/malpka = @
in pl_PL
kd.
your idea was QL :)
but this is may way:
django/utils/text.py:
def spamprotect(value):
'''Make Spam protected email address'''
at = [" at "," [at] ", " -at- "," [malpka] "," # ",]
dot = [" dot "," [dot] ", " -do-] "," [kropka] "," _ "]
import random
random_spam_protector = r
here's a quick filter I knocked up which will randomise the protection
(add some more into the lists for better randomisation).
There's probably a more correct place to put it, though I put it in
django/core/defaultfilters.py
def spamprotect(value, _):
"Make Spam protected email address"
On 8/24/05, Krzysztof Drozd <[EMAIL PROTECTED]> wrote:
> howto make django's emailFields spam safe?
> in admin Interface i put [EMAIL PROTECTED] byt in my view i get my]#[my.net or
> my[ape]_my_net
You can write a custom method on your model to return the "spam-safe"
version of the e-mail address
hi all
howto make django's emailFields spam safe?
in admin Interface i put [EMAIL PROTECTED] byt in my view i get my]#[my.net or
my[ape]_my_net
thanks kd.
Another possibility would be to simply encourage the placing of the
'project.apps' directory in the PYTHONPATH as well as the parent
directory of 'project'.
If this was the convention, then people could simply simply use the
form:
myproject.models.modulename
myproject.utils.anothermodule
etc.
T
In briefly playing around, I couldn't figure out a way to use the
INSTALLED_APPS tuple to extend the module path. I just don't have that
sort of kung-fu with python and manipulating modules.
The one thing I came up with instead is creating a new SETTING called
"EXTENSION_APPS_DIR". This would be
So, to add an app to a new project, you just need to include it in the
INSTALLED_APPS tuple as "ellington.apps.your_app_name"?
This works for me, but I am concerned about easily sharing applications
with other people and being able to do imports within my application.
My one suggestion is to use
On 8/24/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Because of this, "project.apps.application.module" should work and it
> does for me. But, this isn't ideal since I do want there to be a
> dependency on the project name in my apps that I want to be able to
> share and drag-and-drop into m
Is this by default? I don't have the 'apps' module from my project
available to me in my View. According to the instructions on the django
website, it is the "parent" directory of your project that you should
include in the path, not the project directory itself.
Because of this, "project.apps.ap
11 matches
Mail list logo