Skip to content

Commit e3516cb

Browse files
Merge pull request #7 from dfrankow/dan_migrate
Add migration
2 parents e27db9f + bd6d821 commit e3516cb

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Generated by Django 3.1.7 on 2021-03-04 21:42
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
initial = True
9+
10+
dependencies = [
11+
]
12+
13+
operations = [
14+
migrations.CreateModel(
15+
name='APILogsModel',
16+
fields=[
17+
('id', models.BigAutoField(primary_key=True, serialize=False)),
18+
('added_on', models.DateTimeField()),
19+
('api', models.CharField(help_text='API URL', max_length=512)),
20+
('headers', models.TextField()),
21+
('body', models.TextField()),
22+
('method', models.CharField(db_index=True, max_length=10)),
23+
('client_ip_address', models.CharField(max_length=50)),
24+
('response', models.TextField()),
25+
('status_code', models.PositiveSmallIntegerField(db_index=True, help_text='Response status code')),
26+
('execution_time', models.DecimalField(decimal_places=5, help_text='Server execution time (Not complete response time.)', max_digits=8)),
27+
],
28+
options={
29+
'verbose_name': 'API Log',
30+
'verbose_name_plural': 'API Logs',
31+
'db_table': 'drf_api_logs',
32+
},
33+
),
34+
]

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def get_long_desc():
2121

2222
setuptools.setup(
2323
name="drf_api_logger",
24-
version="1.0.4",
24+
version="1.0.5",
2525
author="Vishal Anand",
2626
author_email="vishalanandl177@gmail.com",
2727
description="An API Logger for your Django Rest Framework project.",

0 commit comments

Comments
 (0)