File tree Expand file tree Collapse file tree 2 files changed +2
-14
lines changed Expand file tree Collapse file tree 2 files changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ <h1 style="text-align: center; font-size: 45px; color: #6B6B6B; margin: 2%;">Ded
182182
183183// console.log(images);
184184// console.log(images[0].link);
185- for ( i = 1 ; i < 20 ; i ++ ) {
185+ for ( i = 1 ; i < images . length ; i ++ ) {
186186 console . log ( images [ i ] . link ) ;
187187 var elemAdd = document . createElement ( "DIV" ) ;
188188 var elemImg = document . createElement ( "IMG" ) ;
@@ -341,7 +341,7 @@ <h1 style="text-align: center; font-size: 45px; color: #6B6B6B; margin: 2%;">Ded
341341 while ( Math . abs ( e . lngLat . lng - coordinates [ 0 ] ) > 180 ) {
342342 coordinates [ 0 ] += e . lngLat . lng > coordinates [ 0 ] ? 360 : - 360 ;
343343 }
344- var randArticle = Math . floor ( Math . random ( ) * 20 ) ;
344+ var randArticle = Math . floor ( Math . random ( ) * linksDict [ state ] . length ) ;
345345 var str ;
346346 if ( linksDict [ state ] [ randArticle ] ) {
347347 str = linksDict [ state ] [ randArticle ] . headline ;
Original file line number Diff line number Diff line change 1818import os , sys
1919from gnews import GNews
2020
21-
2221# sys.path.insert(1, '/path/to/application/app/folder')
2322
2423sys .path .append (os .path .realpath ('.' ))
25- os .environ ["DJANGO_ALLOW_ASYNC_UNSAFE" ] = "true"
26-
27- from .keys import NEWSAPI_KEY
28- from .keys import FLICKRAPI_KEY
29- from .keys import FLICKRAPI_SECRET
30- from .keys import MAPBOX_KEY
31-
32- MAPBOX_KEY = json .dumps (MAPBOX_KEY )
33-
34- newsapi = NewsApiClient (api_key = NEWSAPI_KEY )
35- flickr_api .set_keys (api_key = FLICKRAPI_KEY , api_secret = FLICKRAPI_SECRET )
3624
3725# Create your views here.
3826
You can’t perform that action at this time.
0 commit comments