Re: Correct way to specifiy database-level column defaults

2013-01-10 Thread Mike S
> > For `DateField`s and `DateTimeField`s specifically, also take a look at > the `auto_now` and `auto_now_add` keyword arguments, documented > here: > https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.DateField -- You received this message because you are subscribed t

Re: how should I get the request object?

2012-11-26 Thread Mike S
Sometimes it is very inconvenient to make the `request` object available deep in the call stack, so I wrote a short middleware to work around this issue: http://djangosnippets.org/snippets/2853/ On Monday, November 26, 2012 5:16:01 AM UTC-5, Miaobing Jiang wrote: > > how should I get the reques

Re: with/include template pattern? seeking best practices

2012-09-05 Thread Mike S
The code `e.generalov` gave has been valid since Django 2.3: For more complicated context, you can also write an inclusion tag < https://docs.djangoproject.com/en/dev/howto/custom-template-tags/#inclusion-tags> and use that

strange ManyToMany field error, only in `manage.py shell`.

2012-06-01 Thread Mike S
Hi guys. This model error is driving me up the wall. All of my debug attempts thus far have been fruitless. I've got a model error that appears whenever I use `manage.py shell`, but not when my code is running in production-- which is making debugging very difficult. Here is the traceback and mode