﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
20318	Instruction errors (maybe)	ibrahimalbarri@…	nobody	"Okay I will take the time to provide a bit more detail on my initial ticket and attempt not to make any type O's. And, for the record I'm not complaining (I think you guys are great and that Django is the bomb!!!) just trying to help out the next person.... I'm running Django, Mysql, Mod_wsgi, on Apache in a virtenv. Im going through the Writing our first Django app and everything has worked out up until these prompts. 

class PollAdmin(admin.ModelAdmin):
    # ...
    list_display = ('question', 'pub_date', 'was_published_recently')

for settings.py

and

class Poll(models.Model):
    # ...
    def was_published_recently(self):
        return self.pub_date >= timezone.now() - datetime.timedelta(days=1)
    was_published_recently.admin_order_field = 'pub_date'
    was_published_recently.boolean = True
    was_published_recently.short_description = 'Published recently?'

for modles.py

I cut and pasted this code directly from the website and got errors stating: was published recently not defined...... 


to fix the error I had to make 'was_published_recently' (from settings.py)

and 'Published recently?' (from models.py) exactly the same i.e was_published_recently. 

Im running ubuntu 12.10 and django 1.5.....As I said in my previous ticket I dont know if this is an issue on other systems or setups but It was an issue for me. I do want to say that I am very new to programming and I didn't automatically assume  or know that these two fields have to be the same thus it took two days for me to figure it out

Thanks for all your hard work and for the timely and personal response to my first ticket (like 5 min).. Lets me know I chose the right engine to drive my new business.....


Ibrahim "	Uncategorized	closed	Documentation	1.4	Normal	needsinfo			Unreviewed	0	0	0	0	0	0
