Maric Michaud wrote:
> Le Vendredi 09 Juin 2006 20:06, Ilias Lazaridis a écrit :
>> the code below works, but has the limitation that I cannot import the
>> syncdb_hook within "django.core.management".
>
> In [4]: from b import CONS
>
> In [5]: import b
>
> In [6]: b.CONS = 3
>
> In [7]: CONS
>
Le Vendredi 09 Juin 2006 20:06, Ilias Lazaridis a écrit :
> the code below works, but has the limitation that I cannot import the
> syncdb_hook within "django.core.management".
In [4]: from b import CONS
In [5]: import b
In [6]: b.CONS = 3
In [7]: CONS
Out[7]: 5
In [8]: from b import CONS
In
Slawomir Nowaczyk wrote:
> On Thu, 08 Jun 2006 15:28:39 +0300
> Ilias Lazaridis <[EMAIL PROTECTED]> wrote:
>
> #> *IMPORT*
> #>
> #> I would like to know, if this construct is valid, or if it can
> #> result in problems (that I do not see as a newcomer):
>
> The intricacies of import are far bey
Duncan Booth wrote:
> Ilias Lazaridis wrote:
>
>>> #patch_service.py
>>> from toto import service
>>>
>>> def my_impl(self, *args) :
>>> old_result = self._old_method(*args)
>>> # ...
>>> return new_result
>>>
>>> if not hasattr(service, '_old_method') :
>>> service._old_method
Ilias Lazaridis wrote:
>> #patch_service.py
>> from toto import service
>>
>> def my_impl(self, *args) :
>> old_result = self._old_method(*args)
>> # ...
>> return new_result
>>
>> if not hasattr(service, '_old_method') :
>> service._old_method = service.method
>> servic
Maric Michaud wrote:
> Le Jeudi 08 Juin 2006 14:28, Ilias Lazaridis a écrit :
>> Another possibility is to enlink (hook?) the functionality into an
>> existent function
>>
>> Is there any way (beside a patch) to alter the behaviour to an existing
>> function. Is ther a python construct similar to t
On Thu, 08 Jun 2006 15:28:39 +0300
Ilias Lazaridis <[EMAIL PROTECTED]> wrote:
#> *IMPORT*
#>
#> I would like to know, if this construct is valid, or if it can
#> result in problems (that I do not see as a newcomer):
The intricacies of import are far beyond me, but FWIW I do not see
anything wron
On Thu, 08 Jun 2006 06:05:35 -0700
"Tim N. van der Leeuw" <[EMAIL PROTECTED]> wrote:
#> Since your question is so much about Django, you might want to ask
#> on Django groups.
Now *that*, and the rest of your post, was uncalled for.
This thread is perfectly on topic for this list and the questio
Duncan Booth wrote:
> Ilias Lazaridis wrote:
>
>> I would like to know, if this construct is valid, or if it can result in
>> problems (that I do not see as a newcomer):
>>
>> 1082try:
>> 1083from django.rework.evolve import evolvedb
>> 1084except ImportError:
>>
Maric Michaud wrote:
> Le Jeudi 08 Juin 2006 15:15, Duncan Booth a écrit :
>> but the more usual way is just to call the original method directly in the
>> base class.
>>
>> class SqliteAdapter(BaseClass):
>> def create_table(self, *args)
>> self.table_evolve(*args)
>> result =
Tim N. van der Leeuw wrote:
[...]
http://case.lazaridis.com/wiki/Please
.
--
http://lazaridis.com
--
http://mail.python.org/mailman/listinfo/python-list
Le Jeudi 08 Juin 2006 15:15, Duncan Booth a écrit :
> but the more usual way is just to call the original method directly in the
> base class.
>
> class SqliteAdapter(BaseClass):
> def create_table(self, *args)
> self.table_evolve(*args)
> result = BaseClass.create_table(self, *
Since your question is so much about Django, you might want to ask on
Django groups.
Oops, you're not welcome there anymore, almost forgot.
But if merely reading the subject of a posting I already know who's the
poster, it's perhaps a bad sign.
Further readers of this thread might be interested
Le Jeudi 08 Juin 2006 14:28, Ilias Lazaridis a écrit :
> Another possibility is to enlink (hook?) the functionality into an
> existent function
>
> Is there any way (beside a patch) to alter the behaviour to an existing
> function. Is ther a python construct similar to the "alias_method" of Ruby:
>
Ilias Lazaridis wrote:
> Is there any way (beside a patch) to alter the behaviour to an
> existing function. Is ther a python construct similar to the
> "alias_method" of Ruby:
This is a Python list. Would you care to explain what alias_method does?
>
> (example from an simple evolution suppor
Ilias Lazaridis wrote:
> I would like to know, if this construct is valid, or if it can result in
> problems (that I do not see as a newcomer):
>
> 1082try:
> 1083from django.rework.evolve import evolvedb
> 1084except ImportError:
> 1085def evolved
16 matches
Mail list logo