Code Project – Python Flask Top Ten Movies Site

So, I mentioned dumping the Flask Blog a while back, but then I decided that since I had managed to get it all working, it would be somewhat trivial to get it working on a subdomain, instead of a main domain, which had been my original plan to start with.  I was never too excited about dropping this project because I have a few ideas for little projects that I wanted to build that would actually work pretty well in Python and Flask, since it essentially adds a direct path to running a back end style script and a front in interface.  Part of my frustration had come from trying to integrate OTHER Flask projects into the same website and Python code.  Specifically the Top Ten Films website.  

So I stripped out all of the work I had done on integrating the Top Ten movies site, and got the bare Blog running on smallblog.bloggingintensifies.com.  That’s not a link, don’t bother trying to go there, there is nothing there (More on that in a bit).  In this process, I got to thinking, I could run separate Flask Instances, one for each project, though I feel like that’s probably kind of super inefficient for server overhead.  I went and did it anyway, with the Top Ten Movies site.

Which worked fine.

At this point, I realized, I had a working copy of this website to work with and test.  A lot fo my previous frustration was adapting and merging two Python files, which share some redundancy, which share the same names on some secondary files and variables.  I could now, modify the Top Ten Movies code, and test it, to remove the problem duplication.  Satisfied, I shut off the Flask Blog, and merged the code again, and, it worked!  Worked as expected.  I did update the code a bit more again to add in the user/admin features of the Blog to the Movies page, so no one else can change the list.  

I also changed the subdomain from smallblog.bloggingintensifies, to flask.bloggingintensifies.com.  I mostly plan to use this sub domain to show off Flask Python projects, not just this blog I’m never going to fully utilize, so the name change makes more sense.

I also used some of the other HTML knowledge I’ve gained, well, the modern HTML knowledge, to reformat the Movie Site from how it was built in the class.  The class just had a long single column with ten movies.  I’ve changed it so number 1 is large and everything else is a smaller grid.  It’s much prettier looking now.  I doubt it changes much, if at all, but it’s a neat and fun project.

Ending My Experiment with Flask

I really like Python, but I have one major gripe with it. It’s a pain in the ass to actually share any projects. Python can’t easily be packaged into an executable, and it doesn’t really work well on the web. I had some vague high hopes of building some Flask based web apps, and I may revisit it at some point, but even just trying to share some of the projects I made during my Python class had become a cumbersome pain to manage.

I had originally set up the blog project over on JoshMiller.net. A domain I have, and don’t really want to dump, but don’t really have a use for. I also do not need another blog. “Traditionally” I would use that domain for “personal blogging” but that’s what this site is for, and I’m happy with the state of things here. The Flask blog was also extremely basic and would require a lot of code work to make workable, with things like image management and an RSS feed and some sort of theme system etc. I could probably do it, but…. why?

One thing I’ve learned after working on many fruitless projects over the years. It’s ok for a project to be kind of pointless, but it’s not ok for it to just be completely pointless. There are plenty of much better platforms for blogging, and frankly, all of them are “Just use WordPress”. Another angle is learning how to run sites with something besides Apache, but that tine would be better just learning Nginx.

Anyway, part of the point was to take the base Flask Blog app, and integrate other Flash Apps into it. The problem is, all of the ones I have built are designed to be stand alone apps. They often reuse some name space so i can’t just copy/paste the code in. Then things start to get screwy with modules and imports. The code itself is also not super reusable. Flask can host HTML code, but it’s all very specifically laid out and structured. I can’t just drop the same code into a folder somewhere and run it on a straight Apache instance.

What does work well for this, is JavaScript. Which is basically entirely intended for web based use. Most of the ideas I have had for projects would be much better suited running as JavaScript sites that are much more portable.

Anyway, all of this is mostly to say, I have disabled the Flask Blog I had hosted on JoshMiller.net and rolled it back to the broken landing page I was building. I don’t really care about this site anyway. Hell even the landing page concept is redundant because I’ve got a nice little Github Page serving that purpose.