Skip to content

Commit 84d4be0

Browse files
Merge branch 'Develop' into ft004-vista-producto
2 parents 5f4b04b + 2c3ffad commit 84d4be0

20 files changed

+1417
-68
lines changed

Pipfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ gunicorn = "*"
1818
cloudinary = "*"
1919
flask-admin = "*"
2020
typing-extensions = "*"
21-
flask-jwt-extended = "==4.6.0"
21+
flask-jwt-extended = "*"
2222
wtforms = "==3.1.2"
2323

2424
[requires]

Pipfile.lock

+11-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

migrations/versions/7f479f7b82b2_.py

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
"""empty message
2+
3+
Revision ID: 7f479f7b82b2
4+
Revises:
5+
Create Date: 2025-03-08 10:50:02.759160
6+
7+
"""
8+
from alembic import op
9+
import sqlalchemy as sa
10+
11+
12+
# revision identifiers, used by Alembic.
13+
revision = '7f479f7b82b2'
14+
down_revision = None
15+
branch_labels = None
16+
depends_on = None
17+
18+
19+
def upgrade():
20+
# ### commands auto generated by Alembic - please adjust! ###
21+
op.create_table('accessories',
22+
sa.Column('id', sa.Integer(), nullable=False),
23+
sa.Column('name', sa.String(length=100), nullable=False),
24+
sa.Column('brand', sa.String(length=100), nullable=False),
25+
sa.Column('description', sa.Text(), nullable=True),
26+
sa.Column('animal_type', sa.String(length=50), nullable=False),
27+
sa.Column('pathologies', sa.Text(), nullable=True),
28+
sa.Column('price', sa.Float(), nullable=False),
29+
sa.Column('url', sa.String(length=255), nullable=True),
30+
sa.PrimaryKeyConstraint('id')
31+
)
32+
op.create_table('foods',
33+
sa.Column('id', sa.Integer(), nullable=False),
34+
sa.Column('name', sa.String(length=100), nullable=False),
35+
sa.Column('brand', sa.String(length=100), nullable=False),
36+
sa.Column('description', sa.Text(), nullable=True),
37+
sa.Column('ingredients', sa.Text(), nullable=False),
38+
sa.Column('weight', sa.Float(), nullable=False),
39+
sa.Column('price', sa.Float(), nullable=False),
40+
sa.Column('age', sa.String(), nullable=False),
41+
sa.Column('animal_type', sa.String(length=50), nullable=False),
42+
sa.Column('size', sa.String(length=30), nullable=True),
43+
sa.Column('pathologies', sa.Text(), nullable=True),
44+
sa.Column('url', sa.String(length=255), nullable=True),
45+
sa.PrimaryKeyConstraint('id')
46+
)
47+
op.create_table('user',
48+
sa.Column('id', sa.Integer(), nullable=False),
49+
sa.Column('name', sa.String(length=80), nullable=False),
50+
sa.Column('email', sa.String(length=120), nullable=False),
51+
sa.Column('password', sa.String(length=80), nullable=False),
52+
sa.PrimaryKeyConstraint('id'),
53+
sa.UniqueConstraint('email')
54+
)
55+
op.create_table('pet',
56+
sa.Column('id', sa.Integer(), nullable=False),
57+
sa.Column('name', sa.String(length=100), nullable=False),
58+
sa.Column('size', sa.String(length=100), nullable=True),
59+
sa.Column('breed', sa.String(length=100), nullable=True),
60+
sa.Column('age', sa.String(), nullable=False),
61+
sa.Column('animal_type', sa.String(), nullable=False),
62+
sa.Column('pathologies', sa.Text(), nullable=True),
63+
sa.Column('user_id', sa.Integer(), nullable=True),
64+
sa.Column('url', sa.String(length=255), nullable=True),
65+
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
66+
sa.PrimaryKeyConstraint('id')
67+
)
68+
# ### end Alembic commands ###
69+
70+
71+
def downgrade():
72+
# ### commands auto generated by Alembic - please adjust! ###
73+
op.drop_table('pet')
74+
op.drop_table('user')
75+
op.drop_table('foods')
76+
op.drop_table('accessories')
77+
# ### end Alembic commands ###

package-lock.json

+16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
"prop-types": "^15.6.1",
7777
"react": "^16.8.4",
7878
"react-dom": "^16.8.4",
79+
"react-icons": "^5.5.0",
7980
"react-polyfills": "0.0.1",
8081
"react-router-dom": "^6.3.0"
8182
}

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ sqlalchemy==1.3.23
2424
urllib3==1.26.3; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'
2525
werkzeug==1.0.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
2626
wtforms==2.3.3
27+

requirements.txt.save

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
-i https://pypi.org/simple
2+
alembic==1.5.4; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'
3+
certifi==2020.12.5
4+
click==7.1.2; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
5+
cloudinary==1.24.0
6+
flask==1.1.2
7+
flask-admin==1.5.7
8+
flask-cors==3.0.10
9+
flask-migrate==2.6.0
10+
flask-sqlalchemy==2.4.4
11+
flask-swagger==0.2.14
12+
gunicorn==20.0.4
13+
itsdangerous==1.1.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
14+
jinja2==2.11.3; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
15+
mako==1.1.4; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
16+
markupsafe==1.1.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
17+
psycopg2-binary==2.8.6
18+
python-dateutil==2.8.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
19+
python-dotenv==0.15.0
20+
python-editor==1.0.4
21+
pyyaml==5.4.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'
22+
six==1.15.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
23+
sqlalchemy==1.3.23
24+
urllib3==1.26.3; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'
25+
werkzeug==1.0.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
26+
wtforms==2.

src/api/admin.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
import os
33
from flask_admin import Admin
4-
from .models import db, User
4+
from .models import db, User, Food, Accessories, Pet
55
from flask_admin.contrib.sqla import ModelView
66

77
def setup_admin(app):
@@ -12,6 +12,8 @@ def setup_admin(app):
1212

1313
# Add your models here, for example this is how we add a the User model to the admin
1414
admin.add_view(ModelView(User, db.session))
15-
15+
admin.add_view(ModelView(Food, db.session))
16+
admin.add_view(ModelView(Accessories, db.session))
17+
admin.add_view(ModelView(Pet, db.session))
1618
# You can duplicate that line to add mew models
1719
# admin.add_view(ModelView(YourModelName, db.session))

0 commit comments

Comments
 (0)