On Sun, May 19, 2013 at 10:49 AM, Matthew Ngaha wrote:
> On Sun, May 19, 2013 at 3:34 PM, Steven D'Aprano wrote:
>> Matthew, who are you quoting? Your email program should automatically insert
>> an attribution line, such as the one just below. Without that attribution
>> line, it is hard to foll
On Sun, May 19, 2013 at 3:34 PM, Steven D'Aprano wrote:
> Matthew, who are you quoting? Your email program should automatically insert
> an attribution line, such as the one just below. Without that attribution
> line, it is hard to follow the conversation, as we can't tell who you are
> quoting.
Matthew, who are you quoting? Your email program should automatically insert an
attribution line, such as the one just below. Without that attribution line, it
is hard to follow the conversation, as we can't tell who you are quoting.
On 20/05/13 00:23, Matthew Ngaha wrote:
class Poll(models.Mo
> options.py is the biggest module in the admin package. The link I
> posted is to the get_actions method of ModelAdmin. In the tutorial,
> PollAdmin extends this class.
>
oh ok thanks, yes i will definately look through it
> I'm not coming from any framework. My knowledge of web development is
>
> class Poll(models.Model):
>
> question = models.CharField(max_length=200)
> pub_date = models.DateTimeField('date published')
>
>
>
> def was_published_recently(self):
> return self.pub_date >= timezone.now() - datetime.timedelta(days=1)
>
> #
>
>
> was_published_recen
On Sun, May 19, 2013 at 7:20 AM, Matthew Ngaha wrote:
> Thanks that does clear it up. Also thats a huge script you linked, can
options.py is the biggest module in the admin package. The link I
posted is to the get_actions method of ModelAdmin. In the tutorial,
PollAdmin extends this class.
> i a
For the benefit of others,I believe the full class (from the Django
Tutorial) is
class Poll(models.Model):
question = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
def was_published_recently(self):
return self.pub_date >= timezone.now() - d
> The default description is the name with underscores removed, unless
> you set a custom description in the function's "short_description"
> attribute. I'm not experienced with Django, so I can't ramble off lots
> of examples, but hopefully you get the gist.
Thanks that does clear it up. Also tha
On Sun, May 19, 2013 at 6:35 AM, Matthew Ngaha wrote:
>
> if you look at the diagram under that function, why is the value of
> "was_published_recently.short_description" the title of that field?
> replacing the old title? is a "short_desccription" attribute set
> somewhere in django being inactiv
Thanks guys i had no idea about these method attributes and also
these underlying oop __objects__
@ eryksun
i understand your explanation, im still having trouble figuring out
how django is being used in the tutorial.
class Poll(models.Model):
# ...
def was_published_recently(self):
On Sat, May 18, 2013 at 10:22 PM, Dave Angel wrote:
> The pub_date is probably an instance attribute of either the Poll class or
> the models.Model class. It should probably be defined in the appropriate
> __init__ method. In any case it's not a method attribute.
Django uses function attributes
On 05/18/2013 03:16 PM, Matthew Ngaha wrote:
im following the official docs and after learning Python im sure of
how methods work, but the model example on the beginners guide
which official docs? URLs please?
which beginners guide? URL please?
has me
really confused.
I don't know Djan
im following the official docs and after learning Python im sure of
how methods work, but the model example on the beginners guide has me
really confused.
The model definition is omitted but can anyone explain how this methed
(was_published_recently) is given these attributes:
class Poll(models.
13 matches
Mail list logo