trendrr / whirlwind Goto Github PK
View Code? Open in Web Editor NEWFramework built on top of todays fastest tech (tornado, mako templates, mongo db)
License: MIT License
Framework built on top of todays fastest tech (tornado, mako templates, mongo db)
License: MIT License
Currently, installing Whirlwind et al and starting the main.py program will yield an ImportError that traces back to mongokit. MongoKit imports ObjectID from pymongo, but in the most current pymongo, objectid.ObjectID is actually under bson. See the following commit:
behackett/mongokit@881e252
This will probably be fixed shortly. I'm just adding this here so that anyone who finds the same issue will have the answer ready sans Google.
when you set a flash message it doesn't save if we use a redirect. guessing it has something to do with the execution order of the middleware hooks btw the session middleware and the flash middleware.
I've had to make a number of tweaks to get pagnation.py working, here's what I had to do, I'm not sure if these are bugs or just differences in setup, I'm working on the assumption here that "collection" variable passed to pagination is a mongo cursor?
has_next:
return True if (self.page.count(True) == self.limit) else False
return True if (len(self.page) == self.limit) else False
I was getting an exception on trying to get the length of len(self.page) (Mongo Cursor), one issue with the change I made was that it could only be called prior to iterating over the cursor.
NEXT:
__build_url:
page_str = "page=%d" % page_num
return re.sub(r'page=\d+', page_str, url)
page_str = "&page=%d" % page_num
return re.sub(r'&page=\d+', page_str, url)
I had an issue if "page" as the only argument, the _build_url func was assuming that you had something else eg: "?foo=true%page=2" so removing the & seemed to solve this issue.
Hope this helps. (New to Github, and having some issues with the mark up)
Hi,
Thanks for the very good work. Love Python too.
I have found that flash-messages.js file is missing so flash messages does not work. I found one in your repo, I have copied it to js folder and then loaded from base.html and now it's working.
How would I create a custom middleware for my project, I tried adding a directory at:
/application/middleware
and then adding:
"application.middleware.mymiddle" to the config but don't seem to be able to get it to load - does the middleware need to exist in the dist-packages path, along with the others?
thanks
john
I had the following exception with the latest code:
File "/usr/local/lib/python2.6/dist-packages/whirlwind/core/request.py", line 224, in
class RequestHelpers(Object):
NameError: name 'Object' is not defined
Replacing "Object" for "object" seemed to sort everything out for me.
Thank.
John
Is there an auto reload option for Whirlwind - so if I make a code change it would auto reload the running app in development mode?
thanks.
shouldn't need to register in bootstrap.py if the model is int he models directory
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.