This file contains hidden or 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 python:3 | |
ENV PYTHONUNBUFFERED 1 | |
RUN mkdir /code | |
WORKDIR /code | |
ADD requirements.txt /code/ | |
RUN pip install -r requirements.txt | |
#faz as configuracoes do servidor | |
ENV TZ=Brazil/East | |
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | |
RUN apt-get update && apt-get install -y locales |
This file contains hidden or 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
<template> | |
<span><my-name v-bind="name"></my-name> -- Welcome to <b>Paper Dashboard</b> - a beautiful freebie for every web developer.</span> | |
</template> | |
<script> | |
export default { | |
name: 'notification-template', | |
props: ['name'], | |
} | |
</script> |
This file contains hidden or 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 import models | |
from django.db.models.query import QuerySet | |
from django.utils import timezone | |
""" | |
Implementação do softdelete | |
Todas as classes que devem implementar o SoftDelete, devem herdar de SoftDeletionModel | |
""" | |
class SoftDeletionQuerySet(QuerySet): | |
def delete(self): |
This file contains hidden or 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
def menu(): | |
print("<< CALCULADORA CIENTIFICA >>") | |
print("1 - Soma (+)") | |
print("2 - Subtração (-)") | |
print("3 - Multiplicação (*)") | |
print("4 - Divisão Real (/)") | |
print("5 - Divisão inteira (\\)") | |
print("6 - Resto da divisão inteira (%)") | |
print("7 - Potenciação (^)") | |
print("8 - Logaritmo (L)") |
This file contains hidden or 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 staticfiles %} | |
<script type="text/javascript" src="{% static 'js/jquery-3.3.1.slim.min.js' %}"></script> | |
<script type="text/javascript" src="{% static 'js/popper.min.js' %}"></script> | |
<script type="text/javascript" src="{% static 'js/bootstrap.min.js' %}"></script> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script> | |
<script src="https://unpkg.com/axios/dist/axios.min.js"></script> |
This file contains hidden or 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 .widgets import ModelSelect2MultipleBootstrap, ModelSelect2Bootstrap | |
class ConsultationForm(ModelForm): | |
class Meta: | |
model = Consultation | |
exclude = ['patient', 'bodycirc', 'energycalc', 'skinfold', 'bioimpedance', 'bonediameter', 'biochemical'] | |
widgets = { | |
'patology': ModelSelect2MultipleBootstrap(url='patient:patology_autocomplete'), | |
#'supplement': autocomplete.ModelSelect2Multiple(url='patient:supplement_autocomplete'), | |
#'vitamin': autocomplete.ModelSelect2Multiple(url='patient:vitamin_autocomplete') |
This file contains hidden or 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
AddHandler fcgid-script .fcgi | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)$ index.fcgi/$1 [QSA,L] |