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
<html> | |
<body> | |
<h1>Gallery</h1> | |
{% if gallery %} | |
{% for photo in gallery %} | |
<p><img src="media/{{ photo.photo }}"></p> | |
<p>{{ photo.description }}</p> | |
{% endfor %} | |
{% endif %} |
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.signals import post_init | |
def track_data(*fields): | |
""" | |
Tracks property changes on a model instance. | |
The changed list of properties is refreshed on model initialization | |
and save. | |
>>> @track_data('name') |
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
# coding: utf-8 | |
# Lista de valores que são retornados... | |
list_values = ("1432430070.573", | |
"1432430070.574", | |
"1432430856.584", | |
"1432430856.585", | |
"1432555386.0", | |
"1432555386.1", | |
"1432555564.3", |
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
DoesNotExist at /accounts/google/login/ | |
SocialApp matching query does not exist. | |
Request Method: GET | |
Request URL: http://localhost:8000/accounts/google/login/?process=login | |
Django Version: 1.7.4 | |
Exception Type: DoesNotExist | |
Exception Value: | |
SocialApp matching query does not exist. | |
Exception Location: /home/fred/.virtualenvs/speakerfight/local/lib/python2.7/site-packages/django/db/models/query.py in get, line 357 | |
Python Executable: /home/fred/.virtualenvs/speakerfight/bin/python |
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
Django==1.6.11 | |
Fabric==1.10.0 | |
Flask==0.10.1 | |
Jinja2==2.7.3 | |
Markdown==2.4 | |
MarkupSafe==0.23 | |
Pillow==2.6.1 | |
Pygments==1.6 | |
South==1.0 | |
Werkzeug==0.9.4 |
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.shortcuts import render, render_to_response, get_object_or_404, HttpResponseRedirect, HttpResponse, redirect | |
from django.template import RequestContext, loader | |
from django.contrib.auth.decorators import login_required | |
from django.core.urlresolvers import reverse_lazy | |
from django.views.generic import UpdateView | |
from models import Cadastro | |
from .forms import CadastroForm |
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
$.each(harvests, function() { | |
var tmparray = []; | |
tmparray.push(this.uuid); | |
tmparray.push(this.date); | |
tmparray.push(this.device); | |
$.each(questions, function() { | |
tmparray.push(this.name); | |
}) | |
data.push(tmparray); | |
}) |
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.conf.urls import patterns, url, include | |
from rest_framework import routers | |
from .views.viewver import HarvestView, HarvestViewSet | |
router = routers.DefaultRouter() | |
router.register(r'api/harvest', HarvestViewSet, base_name='myharvests') | |
urlpatterns = patterns( | |
'online.views.viewver', |
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
TypeError: harvest.$update is not a function | |
at controller.js:41 | |
at k.$emit (angular.js:14598) | |
at HTMLInputElement.<anonymous> (ng-grid-2.0.14.min.js:2) | |
at HTMLInputElement.v.event.dispatch (jquery.min.js:2) | |
at HTMLInputElement.o.handle.u (jquery.min.js:2) | |
at Object.v.event.trigger (jquery.min.js:2) | |
at HTMLInputElement.<anonymous> (jquery.min.js:2) | |
at Function.v.extend.each (jquery.min.js:2) | |
at v.fn.v.each (jquery.min.js:2) |
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 rest_framework import serializers | |
# from dashboard.serializers import HarvestListSerializer | |
from team.serializers import DeviceTeamListSerializer # , DeviceSerializer | |
from team.models import DeviceTeam | |
from .models import Harvest | |
class BaseMeta: |
OlderNewer