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 SoftDeletableqQuerySet(models.QuerySet): | |
def deleted(self): | |
return self.exclude(deleted_at__isnull=True) | |
def available(self): | |
return self.exclude(deleted_at__isnull=False) | |
class SoftDeletableManager(models.Manager): |
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
<p>Hello World</p> |
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
<template> | |
<div> | |
<section class="wrapper"> | |
<h2>Featured Items</h2> | |
<ul class="featured-items"> | |
<li v-for="product in products" :key="product.id" class="featured-items__item"> | |
<img class="product-image" :src="imagePath(product)" alt=""> | |
<p class="product-title">{{ product.name }}</p> | |
<p><em>${{ product.price }}</em></p> | |
</li> |
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
<script> | |
... | |
export default { | |
... | |
created() { | |
this.fetchData() | |
}, | |
data() { | |
... |
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
<template> | |
<div class="wrapper"> | |
<img class="photo" :src="imageUrl" alt=""> | |
<h1>{{ title }}</h1> | |
<p>By {{ ownerName }}</p> | |
<h2>Description</h2> | |
<p>{{ description }}</p> | |
<h2> | |
Tags | |
</h2> |
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
<template> | |
... | |
</template> | |
<script> | |
import flickr from '../flickr.js' | |
export default { | |
name: 'imageDetail', | |
props: { |
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
<template> | |
... | |
</template> | |
<script> | |
import flickr from '../flickr.js' | |
export default { | |
name: 'imageDetail', | |
props: { |
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
<template> | |
<div class="wrapper"> | |
<h1>{{ title }}</h1> | |
<p>By {{ ownerName }}</p> | |
<h2>Description</h2> | |
<p>{{ description }}</p> | |
<h2> | |
Tags | |
</h2> | |
<ul v-if="tags.length" class="photo-tag-list"> |
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
<script> | |
export default { | |
... | |
computed: { | |
title() { | |
if (this.imageInfo) { | |
return this.imageInfo.title._content || 'Untitled Image' | |
} | |
return '' | |
}, |
NewerOlder