Giter Club home page Giter Club logo

likeestampa.com.br's Introduction

LikeEstampa - Store

SonarCloud

Codacy Badge

CircleCI

Like Estampa - Store T-Shirts - Camisetas

Como usar

Dependencias

Seu PC precisa ter instalado

  • Python3
  • Docker e Docker Compose
  • make (unix OS)
  • virtualenv

MySQL

Caso estiver no Ubuntu

$ sudo apt-get install default-libmysqlclient-dev build-essential
$ docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -d mysql

Outros sitemas operacionais consulte: https://pypi.org/project/mysqlclient/

Passo a passo primeira vez

  • Criar o banco de dados manualmente
  • Caso use o DBEaver ativar o allowPublicKeyRetrieval=True

Windows: TODO

Linux:

$ virtualenv env -p python3
$ source env/bin/activate
$ pip install -r requirements/requirements.development.txt
$ make migrate
$ make run

Tecnologias

  • Python3
  • Django
  • Docker
  • MySQL Database
  • Bootstrap v5
  • Sendgrid (sistema de emails)
  • Cloudinary (sistema de armazenamento de imagens)
  • Mercado Pago (gateway de pagamento)
  • Telegram (logs)
  • Sentry (logs e eventos)

Inicio e testes unitarios

$ git clone https://github.com/leonardocintra/likeestampa
$ cd likeestampa
$ virtualenv env -p pyhon3
$ souce env/bin/activate
$ make install-dev
$ sudo docker-compose up - d
$ python manage.py collectstatic --no-input
$ make test

Executar local

Tem um arquivo fixtores/utils/fixture.sql que possui dados iniciais para voce brincar.

$ make migrate
$ python3 manage.py createsuperuser
$ ... (seguir passos superuser)
$ make run

Testes

$ make test

Coverage

$ make coverage

Dicas

Erros que podem aparecer

DETAIL: Key (id)=(1) already exists.

Para corrigir execute o comando abaixo

python manage.py sqlsequencereset <nome da app> 

Ex: python manage.py sqlsequencereset catalogo

Para debugar um teste no Visual Studio Code

Quando vai debugar um projeto django normal, VS Code inclui o comando "runserver".

Para debugar o teste, basta comentar ele e incluir "test" :D

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Django",
            "type": "python",
            "request": "launch",
            "program": "${workspaceFolder}/manage.py",
            "args": [
                "test"
                //"runserver"
            ],
            "django": true
        }
    ]
}

Dump data

Exemplo

python3 manage.py dumpdata catalogo.categoria > categoria.json

Recuperar em produção

$ python3 manage.py dumpdata > db.json --indent 2 --exclude account --exclude pedido --exclude evento --exclude usuario --exclude auth --exclude contenttypes --exclude sessions --exclude pagamento --remote prod

Historia

Fundado em 20/04/2021

Por Leonardo Nascimento Cintra e Juliana Rosa Rodrigues Cintra

  • Primeira maquina de estampa: 20/04/2021

likeestampa.com.br's People

Contributors

codacy-badger avatar dependabot[bot] avatar leonardocintra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

lyma

likeestampa.com.br's Issues

Add slug no modelo

Alterar template do produto_detalhe.html para ler o slug do modelo e não o id

Criar data que ocorreu o evento

Na tabela de eventos_pedido

  • Criar modelo e migrations
  • Atualizar no banco os campos que ficaram vazios
  • Atualizar a view para ler esse valor e não o valor atual (created_at)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.