just like __unicode__, was_published_today is also a method/function - so
do this:
def __unicode__(self):
return self.question
def was_published_today(self):
return self.pub_date.date() == datetime.date.today()
On Tue, Jan 10, 2012 at 2:11 AM, Nasir Rasul wrote:
> check your indentatio
This is why linux is the best os. If anything goes wrong, you can
blame it on linux :)
1) make sure you are really using django1.4a in server (from django
import VERSION). maybe you installed multiple versions of django and
using the wrong one (you might have 1.2.x on system and 1.4a on
virtualenv
On 01/09/2012 10:36 PM, jrief wrote:
Hi,
currently I am writing a Django applications built up from loosely
coupled plug-ins. Each of these plug-ins shall offer a class based
view to handle get and post requests. For get requests the context
shall be populated with plug-in specific data. For p
Brian
That is useful "generic" advice and a topic I am very interested in -
how to break up an "enterprise" type of application into smaller apps
(to enable distribution of sub-sections to different types of
audiences) while at the same time maintaining tight coherency among
closely-related data s
Make sure the staticfiles app is in your INSTALLED_APPS setting. That'd be
my first guess. If it is, do a manage.py console and try importing it to
make sure that the django environment can see it.
-- Jeff
On Tue, Jan 10, 2012 at 1:22 AM, Mike Dewhirst wrote:
> The manage.py collectstatic subc
The manage.py collectstatic subcommand doesn't exist on my Linux staging
server but it does exist (and works) on my Win XP development machine.
I'm using exactly the same settings.py on both machines.
On Linux, in a Python interpreter I can do ...
>>>from django.contrib import staticfiles
>>>
I’m fairly new to Django but I worked through a similar problem a
couple months ago. You say:
>If I was doing this manually with SQL, I would probably make a table
>especially for the m2m relationship, called "articles_tags", and this
>table would have ariticle_ids linked to tag_ids, and then I'd
Hello,
Just writing to share a revelation -- that using:
instead of