This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyModel(models.Models): | |
token = models.CharField(max_length=22, unique=True, editable=False) | |
def save(self, *args, **kwargs): | |
if not self.token: | |
import uuid | |
import base64 | |
self.token = base64.urlsafe_b64encode(uuid.uuid4().bytes).strip('=') | |
return super(MyModel, self).save(*args, **kwargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\version "2.19.20" | |
\score { | |
\relative c'' | |
\new StaffGroup | |
\with { | |
\remove "System_start_delimiter_engraver" | |
\override SpanBar.glyph-name = #"!" | |
} | |
<< |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %}Create a file called `google-remarketing.liquid` in the snippets subdirectory of your template with the following code. Be sure to insert your merchant ID.{% endcomment %} | |
{% if template contains 'index' %} | |
<script type="text/javascript"> | |
var google_tag_params = { | |
ecomm_pagetype: 'home', | |
}; | |
</script> | |
{% elsif template contains 'collection' %} | |
<script type="text/javascript"> | |
var google_tag_params = { |