Skip to content

Instantly share code, notes, and snippets.

Kristen Sheppard kshepp

Block or report user

Report or block kshepp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Response3.json
{
"user": {
"name": "John Dough",
"age": 42,
"friends": [
{"name": "Jane Doe"},
{"name": "Bill Green"}
]
}
}
View Request3.json
{
user(id: 1) {
name
age
friends {
name
}
}
}
View Response2.json
{
"user": {
"name": "John Dough",
"age": 42,
"city": "Tokyo"
}
}
View Request2.json
{
user(id: 1) {
name
age
city
}
}
View Django_slider.html
<ul class="bxslider">
{% for medium in media %}
<div class="item {% if forloop.first %} active {% endif %}">
{% if medium.mediaType == 'video' %}
<li>
<iframe width="640" height="360" src="{{medium.mediaLink}}" frameborder="0" allowfullscreen>
</iframe>
</li>
View Django_url.html
<a href="{% url 'index' %}">This is my index page!</a>
View django_image.html
<img id="teal" src="{% static 'img/teal_circle.png' %}" alt="teal circle">
@kshepp
kshepp / Extend_files.html
Created Feb 19, 2016
Extending files in Django
View Extend_files.html
{% extends "NAME_OF_YOUR_PROJECT/base.html" %}
{% load static %}
{% block content %}
<!--Insert all of the page specific content here-->
{% endblock %}
@kshepp
kshepp / Simplified_base.html
Last active Feb 19, 2016
This is a simplified version of a base.html file in Django
View Simplified_base.html
{% load staticfiles %}
<!--Load static files will bring in all the css, images, and js files-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--This is where you can input all the css files. The files are in Django format and following the path from the 'static' file -->
<link href="{% static 'bootstrap/css/bootstrap-theme.css' %}"
You can’t perform that action at this time.