Skip to content

Instantly share code, notes, and snippets.

View danizen's full-sized avatar

Dan Davis danizen

View GitHub Profile
@danizen
danizen / test-material.component.html
Created October 5, 2017 22:00
Angular 4 server-side autocomplete
<div class="container">
<div class="row">
<form class="example-form">
<md-form-field class="example-full-width">
<input type="text" mdInput [formControl]="myControl" [mdAutocomplete]="auto" placeholder="Health Topic Name">
<md-autocomplete #auto="mdAutocomplete">
<md-option *ngFor="let option of serverOptions | async" [value]="option">
{{ option }}
</md-option>
</md-autocomplete>
@danizen
danizen / dump_fields_in_ipython.py
Created August 28, 2017 21:31
Trying to achieve title in generated OpenAPI Schema
from rest_framework import schemas
g = schemas.SchemaGenerator()
s = g.get_schema()
for f in s['adapter'].links['create'].fields:
print(f)