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
from django.db.models import CharField, Model, OneToOneField, AutoField, EmailField | |
class User(Model): | |
id = AutoField(primary_key=True) # The default Id field from django | |
username = CharField(max_length=30) | |
profile = OneToOneField(Profile, primary_key=True, related_name='user') | |
class Profile(Model): |
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
{% block view_scripts %} | |
<script type="text/javascript"> | |
var MANIFEST_TABLE_URL = '{{ reverse('manifests:manifest-files-table', kwargs={'manifest_id': object.manifest.id if object.manifest else 'none'}) }}'; | |
</script> | |
<script> | |
var table2 = $('#manifestfilestable').DataTable({ | |
language: dt_language, // global variable defined in html |
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
from app.models import Manifest, ManifestFileRecord | |
from django_datatables_view.base_datatable_view import BaseDatatableView | |
logger = logging.getLogger(__name__) | |
class ManifestDatatableView(BaseDatatableView): | |
model = Manifest | |
columns = ['id', 'name', 'created', 'updated', 'tags', 'automan_params'] |
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
import classNames from 'classnames' | |
import PropTypes from 'prop-types' | |
import React, { Component } from 'react' | |
import withStyles from '@material-ui/core/styles/withStyles' | |
import CircularProgress from '@material-ui/core/CircularProgress' | |
import FullArea from 'components/FullArea' | |
import GridContainer from 'components/Grid/GridContainer' | |
import GridItem from 'components/Grid/GridItem' |
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
import React, { Component } from 'react' | |
import PropTypes from 'prop-types' | |
class FullArea extends Component { | |
constructor(props) { | |
super(props) | |
this.state = { | |
width: 0, | |
height: 0, |
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 HeroBlock(StructBlock): | |
content = StreamBlock([ | |
('button', StructBlock([ | |
('text', CharBlock(required=False, max_length=80, label='Label')), | |
('url', URLBlock(required=False, label='URL')), | |
], label='Call to action', help_text='A "call-to-action" button, like "Sign Up Now!"')), | |
('video', EmbedBlock(label='Video')), | |
('quote', StructBlock([ | |
('text', TextBlock()), |
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
import { stringify } from 'query-string' | |
import { fetchUtils } from 'react-admin' | |
import Cookies from 'universal-cookie' | |
import { store } from 'index' | |
const camelCaseKeys = require('camelcase-keys') | |
const snakeCaseKeys = require('snakecase-keys') |
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
Homebrew build logs for osgeo/osgeo4mac/osgeo-gdal on macOS 10.14.6 | |
Build date: 2019-12-04 16:57:56 |
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
#!/usr/bin/env bash | |
export PYTHONUNBUFFERED=1 | |
export DJANGO_READ_DOT_ENV_FILE=1 | |
export DJANGO_SETTINGS_MODULE=backend.settings.local | |
heroku local -p 8000 |
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
# Homebrew Formula for Google Test | |
# Usage: brew install --HEAD https://gist.githubusercontent.com/Kronuz/96ac10fbd8472eb1e7566d740c4034f8/raw/gtest.rb | |
require 'formula' | |
class Gtest < Formula | |
desc "Google Test" | |
homepage "https://github.com/google/googletest" | |
head "git://github.com/google/googletest.git", :using => :git |
OlderNewer