fix: remove hardcoded date

Signed-off-by: Ameya Shenoy <shenoy.ameya@gmail.com>
This commit is contained in:
Ameya Shenoy 2021-02-12 18:16:07 +05:30
parent fbb2efea87
commit fab0a7ada3
Signed by: codingcoffee
GPG key ID: F7D58AAC5DACF8D3
4 changed files with 22 additions and 2 deletions

View file

@ -1,3 +1,9 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Serializers for returning data."""
from rest_framework import serializers
from app.models import BhavCopyEquity

View file

@ -1,6 +1,16 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Bullish project URLs."""
from django.urls import path
from app.views import BhavCopyEquityView, BhavCopyEquityDefaultRedisView, BhavCopyEquityCustomRedisView, EmptyRespoinseView
from app.views import (
BhavCopyEquityView,
BhavCopyEquityDefaultRedisView,
BhavCopyEquityCustomRedisView,
EmptyRespoinseView
)
urlpatterns = [
path('emptyresponse/', EmptyRespoinseView.as_view(), name='emptyresponse_view'),

View file

@ -33,7 +33,6 @@ def fetch_bhav_copy_equity_data(curr_date=None):
}
if curr_date is None:
curr_date = datetime.datetime.now().strftime("%d%m%y")
curr_date = '080221' # TODO: remove hardcode
zipurl = f'https://www.bseindia.com/download/BhavCopy/Equity/EQ{curr_date}_CSV.ZIP'
resp = requests.get(zipurl, headers=headers)

View file

@ -1,3 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Bullish page views."""
# third-party imports
from rest_framework.response import Response