#web-development
2 messages ยท Page 133 of 1
yes
rest_framework.auth I think
rest_framework.authtoken right?
if so the token doesnt get changed by diff requests
yeah got that
yes, that one
good
how come?
but i dont know why my sqlite is not working
isn't that the whole point of token authentication?
that there are multiple, and they keep changing?
I was following this tut: https://www.youtube.com/watch?v=PFcnQbOfbUU&t=309s&ab_channel=TheDumbfounds
In this django rest api authentication tutorial, you will learn how to use TokenAuthentication and SessionAuthentication and when each approach is appropriate.
7 Tips For Getting Better At Django:
https://mailchi.mp/dea592ab3f6d/tips-for-getting-better-at-django
Here you can find more information about REST API authentication:
http://www.djang...
There was a time when I learnt html and css and used to make websites
its kinda one to one relationship between authtoken model Token with User model
any error?
U know why I don't do web development, cuz it's not in demand
no??
so I shoudn't be using token auth?
whenever you working with frontend frameworks like react YES
Within 3-4 years, backend demand wilp also end
bro what you spamming????
That's why I am looking up towards Android development and software development
well not really website need to look good
ok ok
That others give
oh ok
Mm
it's just funny, because if someone gets access to the one and only token, they will be able to access all data at all times
@placid plume talking unrelated things is not cool
I didn't talk unrelated
I talked about web developmmet
And it's fall
I didn't go off topic
somehow you right but maybe rest framework uses something for token protection
That are rarely used
Everyone uses softwares now
no i use web apps a lot
I didn't say that it's completely shut down. It has less demand compared to others
It's the case with u
And many maybe
But u have to agree with the fact that web decelopment is kinda dying
U have to agree
chromebook users like: ah are we in many
Lol
Do u agree?
no i dont agree app dev is actually dying
we are starting to use less apps and and more websites
Dude wut u saying, it's in demand in every company
U r going the opposite way
well google will deny
Apps are used more than web
Why don't u get it
U can ask anyone
Whatever ur defence be, web development is in less demand nowadays
well i use spotify web and discord web than apps
not really
Majority use softwares
that will change over time
so better to learn web dev nowadays
Web is actually good for those who have low end stuff and don't wanna install many things like me
@nimble epoch just to get one thing straight, token auth works in a way, that there is a token for each user, or each request?
I am trying to say that the salary of other developers is more than web devs
in auth for each user
with what?
so I'd have to create a token for each new user and store it on their device?
Read the above chat
yeah and all these chromebooks windows 10X is pointing to a web app dominant world where almost everyone can afford computers
Token models in rest framwork will handle that
I'm kinda busy, don't know what you're talking about. Also I'm a beginner in web dev
Bro I don't wanna argue or anything but u can ask form like anyone who has some knowledge about this stuff
but as I said before, I only see one token at all times
Backend development is in demand but it will end by max 8-9 years
Cuz there is a lot of competition in web development
And there is kinda less competition in other development stuff
Come on
if that's what the converstation is about, I kind of disagree
Get me?
Read the whole chat
I mean to say that web development is in less demand than others
maybe front end, because there will be more and more websites like wix and there will be like automatic design builders
then others what?
Others means software , ai , ml, data scientist and app
These devs
U salary will be very high
by others like mobile applications or something?
thats nowhere near true
it's not, it's your opinion
yeah of course you right
@nimble epoch so I just tried using the website and making some requests, and the token is still one and the same
Only backend is still alive
Front end is already dead
Backend will last for max 8-9 years
Or maybe 10
yeah and most reactjs developers move to react native like myself for mobile apps
where did you get this info from?
have you looked at job markets recently...
I didn't get its logical
so you're just speaking out your ass
yeah, that's a little hyperbolized
Web dev is ez nowadays
wix, wordpress, they do not replace fullstack development
ok i think you are blending things together
And like anyone who doesn't even know about web development can make websotes
go on a job market, search react developer, go research a lil bit before you start mumbling nonsense
Yeah I do know that backend is alive
maybe, I have no idea what I'm doing, I was just following a tutorial:D
no, fullstack, frontend included
backend is more dead than frontend
Bro u can ask to anyone
and maybe you mean something else
Like anyone
this just shows you know 0 about web development
are you sure its about auth token? right?
I don't need to ask anyone, I KNOW THE JOB MARKETS, and you do not
yes
you are mumbling out your ass
I used to be a web dev
I'm in the admin endpoint, and there is only one token
But now I learn others
You literally just said you have 0 experience
funnily enough, there are more react jobs than machine learning jobs.
stop lying
django admin and one Token model?
Can you check out the tutorial I followed to see what I mean if you don't mind?
I didn't say web develipment is completely ded and of no use
yeah
Honestly do some research before you start talking
of course that true
BACKEND IS STILL ALIVE SO DONT ARGUE WITH ME ABOUT THAT
ok ok clam down
React is frontend
that defeats your point completely
lol
Does not defeat
yes it does, if you've never done javascript
This guy has done 0 research, thinks react is a backend framework, then gets proved that there are more frontend jobs for 1 (ONE) framework than the WHOLE of machine learning
XDDD
and says it's dead ๐
Lol qait
ok whats the point exactly?
Nah do some research next time
No one will message for a min pls maybe
Wordpress/wix is not even competition
LEMME SAYY BROOOO
Do some research before you say it then
U didn't even listen wut I am saying
LEMME SAY
I am here after enough research
Imagine owners seeing this chat
Lmao
But lemme say
Can I say?
May I?
you see, @placid plume , maybe wix and wordpress are getting more and more popular, even because they don't require any code skills, but you can't build a website like wordpress and wix with something like wix and wordpress
@shy willow https://www.django-rest-framework.org/api-guide/authentication/#tokenauthentication maybe this help
Django, API, REST, Authentication
Popularity might decrease bro
I didn't say about rect or anything
@placid plume you wanna say we wont need front end anymore?
I have that on right now, I think I should do more research about token authentication in general:D
Web development mostly consist of javascript, css and html
good ๐
Then comes the parts of javascript like react
front end development mostly consist of javascript, css and html
Front end is kinda very difficult to get high salary in
falssssse
That is what I wanted to say sorry
Front end*
Backend is still alive
I didn't say anything about backend
Respect++
To backend
But why don't get it
Front end is dying
who says that?
Anyone can make a good looking website with wix or wordpress
U dont even need coding skills
So u get me?
Do u?
man, you really gotta be careful spreading info like that, especially without doing research. There are lots of people like me who are dreaming of becoming something particular, like front end web devs when they're grown up, and then there are people who come along and just spread false info and destroy peoples dreams and hopes. Lots of youtubers do this
Consider this @shy willow
oh you wanna say why use coding while you can just move stuff around in a simple way?
A website built with wordpress/wix has much simpler functionalities and is much different from a website built with react/vue/code in general
Y r u not getitng it
Oo man
I earlier said that front end is usually made with css html and js
Just some time ago
React vue is other stuff
i got a bad headache
Answer this question: if you have a billion dollar idea website, will you create it with a web builder like wordpress or a code framework?
Go and sleep
true
@placid plume well if you need to add some crazy functionality and maybe use some apis then wix or squarespace wont do
exactly
One back qs- do u have a billion dollar idea?
no
U lost the qs there
that's not my point
if you wanted to build any website. dunno why I mentioned billion dollar idea
@placid plume stop this or we will call mods
Most of the ppl take templates or use wix and wordpress and then do backedn
For what?
I am spitting out staright facts
But u r not getting it
U r losing in this kinda arguement
So u calling mods
yeah @placid plume , just do some research first or don't use such absolute hyperbolizations
yeah if wanna look pro then you dont use wix and there is a big limitation factor in wix and squarespace
well no i can make my stand
mods can do nothing about it you gotta call fbi
No one wants to look pro
As I said, there are more REACT jobs (One SINGULAR framework) than jobs for ML. It is nowhere near dead.
Your idea that Wordpress / Wix is making web-dev die is nowhere near the truth, because the jobs requiring fullstack skills cannot be made with Wordpress / Wix.
Wordpress / Wix is meant for individuals and small business owners, like you and me.
this made me laugh, thanks
Eg- look at Google and microsoft websites
๐ ๐
I am talking about css html and js
@placid plume you are getting toxic that is why we are gonna call mods
You said web-dev...
Whne did I abuse
you mean vanilla js?
bro he said wix and ....
Google / Microsoft certainly aren't using wordpress or wix
we all agree
that would be hilarious
you all true
They have a simple idea and not something extraordinary feature in there website
Many of u r getting stuck in this kinda arguement
I know
They have very complex architecture, it's not a simple "idea" ๐คฆโโ๏ธ
oh so you are saying you can make a search engine using wix and wordpress
But u don't wanna lose
Dude I didn't say that
and amazing web apps and google meets stuff
That is backend
Don't argue with me about backend
That is still alive
That all are backend
Also you said that web-dev is low paid, well again I'll go on my job listing within my country (UK), and there are 1000+ jobs that pay $100,000 for frontend
In any company u can search the salary of front end devs vs salary of other devs
Search it then! I have.
I too have
How about you look at real job listings at this current time
well stop this convo right now
In ur country , other devs have more slaary
That gives you a definitive answer
In every country it's the matter
not if you are living in future
But u don't get it and that not my fault
I guess so, and in the US the salaries are absolutely crazy
I am talking about future
creativeness and artistic things have its value
Front end is dying
There's no need to be condescending, the point you made is simply untrue.
Lemme say about creativity, u can get a website from wix or something. Then just make some changes with coding skills
look guys it's so "dead" ๐ ๐
And it's simple
react is frontend
But I am not talking about it
you thought it was backend 5 mins ago ๐
alright i figured it out you are trying to promote wix
apart from the crazy predictions you're making, it's very hard to make predictions about the future about especially technology. tech is constantly evolving, and you can't really predict what turn it will take
I am talking about html css and js
I didn't
React is considered web dev
I said front end is dying
I know
Is it? Is React dying?
No
Others are dying
react and react native are topping
@placid plume I have a feeling you are misunderstanding what react is
Oo man
Itss so hard to get u the point
angular: assasinate this guy
So you are talking about vanilla js?
Talk about html css and js
wdym by html, css, js
You're talking about web-dev... I just showed you 1 framework which disproves your whole point
react is front end lol
Most basic stuff
This has to be the most pointless argument ever
Haha ๐ I agree
I am talking about HTML CSS AND JS
so you are saying about html and css
@placid plume how many years of coding do you have?
well html + css = junk
It's funny though, ngl
They make up to 50% of front end
and no one even gets a ob with that
+1
not necessarily, it's still used in react
Yall know that Those a fundamental bases right?
react is just a framework built on JS
That is what I am saying, no one gets a job with html css and js
yeah but standalone they are nothing
i mean you can
But u r talking about react and stuff
ah, okay, in that case you're right
this argument is mind mindbogglingly dumb
in what words would you describe react?
U too r
well then what is dying if it wasn't even popular enough
You backtracked from saying "web-dev is dying" to now saying you can't find a job with "html/css/js"
I don't wanna describe react
No one understands what you mean by html, css, js
even though you can because you react is mostly just a super set of raw html and js
^^^
I said front end is kinda less demanded nowadays
Thats just false lol
@placid plume shut up lol aren't you tired. no one even agrees with you
I just showed you frontend jobs for react > whole of ML
doting
yeah
Ik
react is baby levels easy if you know the 3 fundamental systems it uses lol
what are you relying on? do you have experience in front end?
react is actually at its core html css and js
I do hav3
how long?
3years
of making calculator right??
U can targue about experience as u said u r beginner
Nope
Of making big projects
With html css and js
Not react and vur
I think what you mean by html, css and js is vanilla js, just plain js. And in that case you would kind of be right. That's why people use js frameworks instead of just plain js
Vue
U finally get ut
It
big projects are not possible with html css and js as big projects get hosted
you need a hosting service too lol
Like those cool stuff
but even plain js is not dead, it's just not as popular as js frameworks
U r going back to react
It will die
After several years
I wouldn't take your word for gospel after you thought web dev is dying...
still you need to learn it for the frameworks
okay, maybe you're right, but still, it's hard to make such longterm predictions.
Idc if u don't take
U can kinda research about future job demands
well if you dont care then shut up
but yeah, that's true, you still have to learn it
But I hope at least you now know, that it is indeed, not dying (and I have seen django jobs increase in the recent months too)
okay this just escalated to a joke
Lol
Less demand? Compared to what?
it always been so what is your whole point
Compared to backedand software ai ml data science etc
I bet you listened to all of the ML / AI hype and think it's massive
My point is HTML CSS AND JS IS IN LESS DEMAND
I do
And everyone does
Have you ever written your own ML model? You'll find it's not what it's put out to be ๐
I am not onto that topic now
well you dont wanna do fronend then go on we are not stopping you. but pls stop this argument for god's sake
Also frontend thwarts backend
I have not reached ml
Anyday
I used to do
I am telling with ma experinece
then again, you are wrong
yeah
Others agreed that it's right
it never been god code or something
you are wrong too
If u dont, I don't care
@placid plume Please visit a job site (indeed.com), make some searches, filter by salary and then please come back ๐
then stop this
I am not that right not so wrong as well
I don't wanna
That says a lot about your argument then ey
That's with only with that websote
then shut up
Not others
Cool, visit others then
bro you still here arguing????
because js is still updating. if it were deprecated a long time ago, it may have been useless and extremely easy to learn by now
Don't get angry
ok imma call mod
Ok call
I didnt said anything bad or go off rules
I am spitting out facts
U r not agreeing
do you wanna ask about these things in general?
No you're not
U r getting toxic
maybe someone answer you there
And getting jealous of my point
Oml can we all just stop with this
That is why u r calling mods
this is just another level of stupidity and pointless arguements
Ok
Ok
No one cares
๐
of course
you lose bye bye
I have agreed with ur point that front end is not dead at all
I don't lose
they're entitled to their own opinion whether or not that opinion is correct or not doesnt matter
you might wanna look into #code-of-conduct
U dont have words
just stop feeding them
U r getting toxic
I am not
I am spitting out facts
In the end its not gonna effect any of you lot if that's their opinion is it, they're gonna be the ones loosing if that's their opinion
this is just going around in circles
well facts are that in future creativity will be high demand than logic
You need JS, HTML and CSS to make ANY functioning website,
yes
EVERY front end developer job will require you to have those 3 down
And that frontend outweights ML / backend / datascience
where did I get this info?
visit a job site (indeed.com) search each term and compare the job listings as a gauge of popularity and a measure of "is this field dying"
they are not optional specs
HTML CSS AND JS IS IN LESS DEMAND (U HAVR TO AGREE) AND REACT AND ITHER STUFF IS IN DEMAND(I AGREED)
wait no you can use django and get rid of js
They're the same thing -_-
^ Literally dude
Never
In fiture
Al least
Go onto a job site, see for your self
I don't wanna
Why not?
U can go and see
Don't want to be disproved?
oh you are saying in future react becomes a whole new thing
I have lmfao
I am darn right
Please stop feeding the troll 
U guys win and also lose
I too does the same
yeah everyone give this guy silent treatment
Yall are entitled to your own opinion, just leave it at that
No one has agreed with you, and you don't want to visit a jobsite to disprove yourself lmfao, says a lot about your arguement. that's me done anyway, this guy's a good troll lmfao
Hi, what's going on in here?
we dont wanna say cus you are stupid and biazed
Lol come on, u win and also lose, I also win and lose with some of the points
Maybe u too r
can we silence this for like 5 minutes to chill out, its basically a argument that doesnt make any sense and is so pointless
no we are not
Cuz u don't wanna agree
we are considering mroe things than you are
@muted stump Give him the silent treatment, he's obviously ~12yo and just trolling
Idc if u don't wanna agree
yeah
That statement doesn't make any sense. Using React requires knowledge of HTML, JS and CSS.
Now let's stop this fruitless discussion and move on.
thx fix error
@manic frost can you also warn that guy cus he reached the point where he gets warned long time ago
my god just let it go
especially if he was in general chat
he left? thanks god
sooo uhh, where were we? websockets? ๐
Infractions of other members are left to the moderators. We also have notes (hidden infractions).
Now let's really just move on.
i guess so
it would be a pain to scroll up
anyway decimal is float in sql right??
tis a floating point number yes
or maybe i should ask a question proper for this channel
well can i use a custom data stuff without ORM
Sure, you don't have to use an ORM
sqlite is good for testing and small stuff
Yep.
well then postgres i guess
If you're just learning, you can just go with sqlite.
generally i develop and test with sqlite first then move to postgres i prod
no im learning and making my project at the same time
I mean if sqlite is still plenty powerful for that sorta stuff
And then talk
!warn @placid plume I told you to stop this argument. Was I not clear?
:incoming_envelope: :ok_hand: applied warning to @placid plume.
I wen off
Man some people do not learn
Ok
yeah warn didn't even shook him
Remember this
anyway
like in anime: not even a scratch??
Honestly, SQLite should be good enough.
well this project is supposed to be big
If you're using an ORM there's no difference between postgres and sqlite apart from some postgres-specific fields, right?
@manic frost I am not arguing . They r becoming toxic and kinda approaching this matter like and arguement
we only moved off sqlite when shit started hitting like 1 million rows
its an alternative for patreon
Just a fyi you're gonna have a really hard time with payment and security type stuff with that, take it from someone who's made one ๐คฃ
U just warned me for no reason
or atleast in order to make the platform multi user
yeah i saw that coming
@placid plume If you want to appeal an infraction or complain about a moderator, contact @hexed spoke.
K
@muted stump When SQLite becomes the bottleneck for your service, you probably have bigger problems.
might aswell
what's the difference between sqlite and postgres which can give issues?
is there any need for me to use postgres
well sqlite is single file
SQLite locks the database on each write IIRC
and that^
and, well, that ^ so it's not partitionable
i means its quite slow as shit gets bigger
it also lacks the security aspect of being able to lock files
i mean if you're storing ANY payment info in your DB you're probably unsafe
Hey it says that it's not for the concers about mods or any stuff
so, locking the database means you can't concurrently write stuff to it? not too sure on what that does
SQlite cant no
i mean its still quite
in the sense it can insert a million rows in less than a second
ah so it's sort of a "queue" if you will to write to the database, and with postgres it's a bit more concurrent
but its mostly select statments as it gets bigger that start to take a toll
so it should not store any payment info
Well i certainly wouldnt risk the legal issues
i guess i have to dump my project
wait no
i dont need to store em
and maybe instead of going through the money stuff i will make a digital currency like robux
but then they need to buy it first to donate to their fav creators
so i guess i have to dump the project
its pretty nice in plan but pretty hard when developing
i should try get someone else to help me out in this
why am i getting a white thing around my website
padding / border?
ah i dont think i got that
set padding and margin to 0
nope
how you to add body * margin and padding to 0? did you?
.navbar {
background-color: #333333;
padding: 0px;
margin: 0px;
}
.mainbody {
background-color: #666666;
height: 1000px;
padding: 0px;
margin: 0px;
}```
see
yeaa
maybe change width
you using bootstrap too?
nope
i think theres something extra or wrong in your code maybe
html or css of course
{% load static %}
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="{% static 'main.css' %}">
<title>{{ title }}</title>
</head>
<body>
<nav class="navbar">
<h2>{{ title}}</h2>
<a class="navlink" href="/">Home</a>
<a class="navlink" href="/profile/">Profile</a>
</nav>
<div class="mainbody">
{% block content %}
{% endblock %}
</div>
</body>
</html>```
.navbar {
background-color: #333333;
padding: 0px;
margin: 0px;
}
.navlink {
color: #737373;
background-color: #4d4d4d;
border-radius: 4px;
padding: 4px;
margin-right: 3px;
text-decoration: none;
}
.navlink:hover {
color: #737373;
background-color: #8c8c8c;
border-radius: 4px;
padding: 4px;
margin-right: 3px;
text-decoration: none;
}
.navlink:active {
color: #737373;
background-color: #808080;
border-radius: 4px;
padding: 4px;
margin-right: 3px;
text-decoration: none;
}
.mainbody {
background-color: #666666;
height: 1000px;
padding: 0px;
margin: 0px;
}```
nope
oh
maybe its a problem with edge
try margin
ok
low key dev tools r ur friend
@muted stump You should look into CSS grid, it often makes creating a layout easier.
well it changed it a bit
oh how?
body * {
padding: 0px;
margin: 0px;
}
yeah body just body {} not body * {}
oh yeah it fixed it
oh good
do
html, body {
}
``` to set your defaults normally. dont know if it matters, but thats what i always do
so i think you should delete one of them
well did
oh good
I was testing out the django tutorial and is there any way I can upload the whole virtual env folder to a hosting site like www.pythonanywhere.com ?
now this happened
im running a full developement server on aws, but you can upload to a lot of places
i think you should add it like body, body * {}worked?
u think?
i need to just add padding on top to mainbody
you mean a space is needed between navbar and main body?
dont set your height in css... its bad programming... if you want it to fill the screen, set it with js. but dont set it in css
well i put padding top on mainbody class as 1px and it fixed it
true
you can all just set the whole body to that color so it looks like its filled. but for someone on a different resolution then you, itll create a scrollbar for no reason
i dont use js
you should probably learn some, thats most of frontend programming.
@muted stump but i suggest you to use bootstrap thats eazy too
@native tide again, I'm not sure why you're getting this error - what are you trying to do?
That's just from sending too many requests too quickly
learn frontend before you learn backend. unless you only plan on only doing backend. then by all means dont worry about js.
the WGSI server shits its pants
bootstrap and i have a bad relationship
same case with js
Anywayas Infini, why do you not accept requests?
because I don't need the extra hassle, that's all
I am no hassle
bro i was exatcly like you with js but i finally found out that i finally gotta learn it
You'll never get a DM from me. I can just see if you're online
when I did, I got carpet-bombed all day long by people who Just Wanted To Ask One Question
it's nothing persona, it's just a defensive habit I've acquired because people routinely abuse the privilege.
That sucks
(and then get annoyed when I don't immediately respond to their question, etc.)
anyway, I haven't done anything too agressive with the refernce WSGI server
Help is free.
Don't be entitled
So infini, how did you learn Bottle?
I find the docs to be awful
picked it up on my own, wrote my own apps with it
and about bootstrap if you want a better responsive page and better design you should be familier bootstrap cause after a while youll understand that css is breaking your page
I'm eyeing other things in the future, though, as they have no story for ASGI or async in general
most docs are awful ive found. try setting up wsgi in apache. i still dont have it right because theres to many different version and to many different set ups and none of them really explain whats going on
and bootstrap is basically css right??
well i cant seem to find a bootstrap i like too
yes bootstrap is prebuilt css/html essentially
i think there something called w3.css or something like that if im right
its like bootstrap i think
is it made by w3schools??
i think
w3schools is one of my fav websites of all time
good
but i dont know why someone gotta prefer w3.css while theres a bootstrap outhere
i dont like using prebuilt honestly, html and css arent difficult
without them setting up layout are so difficult using css
copy your discord name and tag by clicking on it multiple time
not really if you got the time
i've made a flask application and want to host it on my IP, what do i do?
atm its localhost only
that exactly the point TTIIMMEE
but finding a style in bootstrap takes TTIIMMEE
with css you are basically unlocking freedom of going crazy with the design
really i think you are not familier with it
yeah im not
better check it
its not hard
if it takes your time once the css takes more than that FOREVER
you know repeating that long code over and over
for diff things
who is john doe and jane doe
idk lol
its being used as dummy data a lot
also john smith is another dummy data character
look into hosting providers, you can use google cloud, heroku, AWS or a VPS (just some ideas for you)
where you find these guys from?
youtube tuts
oh
but, cant i host it on my PC temporarily
you want it to be local?
no he want it to be accessible to everyone
oh
but host it on his computer
i think its hard
@sand glen i think Rabbit can help you
you should use web servers like gunicorn
gunicorn??
i only want this so i can "stress test" my website
like
give people access and make them do their worst
find vulnerabilities/issues before i deploy long term
i watched a clip and it was hard to setup on your own system and it took time
doesnt tests do it?
theres only so much i can test
and itll take time people test it
whats wrong with it?
what is gunicorn
green unicorn lol
what about apache web server
i just use it thats special
never used it but probably good too
oh i thought it was a "unicorn"
it is based on unicorn if im right
If you want to stress test your site, (in terms of how many users can be on concurrently), I have heard you can use something like "Pupetteer" but I haven't had the chance to use it myself.
oh
i know what that is
but i was thinking stresstesting as in testing logins etc
and more
Sounds like you'd want a testcase, testing different regex patterns within your forms and whatnot.
It's not paid man
so you should delete the message
yeah and?
you're not allowed to post unapproved advertising
just dont advertise alright
Honestly, learning bootstrap and its abstractions (on which I gave up) was way harder than just learning how to use CSS Grid from scratch.
I always feel like a chump because I can do grids with bootstrap only and not raw css ๐
i dont use grid, i plan out my my widths and build containers for everything and use flex. not incredibly hard
i like using tailwind for everything coz its basically all i need to get everything setup and do backend
Honestly i love backend alot more than fronted reeeee
tailwind is a very nice framework
Not sure if its a framework
anyone know how to setup a flask app with cpanel, i've tried a bunch of stuff but i'm getting only 503 service unavailable
when i try running through the console the app just straight up doesn't launch
Hi everyone, i am using bcrypt to encript my users password and and i got an error of encoding before hashing so i encoded to utf8 and i got the following error
AttributeError: 'bytes' object has no attribute 'encode'
can you please tell me what im doing wrong?
You are getting bytes and not string
From wherever you are getting your input
im trying to compare encrypted passwords with the ones on my db
so i need to decode first? or just try to convert the hashed password to string?
Decode so you will get string
Ok, thx
It worked thx a lot
with user agent?
device model of a connecting client?
or the machine thats running flask
@cerulean vapor yo
I rebooted my mac mini and I setup my pyenv again
and Bottle is fast
Anyone here that can tell me what server I should use for my Bottle app?
Hey I have a question. If I use ".send_keys('Blablabla')" is there a way it types slower then normal? Because when I do it the normal way it types very fast the thing I want to write. In this case "Blablabla"
using selenium btw.
@native tide by "server" do you mean the actual hosting stack for making something publicly available?
Nginx and Apache are the two most common choices
I have honestly never heard Caddy mentioned
the hosting I use is entirely Apache so I have no choice in the matter, in my case
ouch
so it's going to revolve largely around the hosting options and what they support
@native tide how about a for loop with a time.sleep for every character u want to send
yes, I'm outgrowing them for this project, I may have to set up something more ambitious, but for now it's cheap and it works
Oh yea!
Thanks!
@cerulean vapor why not write a WSGI -> FCGI adapter if possible
FCGI is nothing I want to touch
:v)
hello, any recommended library to show graphs on flask based website?
@cunning mortar
Simple, clean and engaging HTML5 based JavaScript charts. Chart.js is an easy way to include animated, interactive graphs on your website for free.
thx!
No prob bob
any help
sure i can pull them up
2021-02-14 12:57:29.853932 [WARN] [64583] [p...:15800744] cannot determine application type at /home/[redacted]/walterclements/, disable it.
is the only relevant thing i can find
everything else is just "file not found " for things unrelated
I know this isnt really python but google didnt have anything. but its kind of webish? what type of record would us1.falixnodes.net:55903 be
I am trying to set it up on dnsafraid
because A record doesnt work
Sup everyone
I'm new to domain and hosting. I've got some programmiing skills. Anyway, I bought a host on namecheap.com, and I own hosting on digitalocean.com. First, where do I store an index.html on my host, and then how do I point my namecheap.com domain to load up my host?
DIgitalocean's docs should have information about how to set up a domain name to point at their DNS servers
and each host has different ways to set up a website with a domain
I'm having a problem with getting post requests from patreon, I'm using a webhook to get these post requests
When I tested with other webhook testers, it returned a status code of 200 as expected, but with patreon's test, it returns a 400
from flask import Flask, request, Response
app = Flask(__name__)
@app.route('/webhook', methods=['POST'])
def respond():
return Response(status=200)
That's my code
oh, I found the problem
ok so im doing something similar to this, using django/rest how do i return all the data linked to the table.
basic example:
class Group(models.Model):
name = models.CharField(max_length=100)
class Student(models.Model):
name = models.CharField(max_length=100)
group = models.ForeignKey(Group)
if i run a lookup on group, how do i respond with
{
[
name:'group1'
students: ['stud1', 'stud2']
]
[
name: 'group2',
students: ['stud3', 'stud4']
]
}
``` or something similar?
change the related_name field
make a GroupSerializer
that contains a StudentSerializer
then GroupSerializer(instance=queryset, many=True).data
basically
yes, i got that, but how is it set in the serializer fields? thats what im struggling with. i know the relationship exists, but dont know how to make it a response
uh
class StudentSerializer(serializers.ModelSerializer):
class Meta:
model = Student
fields = ['name']
class GroupSerializer(serializers.ModelSerializer):
students = StudentSerializer(many=True)
class Meta:
model = Group
fields = ['name', 'students']
remember to change related_name
that worked perfectly, thank you so much... been racking my brain. little over my head in the terms of backend coding
yw
i knew the forward relation, but not how to do it in reverse.
django/rest has weird ways to do things with poor documentation that doesnt explain much
ye
it's hard to write good documentation
and honestly I'm not a fan of the codebase
stack traces are hard af to read
although I suppose that comes with the level of abstraction
on the good side though
lots of stuff comes out of the box
which is the best place to host flask app for free , with database support
aws isnt super expensive and a lot of freebies included. really depends on what you want honestly
yea, i feel that to the core as well
heroku is full free and supports postgresql
very beginner level stuffs , just want to try and use the technology
heroku works too. most free services limit you though. cant also just set up a server/dev server on your own pc and not need a host
wdym XD
what is it you want to achieve
information about client as model: iphone
@ripe matrix that data is in the User-Agent request header that your clients send to your server with every their request
inside of your function in flask you can access that value with:
request.headers['User-Agent']
and here is how to "process" that value and find out what device is being used
I need a sanity check, Does the REST api have any way to update a website without the user requesting the update?
I've been searching online but I don't think I'm wording my query right
basically
you want
the server to push data to the user
without the user first sending a request?
i'm already using websockets for that
So I know my way around this
It's just I read something online and now I'm confused
And I don't want to write something incorrect in my report
REST is request-response cycle right?
strictly speaking, no
and there haven't been any updates whatsoever?
that's HTTP
Oh yeahhhh
REST does not need to be over HTTP
cause REST is a guideline?
Hello guys, I'm going to write a web application using a react frontend, and postgres / postgis database. We are unsure whether we should use a geodjango backend, or an express.js backend. We might consider other backends, if using something else is smarter. The application will display large amounts of data, similar to solutions like this: https://www.globalforestwatch.org/map/
The reason for geodjango:
Good implementation of geospatial functions
Easy to write in python
The reasons for express.js / turf.js:
Potentially faster
Potentially more lightweight
Anyone have experience using these frameworks to give me some advises and help me to choose?
HI
I AM NEW
CAN I learn something
about python web development
where to start
how to do
etc..
where to learn about this
Hey
I installed sqlalchemy but when I run the app.py file it says no module found
I also imported everything required
Start by learning HTML, CSS and then go for flask microframework of python
Hey, I'm currently working on a personal project (I don't think I'll be able to make it being a "real" thing, but let's hope), during my studies I used a lot Python, and a bit of Flask, PHP & Symfony.. I'm wondering if it is "worth it" to learn Django and make the backend with it instead of Flask, or some PHP alternatives like Symfony
I guess you should try django
how would i check if an object already exists in the db in django
It has some nice examples
oh um so like i ran pip freeze > requirements.txt hoping it to install all the dependencies listed in there, but instead, it deletesd my requirements.txt file, why is that?
ight thx
Hi, can someone tell me why my code is going over the border and isnt listing vertically? Ill post a picture in a second
I suggest using <ul> <li>.....</li><li>......</li></ul>
Ill give it a shot now. Thanks!
np
Does this mean they have debug mode enabled?
As shouldnt a regular person not see this shit?
how can i have multiple forms in one view
trying to implement a search button to query the user db, then another form to update those changes to the user profile
im currently getting a jinja exception, template not found (even though template exists) and i suspect this is happening because of a validation error
i used tabs and provide two forms in the context
which probably has to do with how i set up my code
i can post the html too
if i do this
# if which_user_form.submit2.data and which_user_form.validate_on_submit():
i get a jinja2.exceptions.TemplateNotFound: admin_update_single_user.xhtml
sorry, no input on this one
app
----cli
----__int__.py
--- test.py
----db
---__init__.py
---models.py
Anyone has idea why would i get an input error for db module when trying to run python cli/test.py
Your test is probably importing db module
yeah but i need it
Time to debug then
Has anyone used Mongo alchemy in fast api before?
Hey guys I'm currently using Flask and my templates are now unable to get static files from the static folder.
I am now trying to build an url endpoint for static files so my html files can reference the static files like this
<link type="text/css" rel="stylesheet" href="/static/css/bootstrap-theme-3.1.1.min.css" />
so I built the view function like this
@app.route('/static/css/<path:filename>')
def static_files_css(filename):
return send_from_directory('static', filename=filename)
but unfortunately, it doesn't work, how can I fix it?
i also found out that flask has a default /static url path, but when i visit it, it says its not found
here
Heh
hello
@glossy arrow
Hey
Yeah
Lmao
Literally so many ads that when you open it on a iPad the iPad bursts into flames