You cannot post messages because only members can post, and you are not currently a member.
Description:
Group for discussing HasGeek code.
|
|
|
New DSL in requestargs in coaster.views
|
| |
Today I introduced another tiny DSL in coaster with the '[]' string suffix in requestargs: [link]
This is the second instance: load_models accepts parameters in the "parent.child" convention to look up the child object inside the parent object.... more »
|
|
Flask-Lastuser model changes
|
| |
Hello all, I'm considering adding more columns to the User model in Flask-Lastuser. Lastuser recently acquired a `status` column that allows a user account to be suspended or marked as merged. There is no such column in the Flask-Lastuser, so no way to suspend a user at the app level.
Adding a column will affect all apps that use Flask-Lastuser, which will mean they need migrations. I'm not aware of any means by which Flask-Lastuser can itself publish an Alembic migration path for client apps.... more »
|
|
limiting size of uploaded files
|
| |
I was trying to put a limit for size of upload files in Imgee by setting
MAX_CONTENT_LENGTH (as prescribed in [1]). It raises "413 Request Entity
Too Large" when the file size exceeds the limit, as expected. Good so far.
Handling that exception would let go the error and give back response
status to be 200, but the browsers complain "The connection to <host> was... more »
|
|
How to reuse some of the HG code to create an event site
|
| |
Hi, I have to create a web site for the Open World Forum 2013 (an open source conference that will take place). Due to personal preferences, I'd like to use Flask for the public-facing website and I'm looking for an appropriate back office so that contributors can work on the content. Is it something Nodular could be useful for ? I don't see an admin UI in... more »
|
|
New Lastuser is live
|
| |
Over the last couple of days I added Alembic migrations to Lastuser, added a "status" flag to indicate active/suspended/merged accounts, and merged the code-reorg branch into master. It's now live at auth.hasgeek.com. I will next be using Flask-SQLAlchemy "binds" to allow the blueprints to be used in other apps while talking to an independent database. This will allow lastuser's UI to be merged into hasweb.... more »
|
|
Nodular on Windows
|
| |
A couple of days ago I noticed I was using os.path.join to construct paths, but the os.* modules are OS-dependent. That means os.path.join uses '/' as a separator on POSIX environments, but could be different on other platforms. Sure enough, the Windows version uses '\'.
That means nodular will not work on Windows, so I cloned the POSIX os.path.join into a custom function inside Nodular. [link]... more »
|
|
size in the image name?
|
| |
Currently, the url for an image with a different resolution is
/<image_id>?size=<width>x<heig ht>, which doesn't look nice, IMO.
How about /<image_id>-w<width>-h<height> .<extn>? Here width, height
and extn could be optional.
We can store the images with the name in the above format so that we
don't need the Thumbnail table [1] which just stores the size info and... more »
|
|
Eventframe and SQLAlchemy 0.8.x
|
| |
Hi all, As of SQLAlchemy 0.8.x, column names cannot be reused across joined-table polymorphic models, the sort Eventframe and Nodular use.
This is the fix for a bug I reported a few months ago. If you have an old Eventframe installation from SQLAlchemy 0.7.x, your DB will be outdated. Please drop the additional columns.... more »
|
|
Imgee storage
|
| |
Couple of queries -
- Currently, the uploaded images are saved on to the disk first and
then uploaded to AWS. Is this 2 step process intended? Do we want to
maintain a local copy too? In that case, do we want to do batch
uploads to S3 periodically?
- We make a unique name for each image uploaded and store it in S3... more »
|
|
|