r/learnpython • u/IgnisDa • Jul 30 '20
I made my first website using Python!
Ocean Personality Visualization
Website Link: https://ocean-pv.herokuapp.com/
Repo Link: https://github.com/IgnisDa/ocean-pv/
EDIT: u/_fimin had this idea, here's an account if you don't want to login but still check it out:
Username: Kcliix
Password: notacommonpassword
However, it'd make my day if you made your own account.
After about three (or was it four?) months, I proudly present to you, my first major python project, a website called Ocean Personality Visualiztion. Before this, I made a small Hangman game as my first project and then a cli based login system.
I used Django as my web framework, and a free HTML template I grabbed off the internet (I have no frontend experience). That might be a reason why the website still looks kinda sloppy.
Though I have made a thorough README explaining what the website does, I will explain it a bit here.
A website to visualize your personality using graphs and compare it with others. It asks you a series of questions and analyzes your inputs to create an easy to understand graph. It also provides you an easy way to share these results with your peers and compare your personalities. It is based on the OCEAN personality model which is the most acceptable model to measure personality used by researchers.
What all did I learn from this major (to me) project?
The actual website development and how different components go together to make a functioning website.
I need to learn Javascript.
Deployment is hard- I tried to go the hard way at first by not choosing Heroku (it streamlined the process a lot) but I had to scramble back to it because how hard it is to deploy a dynamic website.
How awesome and Python is as a programming language. I absolutely adore it.
Documentation sucks
Testing sucks
Anyways, I am still mighty proud of what I have done and I invite you all to checkout the website and provide some feedback. If you'd like to make any pull requests, the repo link is above.
PS: If anyone can help me fix my tests, I will be forever grateful to you.
15
u/GU10 Jul 30 '20
Looks really nice. I have tried a few times to make a site but I can never get the aesthetics right - I like clean and simple which is exactly what you have done. Nice work.
Only criticism (and this is only because I work as a software tester) is that you have a bug. When you click `get started` without logging in you get the message telling you you will be redirected to the login page - this didnt happen for me. Thought I'd mention it as you prob will want to fix it! Good luck with it!
4
2
u/IgnisDa Jul 30 '20
I dunno man, it works for me on the actual website. Do you have cookies disabled?
7
u/Yakoo752 Jul 30 '20
Welcome to software development... you will say this so many times. "Works fine on my box"
2
1
u/GU10 Jul 31 '20
No - my cookies are enabled. I tried on Chrome which admittedly I run a lot of extensions on that could interfere with it so tried it again on Edge which has nothing running and it didnt work there either sorry!
As Yakoo said below, the phrase `well, it works on my local machine` is one you will hear / use a lot!
7
7
u/ThisOnesForZK Jul 30 '20 edited Jul 30 '20
Yeah, shouldn't require login.
Maybe would be cool but I will never know.
Edit: not trying to be mean by the way, but requiring personal information to get feedback on website should be considered. Good luck on your endeavors.
3
u/IgnisDa Jul 30 '20
I understand :(
The login system was a bad idea lol
5
u/pleasePMmeUrBigtits Jul 30 '20
No, the login system was a great idea. It helped you learn how to implement sessions with logins and all.
I don't think you were looking to launch it as a product to the world so you would consider improving the UX for 1 billion people to use it. But I would say that you can improve this now and launch it
3
u/IgnisDa Jul 30 '20
Yeah that was my initial thought too.
6
u/pleasePMmeUrBigtits Jul 30 '20
People here are actually very friendly. But your website looks so professional that they forgot that you built it while learning and not for commercial purposes.
Keep up the great work! I am surely going to contribute to the repo
3
1
u/godcantsaveu Jul 30 '20
If possible create a delete profile option, at least this should help allay some doubts. Also prompts that say "password should have 8 characters" are extremely light coloured.
1
u/IgnisDa Jul 30 '20
I don't have any idea how to fix them though
1
u/godcantsaveu Jul 30 '20
No problem mate. I just started doing things. So another day is another learning I suppose. Good luck. PS: If I am right both those things are JavaScript related.
1
u/IchUndKakihara Jul 30 '20
That text is generated by the crispy forms right? If you do inspect on your signup page you can find the ids of those text elements. For example the helper text under 'Password' is in a <small> tag with id=" hint_id_password1". In your register.html template you could target that id and set its style.display to "none" or something like that. Probably not the best solution, better if you could delete it altogether from the backend side but not sure how you do that either
4
u/kramrm Jul 30 '20
I can’t across the page on mobile. It keeps popping back to the top.
2
u/IgnisDa Jul 30 '20
What browser are you using?
2
u/kramrm Jul 30 '20
iOS Safari. Seems to be fine in iOS Chrome.
2
2
Jul 30 '20
Nice work mate , really inspired someone like me just starting out! :)
2
u/IgnisDa Jul 30 '20
Honored! Look into the repo, I've found it beneficial to study others project. Hit me up if you would like any help.
2
u/CuriousExpert24 Jul 30 '20
Great Project! Really liked it. Could you let everyone know which resources you used to learn how to build this project and which resources you used to learn Django and Advanced Python?
2
u/IgnisDa Jul 30 '20
Here's another comment I wrote about the same thing.
https://www.reddit.com/r/learnpython/comments/i0k9s8/comment/fzqlwph
As for advanced python, I don't think I'm advanced at all. The only advanced topic i know is class inheritance and I'm sure people would say that its not advanced at all.
2
u/_fimin GCSE/AS Computer Science Jul 30 '20
If anyone wants an account I made one:
Username : Kcliix
Password: notacommonpassword
2
u/IgnisDa Jul 31 '20
That's a great idea, thanks. Edited the post.
2
u/_fimin GCSE/AS Computer Science Jul 31 '20
Nice! I commented because I saw so many people saying about how they don't want to make an account because it was "sketchy" aha. Great project by the way!
2
Jul 31 '20
Your repo shows 85% of the code is front end - HTML, CSS, and JS (mostly CSS and JS). Is that all from the pre-existing template or framework you used?
1
u/IgnisDa Jul 31 '20
Yep absolutely. And I have no idea what most of it does. It just works. Next stop: learn frontend development.
1
Jul 31 '20
[removed] — view removed comment
2
u/IgnisDa Jul 31 '20
I know, and have used Django as a backend. Of course I have to get better, but ik the basics. I have absolutely no experience with frontend.
20
u/kuriputo Jul 30 '20
congrats! get that on a custom domain and slap some ads on it. should do well, people love these types of personality tests.
7
u/fighter_foo Jul 30 '20
Yeah! Domain names can be availed for free to be used for upto one year, if the site does alright till then you'd know if it's gonna be worth it to purchase the domain for further use.
1
5
4
u/vermavishal891 Jul 30 '20
Now add a feature which lets us start using it just by giving our name and lets us share the result based on that name on a unique link.
1
u/funny_freddy Jul 30 '20
Great job, Keep it up! If you haven’t already, you should check out scss. Handles styling in a useful way.
1
1
1
u/KaiserPhilip Jul 30 '20
How did you get started? I've been wanting to do something past the word counting problems and basic python.
8
u/IgnisDa Jul 30 '20
I learned C++ for two years at school (I hate it lol), so I already had the basics down, albeit some new data structures (lists, dictionary etc). I did a free Programiz course and got the python basics clear. The next two months I was pretty much aimless, just made a hangman game and a login system. I also remember doing a lot of Project Euler, though I have no idea if it helped.
The idea of this project came from a book that i was reading that mentioned the OCEAN Model and got me interested. I had the idea of integrating graphs into the project and checked if it had been done before. Since it wasn't, I got some help from fellow peeps at r/learnpython and they suggested Django would be the way to go.
I did Corey Schafer's Django tutorials and then started with this project. Im not gonna say this was easy. On the contrary it was veryyyy difficult for me because I jumped straight from noob to intermediate. That's why it took me 4 months to complete.
So yeah thats my story over the last 6 months of learning python. If you need any help, feel free to DM me.
1
u/KaiserPhilip Jul 30 '20
Thanks for including where you learned django. Will check it out, hopefully I have enough experience lol.
2
u/IgnisDa Jul 30 '20
As long as you have python basics clear, you're good. You can learn the advanced python stuff as you go along, and the complex django stuff as you try to comprehend what the stack overflow answer means.
1
u/MeetThanki_ Jul 30 '20
Awesome work 😄. While operating the website from mobile the tabs for best friends, teenage couple etc is not responsive. The text goes out of the box.
1
1
u/tushya007 Tushya007 Jul 30 '20
which s3 server are you using ?
2
u/IgnisDa Jul 30 '20
None, there are no file uploads by users. The answers are stored in Heroku free postgresql database.
2
u/tushya007 Tushya007 Jul 30 '20
Oh I though there were profile pics in the user profile but I guess not. I too am doing the Corey Schafer django tutorial and I want to deploy the site but the major problem was the AWS S3 server and I didn't want to enter any credit card info as I have non. So when i saw that u also did the Corey Schafer django tutorial i got exited and asked for the S3 server. Do you know any alternatives to host website even on my pc itself, I would love it. Thanks anyway and I loved your web site. Keep up the work.
1
u/IgnisDa Jul 30 '20
Doesn't pythonanywhere have a file system storage? That would allow you to store pics right on their servers.
You could host a website on your own pc by changing it to a server, but it will be very costly for an individual i think.
1
1
u/pleasePMmeUrBigtits Jul 30 '20
You can try heroku, pythonanywhere (though the django setup might be a bit intimidating), repl.it. Or get a Github student developer pack if you're studying somewhere, it helps a lot
1
u/IgnisDa Jul 30 '20
I have a github student account but since Heroku needs a credit card to link with a github student account, i couldn't avail that offer. Bummer though since my app goes to sleep after inactivity.
1
u/cqwww Jul 30 '20
This is a great application to build before an election, Cambridge Analytica propagated OCEAN tests to use for their targeted data set to manipulate the election.
1
1
u/frankOFWGKTA Jul 30 '20
Right, im not gonna lie, i know nothing about web dev.
But, your site looks so good! It's really user friendly and just easy to read. Better than a lot of websites i see usually. That being said, take my feedback with a pinch of salt as I am no expert.
1
1
1
u/2ndzero Jul 30 '20
Nice! Next step, using a custom domain name
2
u/IgnisDa Jul 30 '20
That's the paid step, and even if i could get a one year free thingy, ill still have to add a credit card which I don't have
1
u/blarkul Jul 30 '20
Looks fine and professional to me. You can always tweak the design to your liking. On mobile it looks a bit wonky but worked fine eventually
1
u/IgnisDa Jul 31 '20
Yeah the sidebar is really glitchy. It breaks after I fix it every time. Idk why. I just gave up lol.
1
Jul 30 '20
How did you learn django ? Books , videos ?
1
Jul 30 '20
I'm not him but I learner django honestly from the tutorials on their website. It's really similar to Express if you have any experience with Node
1
u/new_motivation Jul 31 '20
If this is your first website project, let me tell you; it works like a charm ! Keep it up . I did sign up because it was easy and quick, no validation or stuff like that , also I was kinda of curious. I did the whole thing on mobile and it was fine.
1
u/IgnisDa Jul 31 '20
Thank you very much.
Though people say I should get rid of sign up process altogether. I agree, but this is my first time making a website, I had no idea about UI.
1
u/allmachine Jul 31 '20
The site looks pretty slick, I like it. I took the test and scored very high in neuroticism, which is strange. I answered all the relevant questions negatively, as in I do not tend to get stressed or nervous:
I had test ID 231 if that helps. Maybe the wording of the questions made me answer oppositely?
You become anxious often and easily. You are unhappy a lot and prone to negative emotions. You might even have experienced mental conditions like severe anxiety or depression sometime. You sometimes panic while handling difficult situations. While being high or low in others doesn't really mean all that much, scientists have found that being high in neuroticism generally means a difficult life. However, no personality is quite concrete and one can slide to being low in neuroticism anytime (and vice-versa).
Among the users that have attempted this test, you are above 68.254% people in neuroticism!
1
u/IgnisDa Jul 31 '20
The descriptions are based on percentiles. So among all the users of this webiste, you are higher on the neuroticism scale.
I wish I could make the descriptions on the basis of something more accurate, but the dataset I have is simply not large enough. Really sorry.
1
u/Uniqlo335 Aug 06 '20
This was really cool, great job mate! The personality quiz was interesting too.
I don't get why people are moaning so much about having to create an account, it took me 3 seconds, and no email was required.
1
u/IgnisDa Aug 06 '20
People always find a reason to complain, doesn't really bother me. Glad that YOU liked it, thanks for the compliment.
1
u/MeetThanki_ Jul 30 '20
If you gonna work on it than its no big deal you can solve it else you can just remove.
1
Jul 30 '20
From what I see you did a good job. There’s always more to learn, especially when you get into webstuffs.
1
1
0
Jul 30 '20
[deleted]
1
1
Jul 30 '20
This is about where I am, but I know that it’s a thing I have to learn. I definitely don’t like it though. LOL
0
Jul 30 '20
[deleted]
1
u/IgnisDa Jul 30 '20
Well I'd go with the tests that you took earlier. They have much larger datasets to work with. Moreover, I'm not even a personality researcher, I just read up a lot on this topic that's all.
Thanks for your compliment though!
0
Jul 31 '20
[deleted]
1
u/IgnisDa Jul 31 '20
I meant writing documentation sucks. Django docs are the best, albeit a little unattractive.
2
Jul 30 '20
[removed] — view removed comment
2
u/IgnisDa Jul 30 '20
I understand. I'm just starting out here, didn't really plan a lot on the USER EXPERIENCE. Will have to keep it in mind for my next project.
1
94
u/I_Am_Robotic Jul 30 '20
Congratulations! Clicked on link. Looks nice but why do you require a login? I don’t like sharing my info until after I know if a site will be valuable to me.