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
| {% extends "base.html" %} | |
| {% load humanize %} | |
| {% load foundation %} | |
| {% load l10n %} | |
| {% block script %} | |
| <link rel="stylesheet" href="{{ STATIC_URL }}css/foundation-datepicker.css"> | |
| <link rel="stylesheet" href="{{ STATIC_URL }}js/chosen/chosen.css"> | |
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
| class CRForm(ModelForm): | |
| class Meta: | |
| model = ContaReceber | |
| def __init__(self, *args, **kwargs): | |
| vUserProfile = kwargs.pop('vUserProfile', None) | |
| super(CRForm, self).__init__(*args, **kwargs) | |
| self.fields["dthr_cadastro"].widget.attrs['readonly'] = "True" | |
| self.fields["valor"].localize = True |
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
| # -*- coding: utf-8 -*- | |
| # Django settings for webcomerx project. | |
| import os | |
| PROJECT_ROOT_PATH = os.path.dirname(os.path.abspath(__file__)) | |
| DEBUG = True | |
| TEMPLATE_DEBUG = DEBUG |
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
| class Produto(models.Model): | |
| status = models.CharField(u'Status', max_length=1, default='A', choices=Ativo_Inativo_CHOICE) | |
| referencia = models.CharField(u'Referência', max_length=20) | |
| descricao = models.CharField(u'Descricão', max_length=150, unique=True) | |
| codigo_barra = models.CharField(u'Cod. barra', max_length=13, blank=True, null=True , unique=True) | |
| codigo_fabrica = models.CharField(u'Cod. Fábrica', max_length=25, blank=True, null=True) | |
| codigo_auxiliar = models.CharField(u'Cod. Auxiliar', max_length=25, blank=True, null=True) | |
| numero_original = models.CharField(u'Nº Original', max_length=25, blank=True, null=True) | |
| localizacao = models.CharField(u'Localização', max_length=15, blank=True, null=True) | |
| fornecedor = models.ForeignKey(Pessoa, verbose_name=u'Fornecedor') |
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
| {{ form_itens.management_form }} | |
| {% for itens in form_itens.forms %} | |
| <tr class="dynamic-form"> | |
| <input id="{{ itens.prefix }}-produto_composicao" name="{{ itens.prefix }}-produto_composicao" type="hidden" value="{% if itens.produto_composicao.value != None %}{{ itens.produto_composicao.value }}{% endif %}" > | |
| <th> | |
| <input id="{{ itens.prefix }}-prodcomp_desc" name="{{ itens.prefix }}-prodcomp_desc" type="text" value="{{ itens.instance.produto_composicao.descricao }}" readonly=True> | |
| </th> | |
| <th> |
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 edita_produto(request, produto_id=None): | |
| vtop_title = 'Incluindo/Editando Produtos' | |
| if produto_id: | |
| v_produto = Produto.objects.get(pk=produto_id) | |
| else: | |
| v_produto = None | |
| itens_composicao = inlineformset_factory(Produto, Produto_composicao, form=Composicao_ProdutoForm, can_delete=False, extra=0, fk_name='produto') |
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
| import os | |
| import sys | |
| import site | |
| # Add the site-packages of the chosen virtualenv to work with | |
| site.addsitedir('/home/fellipeh/.virtualenvs/dig/local/lib/python2.7/site-packages') | |
| # Add the app's directory to the PYTHONPATH | |
| sys.path.append('/var/www/django/dig') | |
| sys.path.append('/var/www/django/dig/dig') |
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
| # -*- coding: utf-8 -*- | |
| __author__ = 'fellipeh' | |
| __copyright__ = '' | |
| __version__ = '' | |
| from django.conf.urls import patterns, include, url | |
| from django.contrib import admin | |
| admin.autodiscover() |
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
| <VirtualHost *:80> | |
| ServerAdmin contato@dig.com.br | |
| ServerName dig.com.br | |
| ServerAlias www.dig.com.br | |
| WSGIScriptAlias / var/www/django/dig/dig/wsgi.py | |
| Alias /static/ /var/www/django/dig/dig/static_files/ | |
| <Location "/static/"> | |
| Options -Indexes | |
| </Location> |
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
| <VirtualHost *:80> | |
| ServerAdmin contato@dig.com.br | |
| ServerName dig | |
| Alias /site_media/ /var/django/dig/app/dig/static | |
| Alias /static /var/django/dig/app/dig/static | |
| Alias /static/admin /var/django/dig/app/dig/static/admin | |
| Alias /robots.txt /var/django/dig/app/dig/static_files/robots.txt | |
| Alias /favicon.ico /var/django/dig/app/dig/static_files/favicon.ico |
OlderNewer