Note that there are some explanatory texts on larger screens.

plurals
  1. POCaught TypeError while rendering: unhashable type: 'dict'
    primarykey
    data
    text
    <p>I'm trying really hard to work with the book "Practical Django Projects", but this stuff it's not working. You can find my code so far <a href="https://bitbucket.org/ubernostrum/practical-django-projects/src/79e75633cbd4/coltrane/models.py" rel="nofollow">here.</a> (Without the "Link" class. I've just added the get_absolute_url Entry class and all of a sudden I have a "Caught TypeError while rendering: unhashable type: 'dict'" error when trying to get to admin page. <a href="http://img189.imageshack.us/img189/5237/screenieol.jpg" rel="nofollow">Screenie of what I'm talking about.</a> I've never modified anything in that file showed in the error :(. What do i do with this?</p> <p>EDIT: bug occurred after adding this:</p> <pre><code>def get_absolute_url(self): return ('coltrane_entry_detail', (), { 'year': self.pub_date.strftime("%Y"), 'month': self.pub_date.strftime("%b").lower(), 'day': self.pub_date.strftime("%d"), 'slug': self.slug }) get_absolute_url = models.permalink(get_absolute_url) </code></pre> <p>That's from urls.py:</p> <pre><code>urlpatterns = patterns('django.views.generic.date_based', (r'^$', 'archive_index', entry_info_dict, 'coltrane_entry_archive_index'), (r'^(?P&lt;year&gt;\d{4})/$', 'archive_year', entry_info_dict, 'coltrane_entry_archive_year'), (r'^(?P&lt;year&gt;\d{4})/(?P&lt;month&gt;\w{3})/$', 'archive_month', entry_info_dict, 'coltrane_entry_archive_month'), (r'^(?P&lt;year&gt;\d{4})/(?P&lt;month&gt;\w{3})/(?P&lt;day&gt;\d{2})/$', 'archive_day', entry_info_dict, 'coltrane_entry_archive_day'), (r'^(?P&lt;year&gt;\d{4})/(?P&lt;month&gt;\w{3})/(?P&lt;day&gt;\d{2})/?(?P&lt;slug&gt;[-\w]+)/$', 'object_detail', entry_info_dict, 'coltrane_entry_detail'), ) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload