Only sluggify if no dupe.

master
Nick Sergeant 2015-07-24 12:22:28 -04:00
parent 9e5778d092
commit 97a71d679e
2 changed files with 5 additions and 2 deletions

View File

@ -7,7 +7,7 @@ import uuid
def slugify_uniquely(value, model, slugfield="slug"):
suffix = str(uuid.uuid4()).split('-')[0]
suffix = False
potential = base = slugify(value)[:255]
while True:

View File

@ -65,5 +65,8 @@
</script>
{% endif %}
{% else %}
<script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>
<script>
document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')
window.ll = function() {};
</script>
{% endif %}