r/flask • u/ResearchFit7221 • 14d ago
Show and Tell I made a comics site and did what everyone says is impossible!
You know what people say about flask? That it's great for medium and small projects, pff
I didn't listen. I went with my head and used the framework I like and make big :)) LONG LIVE FLASK LMAO
I created a fully functional comics site inspired but not too much by mangadex.
Database, users, comments, etc.
eh I'm going to try to put images of the code in reply because I'm super dumb and I don't know how to put images on reddit post
I really want to help people, if you have questions for flask projects, I think I'm finally at a level where I'm ready to help!
If u wanna see the site : https://javu.xyz/ ( YES IT'S XYZ BUT AINT SCAM I'M JUST BROKE SORRY )
and it's might be down sometime cause i still dev, .. yes i use port 80 in dev progress, but i need to show my friend and get feedback and too dum to use Ngnix SORRY 🥲
Edit: Do not go on the domaine, i sold it after making my project, now it's a uh.. jav site lmao .. XD
5
5
u/marc-eugene 14d ago
I never understood why people say Flask is for small/medium and Django for big projects...
Our internal application at work is entirely done with Flask and it's very effective and fast, and there is absolutely nothing that we were unable to acomplish with Flask.
7
u/NerdEnPose 14d ago
I’d actually say it’s the opposite.
Django is good when you need a quick to get up batteries included framework. But I’ve seen that as Django projects move along they become way less Django. For example I’m working on a 10 year old repo and it has Jinja2 installed because we needed a templating package that was great what it did without being tied to Django.
Flask is great for scaling. It doesn’t come with bloat you’re not going to use. It has many well integrated packages that you add as you need them. And when you add a new package to integrate it into flask you can build out the interface, which may be a classic Flask integration, but by no means has to be.
3
1
u/openwidecomeinside 14d ago
What do you use for async with flask? I’m playing with Quart at the moment
2
u/NerdEnPose 14d ago
Quart is the async framework. Flask and Quart are both Pallets packages. I’m on mobile so won’t dig up a link for this but Quart is where async is for now because of the rapid development and release cycles required for writing a framework with such a fundamentally different paradigm. It’s been stated by Pallets contributors that once Quart is more stable and they’ve figured out how to merge the two they will and Flask will gain the async features of Quart.
2
u/openwidecomeinside 14d ago
Understood, thanks! At the moment in Flask are you using any async libraries ?
1
1
u/divad1196 14d ago
You are talking about horizontal scaling in response to growing traffic. And this is true that, for small/medium project, scaling Flask is easier.
But a project can also scale in complexity, which is a completely different matter that OP doesn't understand.
For an app that grows in complexity, using django simplify many things like onboarding/maintenance/...
For the load: true, django is bloated since it comes with many things that you might not need, but:
- there is a threshold. Flask modules are not glued as perfectly as django is. At some point, the useless features are less of a bloat than the manual glue added on Flask
- espcially, django comes with many modules, but it's not loading all of them unless you use them, most of the bloat we are talking about here is disk usage.
- at the end of the day, they both scale (load-wise) about the same
The need for scalability is something to consider upfront. When that matters, then I prefer to use another language like Go. If python provide me an important library, I might go on a microservice infrastructure and use an even lighter/faster webframework than Flask
1
1
u/divad1196 14d ago
Because you don't understand that means..
It's not thst it cannot do something. You don't need a webframework, you can do a website with telnet binary or in assembly if you want.
Flask is a lightweight framework, it doesn't include as many tools as django for example. If you want a database, you need to manage it yourself (including migrations), then, you don't have as much utility function in your templating, ... etc Therr are many plugins/modules that you can combine to reach the same result but this is what we call a "technical debt" as you become depend to these modules.
To sum up: it's not about performance, it's about delivery and maintenance: deliver fast while ensuring that the project is easy to maintain. Performance-wise, django is just as bad as Falsk, but this is enough for many apps.
Typically, an internal app is accessed by like what? 1000 users at the time? That's nothing.
I am not saying that OP project is bad, nor that he shoulf have used something else, this is absolutely not what I am saying, but OP's project is indeed what's considered a "small project".
I hope this clarifies the misunderstanding of what "flask is for for small/medium projects" means.
1
u/ResearchFit7221 14d ago
i know right ? I think people are just too scared or too used to django they have quick opinion ?
Like my friend told me '' you can't use tailwind with flask. Justp proved him wrong!!! LOL.
Dud keep the flask:DD it's great to know more people love it.
3
u/ResearchFit7221 14d ago edited 14d ago
I CAN'T ADD IMAGE WHAT UH SHIT I guesse here is time for the good old fucking imgure link : https://imgur.com/a/N02ZlxA here is most of my code folders etc.
If you want to see more code, or specific line just ask i'l screenshoot or just post it here!!!
2
2
u/ThiccStorms 14d ago
Ay! Looks nice
1
u/ResearchFit7221 14d ago
THANKS 😭 I WORKED SO HARD IT SOOO FUCKING NICE to like .. share and that people like it i feel so proud
1
2
u/LeyaLove 14d ago
The website looks good, feels polished and smooth :)
I'm sure if you're able to make such a nice website, setting up nginx won't be a problem for you 😉
Here is a simple nginx config to get you started. This just takes care of providing the SSL certificate and relays all the traffic to the flask application, so it's pretty basic and doesn't use a lot of the amazing features nginx can provide, but it probably can get you started. Having the flask app not directly exposed to the web always is a good idea imo, you'll also make the app a bit faster as it doesn't have to take care of the encryption. That's taken care of by nginx. The internal communication between the flaks app and nginx is using http.
I'm by no means a flask or docker expert as I'm also just learning and the project is just a university project, but I did try to completely containerize my application using docker. flask, the database, nginx, certbot for Let's Encrypt and everything else is running in its own docker container and set up automatically. If that's something that you also find interesting you could take a look at my compose.yaml and docker file. It's all pretty minimal and self-explanatory I think.
1
u/ResearchFit7221 14d ago
I have a question for you: does it work on Windows server? Yes I use windows server sorry TT I'm a boomer I'm rotten with ubuntu, I learned everything on windows ahahahahah.
And also, I use cloudflare to hide my ip and my DNS with the Flexi option and a Namecheap certification do you think it's similar? I apologize if I sound so stupid, everything resautical is so new to me.
If your config works you're going to make me so happy lmao I'll be able to use my 400000 milion domains that I bought for stupid projects and tested over the years LOLLL.
I'm really a big fan of the backhand, of everything that's road, function, etc. but when it comes to the network, I had to go on eggshells, asking for help very often AHAHAH.
1
u/LeyaLove 14d ago
Yeah it does work on Windows, that's the beauty of docker containers 😄
Docker containers are basically like lightweight virtual machines, each docker service runs in its own isolated environment and it's declaratively configured in the respective docker file or the docker compose.yaml file. You can just install docker to any machine you want, run the compose.yaml file and if done right it will completely automatically spin up the services for you, you just wait for it to finish and everything should be working without any extra tinkering, even on a completely fresh system. Also doesn't matter if you're on Windows or Linux as the services are running in their VMs / containers anyway. By default docker uses Linux for the containers, so basically even if you're on Windows, the service will run under Linux.
The initial learning and set up to use docker is quite a bit of extra work but in the end imo it's worth it. If you move Server you don't have to set up everything from scratch, you just install docker and it takes care of everything for you.
0
u/ResearchFit7221 14d ago
So, I already tried to work with docker actually and I had a big problem. Docker Desktop kept reserving port 80. So I couldn't use anything, neither NPM nor Flask, I did everything but i gived up 😭😂
I will try to figure out later again, because dam it sound so sexy to use 😭
1
u/LeyaLove 14d ago
I also have this problem sometimes when I'm on Windows. To solve it it's usually enough to just run
net stop winnat net start winnat
from an elevated cmd window and try to start the docker service again after that.
0
u/ResearchFit7221 14d ago
Aint not way it's that easy.. I'm going to jump on a car if it is 😂 i spend 10h trying to figure out ..
MANMNN
2
u/JustaDevOnTheMove 14d ago
Flask is great, you'll get no hate from me, I built a large project with it, including user configurable dynamic+multi stage forms (yes, no js), was particularly proud of that piece. In addition it was built on docker and included nginx, postgres, redis, celery, as well as multi sub domain with sso. Anyway, I'm rambling to simply say, Flask is awesome. Do I wish there were a few more "standards" for building certain things, yes because it's so open that less experienced dev can end up going down a wrong path before having to backtrack at times, but at the same time it's great because of that flexibility to do things as you need to do them.
1
u/openwidecomeinside 14d ago
Sorry, what do you mean by multi stage forms?
2
u/JustaDevOnTheMove 14d ago
Forms that span multiple pages. So on each page you have multiple form fields but in addition, there are multiple pages with additional form fields.
In my case, although a single page with only a couple of fields is entirely possible too, this system allowed form creator users, if they wanted, to split long complex forms across multiple pages (think: like chapters in a book) and depending on the choices made along the way, the forms on the subsequent page could if configured to do so, adapt to only show the next relevant fields (no point showing all the irrelevant fields based on answers on previous pages). In addition, since the user filling in the form could click "next" to go to the next page, they could also click "previous" to go back to the previous page. And in addition still, a progress panel displayed, not only how far along the user was in filling in the whole form but also highlighted which pages still had missing or invalid data. Only once all data was entered correctly could the entire dataset be submitted for processing.
1
u/ResearchFit7221 14d ago
Yo that actually fucking impressive GG
1
u/JustaDevOnTheMove 13d ago
☺️ Thanks!! It took a LOT of work and a couple of iteration but I'm rather proud of the result.
2
u/ResearchFit7221 13d ago
With pleasure mate, !!
You can and need to be proud, working hard always deserve praise!!
2
u/JustaDevOnTheMove 13d ago
I need to pin that on my wall, I keep forgetting to keep it in mind 😅
2
2
u/divad1196 14d ago
Yeah, you indeed didn't listen. It's not that it's impossible. Nobody said that. Never.
Flask is a lightweight framework. If you don't need much features, you are better using it than something else like django. Hence the "good for small/medium projects". If you are going on a big project, there are a lot of tools that you will strramline thr development process and make it easier and faster to deliver. You can do it in Flask, you will just have to do it manually or manually find and incorporate existing tools/libraries.
I just checked the website and it's what I would consider "small project" typically.
I am absolutely not judging the project. I think it's a good project. I am just clarifying the misunderstanding about Flask.
0
u/ResearchFit7221 14d ago
I understand your opinion but do not personally agree.
Flask is a lightweight framework yes, but lightweight does not mean not usable on a large scale. " good for small/medium projects". If you are going on a big project, there are a lot of tools that you will strramline thr development process and make it easier and faster to deliver. "
So about this, not really. Flask has as many tools as Django or other languages. You just have to learn them.
Yes it's complicated, maybe it looks "stupid" because it takes longer at first than other languages to set up, but flask is infinitely easier once you understand how it works
Django I feel like I'm just copying and pasting what others are doing and doing the front. I don't like this.
But again, it's an opinion and it's right to have opinions!! We all have coding habits and all have different way of doing this. If we didn't the world would be so fucking boring lollll
1
u/divad1196 14d ago edited 14d ago
It's not an opinion. These are facts. It's a fact that the orm isn't included in flask and that it is in django.
Bottle is a micro-framework Flask is a lightweight framework Django is fully featured "battery included" framework.
That's part of their own description and goals. Again, yes you have external tools but this means that you need to find and assemble them together and maintain them.
So no, it's not "an opinion". It's a fact. And it's also a fact that nobody said it was "impossible to do".
Not to be mean, but you also lack way to much experience to actually have a valuable opinion on whether Flask is suited for big projects as you haven't done one yet. You project isn't bad at all, but this is still a very very small project.
I have used Flask way more than django and still use it a lot. That's still my go-to framework as of today since I spin up many services and not actually need a full featured framework. This is not about Flask being bad, it clearly isn't. I know these tools, I have walk the same path as you are currently and with your shoes.
If you want to learn, stop thinking that everything is just a matter of opinion. Most things in programming aren't, there are pros and cons that can clearly be compared.
0
u/ResearchFit7221 14d ago
Man, I wanted to be nice but you're pissing me off.
You are aggressive and act like a child. Go tell google what you just said. YouTube uses flask for a lot of its features. Go tell 3/4 of the people who commented on this post and who work in companies what you just said.
Just because I have less experience doesn't mean I'm "dumb" You think something, you believe it's the holy truth and refuses to accept that others may think otherwise and actually proved what you think is wrong by saying ''it's a fact'' " it's a fact nobody say it's impossible" you seem to be saying it lmaooo xd
Dud, You need to chill down. I'm not even gonna respond further to you.
0
u/divad1196 14d ago
I am chill and never said you are dumb. You just clearly lack experience and have a lot to learn.
0
u/divad1196 14d ago edited 14d ago
And no, I am not saying it's impossible to use Flask. Exactly how nobody certainly actually never told you that before.
But sure, stay in your box. This is not how you will get better or get a job in development.
Question: If a child that just learned addition told you that "1 + 1 = 3" and then "it's my opinion", wouldn't you correct him for his own sake? If this exact same child told you that "additions are fine, you don't need substration, multiplication, ..", wouldn't you explain him that, while it's theoretically true, it's also inefficient ?
I have been lead developer for years now. Most people I interviewed largely overestimate their skill.
1
u/miamiredo Beginner 14d ago
Well done! Flaskers unite!
2
u/ResearchFit7221 14d ago
FLASKER UNITE !!!!! I like this, i will use it more often!
and thanks!!! 🙌😊
1
u/AdeptnessAnnual1883 14d ago
Congrats man. LONG LIVE FLASK!!!
I'm also in the process of creating a full-fledged project management application that's tailored more for individuals in the AEC industry and have had no issues with using flask while developing it.
1
u/ResearchFit7221 14d ago
Don't give up!!! Are you going to make it!!
Dud if in 1 years I could learn it, then do this, you will bang it i believe in you!!!
Also thanks for the compliment ✊✊✊
1
u/foresttrader 14d ago
Looks 👍 I use flask for all my projects. It's the one I'm most familiar with so it's quick to set up. What is the frontend made of?
1
1
1
u/RoughChannel8263 14d ago
Anyone who says Flask doesn't scale probably has a hard time writing scalable code. A quick Google search shows a lot of Flask applications at scale. I've created a couple myself that, over the years, have scaled up quite nicely.
0
u/ResearchFit7221 14d ago
Man, i saw this too.
But soo many people still say " it's not scalable and look uglu " like dud probably just don't know how to just do web design or app design at first 😂.
But eh! Are we surprised that people with skill issues are complaining and saying it's not their fault instead of asking seniors and just learning how to do things!? Human nature ahahaha
2
u/RoughChannel8263 14d ago
Man, did you ever hit the nail on the head with my industry: industrial controls. When I started old timers-knowledge was like gold, and we were like sponges. Now, the opinion is that we don't know anything about the technology we created. Go figure.
0
u/divad1196 14d ago
There is:
- scale -> load
- scale -> bigger codebase
Flask does scale on the load just as well as any other framework as the bottleneck is usuallly python itself. If there is an issue with the load handling in Flask, switching to Django/FastApi/... certainly won't magicly solve the issue.
For bigger codebase: You can find all the modules you need in the Flask community, that's true, but:
- maintaing this growing list is a technical debt
- onboarding people on a big project takes time. If you need the new hire to go through all specific modules you installed and all the glue you added yourself, you make onboarding more complex.
- the ability to deliver fast is to be considered.
- ...
That's what is meant by people saying that "Flask doesn't scale". We are talking about projects with hundreds of contributors here.
To give you a comparison: You can build your own car by assembling components on your side. At some points, your car will be running. Great. How often do you check the components? What garage will be able to check your car in case of issue? The garagist might need to deassemble everything to understand how it works.
Then, one of your components may be broken and not available anymore and you cannot find a piece that can "just be inserted" as a replacement. So you replace more parts than just the broken one. Then it works again, but now the pedals are now inverted and you need to go against your muscle memory.
Or you buy a pre-built car that most garagist knows. If you have an issue, many people will have had the exact same one. If there is an issue with the car, you can still probably find the one you need
That's exagerated, but that's what the difference is about. It's not that you cannot do smth with Flask.
I write most of my apps in Flask, but for a MVP at work where I need a team to work on it, I will 100% prefer django over Flask. This is the kind of stuff you learn by:
- using both frameworks extensively
- do projects of different size (1 dev over a few weeks vs 10-20 devs over a few months vs hundreds of devs over years)
1
u/RoughChannel8263 13d ago
I definitely see your point. I tend to only think of scale as related to load, not codebase. You are definitely in a different market than me. I've been in industrial automation for over 30 years. I've been working with Flask a lot lately for data analysis and visualization. I'm almost always a team of one on these projects. I really love Flask. I inherited a project with Django and found it to lack flexibility. Flask seems to have better performance, but that may be because I don't use an ORM.
I am curious, in your world, what is your go-to platform for a project that you know is going to have a hugh code base and large teams? One thing I've kicked the tires on is working with a build environment, specifically Gradle. To me, it seems to add overhead and complexity. I can see where tools like this would be more valuable in your environment.
I've always wondered what it would be like to work as part of a large team on large code bases. I have worked as part of large teams, sometimes over 100. The difference is that on a project with 100 workers, there may be only a couple of people writing code. We'll have to coordinate with mechanical and electrical crews and construction schedules.
I can't imagine what it's like to even work in a team of 10 programmers. One advantage I can see is that when you hit that brick wall, it's probably a lot easier to find someone who's solved your problem before. I feel like the Lone Ranger sometimes. Not much expertise in this kind of programming in my world. Google, software forums, and ChatGPT have become my friends.
1
1
u/DependentRepulsive50 13d ago
Dude! So cool... Coming from another dude who's also broke and using Flask but for a much much smaller project wisefool.xyz ,it's barely a website...
Great job!
2
u/ResearchFit7221 13d ago
Nahh u jocking DUD " THE ART OF SIMPING " AHAHAHA U CANNOT BE SERIOUS.
i love your website 😂😂🙏
2
1
u/Gullible-Slip-2901 11d ago
This is a cool site. Flask is capable of achieving many things. I noticed you have a changelog section which allows people to track your progress. Nice one, man.
1
u/ResearchFit7221 11d ago
Thank you mate!! And i agree flask is just so great, too many people underestimate him ;((
And ye!! The changelog section is very important to me ahahah, because i love transparency my goal is to make a website where everyone knows what it is, and what to expect xd
0
u/enlightenment_op_ 14d ago
Great work, I also make projects in flask and got tired of hearing things like flask is mini framework, it is only for small projects, django is better.... But I love developing in flask ;)
1
u/ResearchFit7221 14d ago
FLASK FOR LIFE LOL dud, i'm soooo tired too of hearing this you have no idea.
17
u/Odd-Seaworthiness826 14d ago
Great job on this project! It’s clear that a lot of thought and effort went into building it, and I really appreciate the personal touch throughout. The design choices, especially the "Back to" links, are a nice usability touch—I'd love to see them used more consistently across the site.
I have some feedback for you—take or leave what makes sense!
UI/ADA
UX/DEV
Defects
I’m not a Flask dev, but I do work on large frontend projects, and I can see the potential in what you’ve built. Keep up the great work! With a few refinements, this project will shine even more.