sh install-docker-ubuntu.sh
- log out
- log back in
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 'package:app_pratico_flutter_module/pages/nova_pagina.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
import 'package:toast/toast.dart'; | |
void main() { | |
// runApp( | |
// choseWidget(window.defaultRouteName), | |
// ); |
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 -*- | |
from django.template.defaultfilters import floatformat | |
from django.contrib.humanize.templatetags.humanize import intcomma | |
from django.utils.encoding import force_unicode | |
from django.template import Library | |
register = Library() | |
@register.filter(name='float_to_real') |
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
{% load core_utils %} | |
<ul id="tags" class="nav nav-tabs nav-stacked"> | |
{% for tag in tags %} | |
{% if tag_full_list|list_count:tag %} | |
<li> | |
<a href="{% url "post:posts-tagged-related" tag.slug %}"> | |
{{ tag.name }} <span class="label label-info">{{ tag_full_list|list_count:tag }}</span> | |
</a> | |
</li> |
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.template.defaultfilters import slugify | |
class AutoSlugMixin(object): | |
""" | |
Automatically set slug to slugified version of the name if left empty. | |
Use this as follows:: | |
class MyModel(AutoSlugMixin, models.Model): | |
def save(self): | |
super(MyModel, self).save() |
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 | |
u""" | |
Redimensionamento proporcional de imagem, com base na altura, feito com um simples cálculo de proporção. | |
Ex: | |
+------+ 10 15 (altura desejada para a nova imagem) | |
| | -- x -- | |
| 10x5 | 5 x (largura proporcional a nova altura) | |
| | | |
+------+ (10 x x) = (5 x 15) | |
10x = 75 |
WeasyPrint converts HTML including images to PDF, it's cross platform but Windows requires a decent amount of massaging to persuade it to work.
To install Pango and Cairo download the [all in one bundle][GTK] of the GTK+ stack and extract the archive to C:\GTK.
You'll need to add the GTK bin folder to your system path so the various
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
<div class="control-group"> | |
<label class="control-label">Location</label> | |
<div class="controls"> | |
<input name="location" type="text" placeholder="City, State, Country" value=""> | |
<input name="location_city" type="hidden" value=""> | |
<input name="location_state" type="hidden" value=""> | |
<input name="location_country" type="hidden" value=""> | |
<input name="location_lat" type="hidden"> | |
<input name="location_lng" type="hidden"> | |
</div> |
NewerOlder