mirror of https://github.com/interlegis/sapl.git
committed by
GitHub
19 changed files with 508 additions and 110 deletions
@ -0,0 +1,35 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Generated by Django 1.11.20 on 2019-03-14 18:32 |
||||
|
from __future__ import unicode_literals |
||||
|
|
||||
|
from django.db import migrations, models |
||||
|
import django.db.models.deletion |
||||
|
|
||||
|
|
||||
|
class Migration(migrations.Migration): |
||||
|
|
||||
|
dependencies = [ |
||||
|
('protocoloadm', '0017_merge_20190121_1552'), |
||||
|
] |
||||
|
|
||||
|
operations = [ |
||||
|
migrations.CreateModel( |
||||
|
name='Anexado', |
||||
|
fields=[ |
||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
||||
|
('data_anexacao', models.DateField(verbose_name='Data Anexação')), |
||||
|
('data_desanexacao', models.DateField(blank=True, null=True, verbose_name='Data Desanexação')), |
||||
|
('documento_anexado', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='documento_anexado_set', to='protocoloadm.DocumentoAdministrativo', verbose_name='Documento Anexado')), |
||||
|
('documento_principal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='documento_principal_set', to='protocoloadm.DocumentoAdministrativo', verbose_name='Documento Principal')), |
||||
|
], |
||||
|
options={ |
||||
|
'verbose_name': 'Anexado', |
||||
|
'verbose_name_plural': 'Anexados', |
||||
|
}, |
||||
|
), |
||||
|
migrations.AddField( |
||||
|
model_name='documentoadministrativo', |
||||
|
name='anexados', |
||||
|
field=models.ManyToManyField(blank=True, related_name='anexo_de', through='protocoloadm.Anexado', to='protocoloadm.DocumentoAdministrativo'), |
||||
|
), |
||||
|
] |
||||
@ -1,5 +1,5 @@ |
|||||
# -*- coding: utf-8 -*- |
# -*- coding: utf-8 -*- |
||||
# Generated by Django 1.11.20 on 2019-04-10 11:36 |
# Generated by Django 1.11.20 on 2019-04-12 14:06 |
||||
from __future__ import unicode_literals |
from __future__ import unicode_literals |
||||
|
|
||||
from django.db import migrations, models |
from django.db import migrations, models |
||||
@ -0,0 +1,13 @@ |
|||||
|
{% extends "crud/list.html" %} |
||||
|
{% load i18n %} |
||||
|
{% load common_tags %} |
||||
|
|
||||
|
{% block more_buttons %} |
||||
|
|
||||
|
{% if perms|get_add_perm:view %} |
||||
|
<a href="{% url 'sapl.protocoloadm:anexado_em_lote' root_pk %}" class="btn btn-outline-primary"> |
||||
|
{% trans "Adicionar Anexado em Lote" %} |
||||
|
</a> |
||||
|
{% endif %} |
||||
|
|
||||
|
{% endblock more_buttons %} |
||||
@ -0,0 +1,27 @@ |
|||||
|
import requests |
||||
|
|
||||
|
branch_master = requests.get('https://api.github.com/repos/interlegis/sapl/commits?per_page=100&sha=master') |
||||
|
branch_master = branch_master.json() |
||||
|
|
||||
|
commits_master = [e['commit']['message'] for e in branch_master] |
||||
|
|
||||
|
branch_3_1_x = requests.get('https://api.github.com/repos/interlegis/sapl/commits?per_page=70&sha=3.1.x') |
||||
|
branch_3_1_x = branch_3_1_x.json() |
||||
|
|
||||
|
commits_3_1_x = [(e['commit']['message'], {'sha':e['sha'], 'data':e['commit']['author']['date']}) for e in branch_3_1_x] |
||||
|
|
||||
|
print("\nCommits que estão em 3.1.x, mas não em master:\n") |
||||
|
|
||||
|
# retira os \r para evitar bugs |
||||
|
commits_master = [commit.replace('\r', '') for commit in commits_master] |
||||
|
|
||||
|
for c, s in commits_3_1_x: |
||||
|
# retira os \r para evitar bugs |
||||
|
c = c.replace('\r', '') |
||||
|
if c not in commits_master: |
||||
|
print('---------------------------------------------------------------------') |
||||
|
print('Data: ' + s['data'][:10]) |
||||
|
print(s['sha'][:7] + '-> ' + c) |
||||
|
|
||||
|
print('---------------------------------------------------------------------') |
||||
|
|
||||
Loading…
Reference in new issue