fix: remove hardcoded date
Signed-off-by: Ameya Shenoy <shenoy.ameya@gmail.com>
This commit is contained in:
parent
fbb2efea87
commit
fab0a7ada3
4 changed files with 22 additions and 2 deletions
|
|
@ -1,3 +1,9 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
"""Serializers for returning data."""
|
||||||
|
|
||||||
|
|
||||||
from rest_framework import serializers
|
from rest_framework import serializers
|
||||||
from app.models import BhavCopyEquity
|
from app.models import BhavCopyEquity
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,16 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
"""Bullish project URLs."""
|
||||||
|
|
||||||
|
|
||||||
from django.urls import path
|
from django.urls import path
|
||||||
from app.views import BhavCopyEquityView, BhavCopyEquityDefaultRedisView, BhavCopyEquityCustomRedisView, EmptyRespoinseView
|
from app.views import (
|
||||||
|
BhavCopyEquityView,
|
||||||
|
BhavCopyEquityDefaultRedisView,
|
||||||
|
BhavCopyEquityCustomRedisView,
|
||||||
|
EmptyRespoinseView
|
||||||
|
)
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('emptyresponse/', EmptyRespoinseView.as_view(), name='emptyresponse_view'),
|
path('emptyresponse/', EmptyRespoinseView.as_view(), name='emptyresponse_view'),
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@ def fetch_bhav_copy_equity_data(curr_date=None):
|
||||||
}
|
}
|
||||||
if curr_date is None:
|
if curr_date is None:
|
||||||
curr_date = datetime.datetime.now().strftime("%d%m%y")
|
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'
|
zipurl = f'https://www.bseindia.com/download/BhavCopy/Equity/EQ{curr_date}_CSV.ZIP'
|
||||||
resp = requests.get(zipurl, headers=headers)
|
resp = requests.get(zipurl, headers=headers)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
"""Bullish page views."""
|
||||||
|
|
||||||
|
|
||||||
# third-party imports
|
# third-party imports
|
||||||
from rest_framework.response import Response
|
from rest_framework.response import Response
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue