cuducos / whiskyton Goto Github PK
View Code? Open in Web Editor NEWWhiskyton, find whiskies that you like!
Home Page: https://whiskyton.meiaduzia.com.br/
License: MIT License
Whiskyton, find whiskies that you like!
Home Page: https://whiskyton.meiaduzia.com.br/
License: MIT License
views.py
wlist = '['
for whisky in whiskies:
wlist = wlist + '\n "' + whisky.distillery + '",'
wlist = wlist[:-1] + '\n]'
import json
...
wlist = json.dumps([whisky.distillery for whisky in whiskies])
You could also look into using an IDE that has PEP-8 validation built-in. Personally, I use PyCharm 3, but there is tons of other choices.
Basically, when some search fails, we have to do two tasks:
In app/views.py:
Lines 39-44 query for the “best” correlations, while line 48-50 use the ID from the first query to get whisky data of each whisky.
I can't find any reference to a whisky named Craigganmore, but Cragganmore certainly exists, and is missing from your database.
I have no idea about how to start it. I'm open to pair programming tutors (;
… but I'm no graphic designer. Feel free to get in touch if interested to contribute with some design (;
You should use abort(404) instead of redirect('/404') when you can't find a page. The "problem" with that redirect is that it doesn't throw an HTTP error code 404 as you should when you can't find a page, it just returns 200 OK. You can still have a custom error page with abort, look at this page in the Flask doc.
Not possible: no use of getattr() in templates
Example: when typing "Glen” there's no indication that there are more than five matches
Make a correlations table (and query) that avoid duplicate correlations (e.g. correlation between whisky=19 and ref=32 could be the same row of whisky=32 and ref=19)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.