Traceback (most recent call last):
File "C:\Python24\lib\site-packages\django\core\handlers\base.py" in
get_response
77. response = callback(request, *callback_args, **callback_kwargs)
File "C:\Python24\lib\site-packages\django\contrib\auth\decorators.py"
in _checklogin
14. return view_func(re
Show all exception dump
--~--~-~--~~~---~--~~
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 [EMAIL P
Oh shucks, since I want to recalculate this attribute each time, I
would need this to be in the view function.
Still how would I override __init__ in django Models?
On Sep 5, 11:10 pm, shabda <[EMAIL PROTECTED]> wrote:
> That seems too easy to be true. :).
> I have one more query, where should I
That seems too easy to be true. :).
I have one more query, where should I add this code? Considering this
attribute would be used in many views, I am trying to override
__init__.
def __init__(self, *vargs):
models.Model.__init__(self, *vargs)
self.my_item_that_doesnt_exist_in_
> I want to have a non database item in this model class, which I can
> populate in the views. What is the recommended way to do this.
its quite simple:
myObject.my_item_that_doesnt_exist_in_model = 'my value' #incase of
model object
--~--~-~--~~~---~--~~
You re
http://www.djangoproject.com/documentation/models/custom_methods/
On 4 сент, 07:21, shabda <[EMAIL PROTECTED]> wrote:
> I have a python model
>
> class MyModel(models.Model):
> fld1 = models.TextField()
> fld1 = models.TextField()
>
> I want to have a non database item in this mod
If you want to add things to an instance in a view you could just use
setattr. Is this what you're asking?
Ben
On 04/09/07, shabda <[EMAIL PROTECTED]> wrote:
>
>
> I have a python model
>
> class MyModel(models.Model):
> fld1 = models.TextField()
> fld1 = models.TextField()
>
> I w
I have a python model
class MyModel(models.Model):
fld1 = models.TextField()
fld1 = models.TextField()
I want to have a non database item in this model class, which I can
populate in the views. What is the recommended way to do this.
--~--~-~--~~~---
8 matches
Mail list logo