Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hg1g committed Dec 27, 2019
0 parents commit b809572
Show file tree
Hide file tree
Showing 365 changed files with 45,811 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
*.py[cod]
virtualenv
venv
env
pirra_web.iml
facturas/*
afip_ws/ws/cache/*
pirra_web/media/*
pirra_web/settings/dev.py
deploy/config/tmp/ansible.log
get-pip.py
media/**

# C extensions
*.so

*.pkl

# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg
lib
lib64
__pycache__

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.tox
nosetests.xml

# Translations
*.mo

# project
test.db
.idea
cache/*
comprobante/vendor/pyafipws/ws/cache/*
comprobante/vendor/pyafipws/cache/*
logs/*.log*
bower_components

data
static/**
node_modules
/assets/webpack_bundles/
webpack-stats.json
pirra.iml

# Vagrant
/deploy/.vagrant/

deploy/ansible/deploy_pirra.retry
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

93 changes: 93 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
(Working progress)

# Pirra - Facturas electronicas AFIP como Zeus manda

Configuracion de entorno
------------------------

1. Instalar paquetes del sistema necesarios

sudo apt-get install openssl libssl-dev swig libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev libpq-dev redis-server python-dev
#si se agrega algo aca agregarlo tambien a las tasks de ansible
2. Instalar pip y virtualenv

sudo apt install python3-pip
sudo pip3 install virtualenv virtualenvwrapper

3. Crear y activar virtualenv

mkvirtualenv -p python3 pirra
workon pirra

4. Si mkvirtualenv no funciona entonces

sudo pip3 install virtualenv
virtualenv env
. env/bin/activate

5. Instalar paquetes de python

pip3 install -r requirements/dev.txt

6. Copiar template de settings

cp pirra_web/settings/dev.template.py pirra_web/settings/dev.py
# editar lo que quieran cambiar de settings en pirra_web/settings/dev.py

7. Instalar requerimientos npm

npm install

8. Configurar y Crear BD

considerar que la versión de postgres que se necesita utilizar es la 9.4

sudo apt-get install postgresql
sudo -u postgres psql postgres
\password postgres # elegir un password y poner el mismo en pirra_web/settings/dev.py
#salir de psql (ctrl+d)
sudo -u postgres createdb pirra
python manage.py migrate

O se puede utilizar docker-compose

docker-compose up

9. Crear un superusuario

python manage.py createsuperuser

10. Crear empresa

python manage.py init_empresa [NRO_DOC] [EMPRESA]
10. Cargar los datos de aplicacion AFIP (para tener tipos de comprobante, moneda, etc)

python manage.py loaddata afip/fixtures/initial_data.json
# elegir el schema public


11. Cargar datos del padron de inscripcion a la afip

python manage.py load_padron --limit 1000 #carga solamente los primeros 1000

12. Correr el server de prueba

python manage.py runserver
npm run watch

13. Para ver el sistema corriendo entrar a localhost:8000 (no funciona si usan 127.0.0.1:8000)

Migraciones
-----------

* Generar nuevas migraciones

python manage.py makemigrations

* Ejecutar migraciones (cada vez que traemos cambios de git):

python manage.py migrate


Empty file added afip/__init__.py
Empty file.
Loading

0 comments on commit b809572

Please sign in to comment.