Skip to content

Instantly share code, notes, and snippets.

@Jpadilla1
Jpadilla1 / gist:ff30b85922b27b012b61
Created May 27, 2014 19:26
Not getting the PUT verb in django-rest-framewrok
# serializers.py
from .models import FGItem, FGTaken
from rest_framework import serializers
class FGItemSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = FGItem
fields = ('code', 'description', 'uom',
var SimpleExample = React.createClass({
render: function() {
return (
<div>
<PRMap />
</div>
);
}
});
var PropertiesExample = React.createClass({
render: function() {
return (
<div><PRMap fill='red' stroke='black' stroke-width='3' /></div>
);
}
});
var EventsExample = React.createClass({
handleMouseOver: function(evt, elem) {
document.getElementById('event-text').innerHTML = elem.data('town');
},
handleClick: function(evt, elem) {
elem.attr('fill', 'red');
},
render: function() {
return (
<div>
var data = [
{
id: 'canovanas',
fill: 'red',
stroke: 'yellow',
'stroke-width': 3
},
{
id: 'san_juan',
fill: 'green',
var data = [
{
id: 'canovanas',
fill: 'red',
stroke: 'yellow',
'stroke-width': 3
},
{
id: 'san_juan',
fill: 'green',
@Jpadilla1
Jpadilla1 / BarChart.js
Last active March 27, 2016 04:07
react-native-ios-charts BarChart example
import React, {
Component,
StyleSheet,
View
} from 'react-native';
import { BarChart } from 'react-native-ios-charts';
class MyChart extends Component {
render() {
@Jpadilla1
Jpadilla1 / HorizontalBarChart.js
Last active May 30, 2019 10:31
react-native-ios-charts HorizontalBarChart example
import React, {
AppRegistry,
Component,
StyleSheet,
Text,
View
} from 'react-native';
import { HorizontalBarChart } from 'react-native-ios-charts';
@Jpadilla1
Jpadilla1 / LineChart.js
Created February 10, 2016 15:13
react-native-ios-charts LineChart example
import React, {
AppRegistry,
Component,
StyleSheet,
Text,
View
} from 'react-native';
import { LineChart } from 'react-native-ios-charts';
@Jpadilla1
Jpadilla1 / CandleStickChart.js
Last active March 13, 2016 17:49
react-native-ios-charts CandleStickChart example
import React, {
AppRegistry,
Component,
StyleSheet,
View
} from 'react-native';
import { CandleStickChart } from 'react-native-ios-charts';
class charts extends Component {