#web-development

2 messages · Page 152 of 1

jagged sphinx
#

Hi,
I was asked by a person to make an e - commerce website
This is the first time I am making a website for someone else, any advice for me

native tide
#

hii

#

i am testing my views with postman. I am not able to retrieve the data i send in a post request

#

glitch

vestal hound
#

AWS Elastic Beanstalk

#

Google App Engine

spark swan
#

Yes I have used them before. They are very powerful together. I recommend u use DRF for the Django APIs

shy bane
#

yoo bro i've a doubt

#

how can i become a backend developer after learning python

#

what do i have to do next i've compleated full begineer course

dusk portal
#

@shy bane just first learn flask as it is good for begginers in that u will learn about databases and little php learn that and u should know little html and css so do all these stuff and after all this go to Django and learn that + keeping practicing and making projects day by day u will become pro in it

dusk portal
hoary brook
#

Hello, I'm trying to create sign in functionality for my Django website, but even if I enter valid information, I get an error. How can I fix this?

dusk portal
#

can i know error?

hoary brook
#

I'm not getting an actual error, but an error message is created from my for loop instead of redirecting me when the information is valid

#

The information is valid, but Django keeps telling me that the information doesn't match.

#

Maybe I'm using the wrong input fields?

dusk portal
#

listen 1 idea

hoary brook
#

I'm using the default AuthenticationForm though...

dusk portal
#

rename this in ur templates folder bro so if it shows temp not found so it means prblm was in html

#

do that

hoary brook
#

That's not the error I am getting though.

#

The views all work, it's that it doesn't recognize that the passed info is valid

#

Even though the form is valid, it prints the errors instead of logging me in correctly.

patent cobalt
#

The form will throw this error if the authenticate call failed for some reason

#

Specifically, here:


        if username is not None and password:
            self.user_cache = authenticate(self.request, username=username, password=password)
            if self.user_cache is None:
                raise self.get_invalid_login_error()
            else:
                self.confirm_login_allowed(self.user_cache)
hoary brook
#

I'm very new to Django and following a tutorial by Corey Schafer, the only notable difference I have is that I split up the form instead of plotting it all at once (so I can style it)

#

So I'm quite lost as to how I can prevent this..

#

ah... now it worked... It seems I need to show the view like this

inland copper
#

yes

loud bridge
#

hey i am using beautiful soup to parse some data

#

but there are too many div tags used

#

so i checked the div and class of the specific data and got None

#

then i checked the parent div

#

which has triple dots at many places

#

i want the info inside it

loud bridge
sharp marten
#

wlr#9602: wlr#9602`: wlr#9602: ``wlr#9602: ``Stehack_#7605: !code`````

#

wlr#9602: wlr#9602`: wlr#9602: ``wlr#9602: ``Stehack_#7605: !code`````

hoary brook
#

How can I get a value from one model and show it on another model in Django?
My User's Profile model has a boolean value of user_verified, and I want to display this on my Product model.
(My final goal is to show on a product whether the author is verified or not using a badge icon)

#

If someone can help me, feel free to @ so I don't miss it :)

inland oak
#

I just want to say, that I like this image

#

it is magical

inland oak
#

urgh, those damn static files

#

why can't they be shown in Gunicorn correctly%?
I already even collected them to one folder

#

I don't want raising nginx for this, it still sort of development

wooden ruin
#

gunicorn + whitenoise is a quick and easy combo for simple apps

inland oak
#

I'll be sure to remember a better way though

#

better to write into issues

wooden ruin
#

yup

wooden ruin
inland oak
#

I guess it is less dumb way than writing

# url(r'^static/(?P<path>.*)$', django.views.static.serve,
    #     {'document_root': settings.STATIC_ROOT}),
#

I feel like it is almost the same though

#

oh, it has caching and etc

#

all right, perhaps it is not the same

terse vapor
#

is there a route for this?

hoary brook
#

@wooden ruin I can't get it to work, this is my current situation:

wooden ruin
#

Why don't you link author to profile instead of user?

hoary brook
#

I'm following a tutorial which linked it to User (to display the name). I also can't seem to import Profile unless I use apps.get_model

sage estuary
#

prob better to ask here

wooden ruin
sage estuary
#

if i wanted to try web development should i learn django or flask

#

i have no idea

#

what they are

#

i just searched it up on youtube and all the tutorials have one of them

wooden ruin
sage estuary
#

html and?

hoary brook
#

No circular dependencies, these are my only imports in both models.py files:

from django.contrib.auth.models import User```
sage estuary
#

or just html

wooden ruin
sage estuary
#

hmmm

#

this is

#

where idont try making a website

wooden ruin
hoary brook
#

What does that do?

#

I didn't create a custom User model, I'm using the default one and just adding a Profile model to it

wooden ruin
#

it can expose your chosen model to get_user_model()

#

also, you should use Profile in the Product foreign key because you can get a User from their profile, letting you access both properties

wooden ruin
#

from there you can start learning frameworks, but its important to get the basics first

#

and i suggest starting with flask once you're ready :)

hoary brook
#

Do I just set AUTH_USER_MODEL = 'User' if I'm using the default user model?

#

Ah wait, I should probably expose users.profile?

wooden ruin
#

no need to specify an AUTH_USER_MODEL if you're just using the one provided django. if you are extending from a class, such as:
class User(get_user_model()):
you would want that one to be your default user model

#

and unless you want User and Profile to stay separated, i strongly suggest just extending from the class

#

also keep inmind, your profile model inherits from User, yet sets a foreign key to User

hoary brook
#

I want my user to have a variable amount of credits and a verified bool, that's all I need.
So should I create e.g. CustomUser and inherit from User?

wooden ruin
#

if all you want to do is just add a few properties then you should probably extend from the User class.

hoary brook
#

Maybe I should start with a simpler framework and go back to Django when I have a better understanding of the general way things work

dawn heath
terse vapor
#

do you mind share it?

#

u didnt add the user = User(...)

#

then commit and save to db

#
@app.route('/register',methods=['GET','POST'])
def register():
    form = Registration()
    if form.validate_on_submit():
        user = User(Firstname=Form.firstname.data...)
        db.session.add(user)
        db.session.commit()
        return redirect(url_for('home'))
    return render_template('register.html', title='Register', form=form)```
#

I believe this will solve the problem

hardy cosmos
#

Hi all, I’m trying to use requests to extract an image from a GET request but I’m not sure how to get the image url, as the request content only returns html data and not the image which is sent separately according to my developer console. The website is https://codegena.com/generator/background-image-generator/ I’d appreciate any help 🙂

trim pike
terse vapor
#

...

terse vapor
opaque rivet
# hoary brook Do I just set `AUTH_USER_MODEL = 'User'` if I'm using the default user model?

AUTH_USER_MODEL by django default is already User. Having a one-to-one field is fine, and you will be able to access any User objects via that field - what seems to be the issue?

Also, "extending" the user model means that you will have one model with all of the User's fields and methods, instead of having a seperate model having a relationship to the User model. It's pretty simple to setup:
https://docs.djangoproject.com/en/3.2/topics/auth/customizing/#django.contrib.auth.models.AbstractUser

opal dune
glossy arrow
#

Hey guys, does react-admin have a data provider for the Django REST framework?

native tide
#

can somebody help m

#

e

wooden ruin
native tide
#

so im making a youtube view bot

#

as my first project

#

and the problem is that the tabs dont close

#

so eventually my pc will crash because of 1000000 tabs

violet briar
#

I am looking for a good feature-rich JS IDE, should I use JetBrains webstorm or should I use VSCode (with extensions)

native tide
#

@wooden ruin

violet briar
native tide
#

ok

#

does anybody help here

violet briar
opaque rivet
#

you won't be missing out on any "features"

violet briar
#

thank you

opaque rivet
#

pycharm pro comes with pre-builds for react etc.

wooden ruin
wooden ruin
opaque rivet
#

you can get all jetbrains products for free with a student email acc, if you don't have one you can buy it for $2

native tide
#

uh this is my script

#

import webbrowser, time
url = input("Enter url: ")
duration = input("Enter duration: ")
for i in range(5):
webbrowser.open_new(url)
time.sleep(int(duration))

#

@wooden ruin

wooden ruin
#

use something like pyautogui or pykeyboard to close the tab manually. webbrowser doesn't have a method to close the tab yet.

native tide
#

?

#

what

#

im new sorry

#

how do i do that

wooden ruin
#

basically, you can't close the tab using the webbrowser module which you are using.

#

you will need to manually close thme

#

u can do this by hand or by code

native tide
#

uh i just want the bot to afk

#

unless i use autoclicker to use them

#

close them*

#

il see how that goes

wooden ruin
#

you want to make this as automated as possible, there's a library called pyautogui which you can use to close the window

native tide
#

how do i do that

#

do i just add import pyautogui at the start

wooden ruin
#

kind of

#

pyautogui is a module

native tide
#

how do i install pyautogui

wooden ruin
#

which you import

#

pip install pyautogui

#

read the documentation of how it works here

native tide
#

do i need to restart my pycharm

#

where do i install pyautogui, cmd?

wooden ruin
#

cmd is a terminal

native tide
#

it says i already have it

#

but in pycharm i dont

#

oh i have it

#

sheeeeeeeeesh

violet briar
#

small question, as I learn JS, HTML and CSS, should I also build some small (no GUI) python side projects on the way or should I focus fully on JS, HTML and CSS?

wooden ruin
#

yea thats the module for you @native tide , go to the website i sent and go thru how it works

native tide
#

ohk

#

bruh have u read this

wooden ruin
native tide
#

i dont know the coordinates of my mouse lmao

wooden ruin
#

you don't need to right

#

its at the top right

#

the x is the highest and most to the right thing on ur screen

#

right

violet briar
native tide
#

but it opens a tab

#

not a browser

#

oh i can just do it witha closed browser

#

and it will keep opening browsers and closing them

#

but my pc is too slow to open the tab fast and it wont go on the site

wooden ruin
#

i suggest starting with Flask

wooden ruin
native tide
#

i will

#

dont worry

#

everything is possible

wooden ruin
#

thats 100% correct

#

in fact

#

you can deploy your program to a cloud service

#

so you can really afk get views

native tide
#

im too stubborn to not get what i want

#

a cloud servicec?

wooden ruin
#

basically running your code on someone else's pc

#

cool right

native tide
#

yeaa

#

but i dont have a 2nd pc

wooden ruin
#

u dont have to

native tide
#

can i do it random peoples pc

#

wtf

wooden ruin
#

there are companies that can do this for you

native tide
#

first i need to create the code 🙂

wooden ruin
#

yup

native tide
#

that site is useless

#

i dont even know whats happening when i read it

wooden ruin
#

its literally the official documentation of the module

#

it's not useless, you just have to understand what's going on

native tide
#

I crashed my pc !!

#

I'm talking on my phone

wooden ruin
#

oh gosh

#

can u send the code

#

probably an infinite loop that crashed it

native tide
#

Yea it was

wooden ruin
#

how many times did u loop

native tide
#

Uh

wooden ruin
#

or expect to

native tide
#

Forever

wooden ruin
#

how much apart were the intervals

native tide
#

The what

wooden ruin
#

like how often did it open the browser

native tide
#

I'm screwed

native tide
wooden ruin
#

right so you should probably wait like 10 seconds before doing the next one lol

naive summit
#

Rip ram

native tide
#

Should I turn off my pc

#

It might blow up

wooden ruin
#

that pc's ram is gone

#

u have to restart ur pc lol

native tide
#

Omg

#

U just scared me

wooden ruin
#

lmao

#

the reason why its so slow is because you literally ran out of ram

native tide
#

It's not even starting !!

naive summit
#

Yea

native tide
#

Restarting

wooden ruin
#

so the pc started taking ram from ur storage

#

which is ridiculously slow

native tide
#

I have 1 tb

#

Of ram

wooden ruin
#

no

native tide
#

Omg!!!!

naive summit
#

Rom?

wooden ruin
#

u have 1 tb of storage

naive summit
#

Yea

native tide
#

And no pc

wooden ruin
#

ram is not storage

#

lmao

native tide
#

No it literally wont turn off

wooden ruin
#

just turn it off and let the pc cool down

native tide
#

Dont do coding kids

naive summit
#

Close your browser

native tide
#

Bruh

naive summit
#

Try

wooden ruin
native tide
#

Bruh this is a 10 year old pc

wooden ruin
#

hit the power off

naive summit
#

Or try torefresh

native tide
#

I have no graphics card basically

#

I. Spamming turn off with my foot

wooden ruin
#

just unplug that pc

native tide
#

No

#

That will Fry it

wooden ruin
#

it wont

#

ill do it right now

#

chill

native tide
#

It literally fried my ram

#

Last time

wooden ruin
#

it didn't

native tide
#

It did

wooden ruin
#

right now your pc is getting worse

#

its still opening tabs

native tide
#

It's already bad

#

I'm so screwed

wooden ruin
#

your pc is not damaged

native tide
#

It wont even turn off

#

Omggg

wooden ruin
#

do u not get that

#

its just really slow because all the RAM is used

native tide
#

But its gonna slow down

#

Even more

wooden ruin
#

you need to do a hard shut of

#

hold the power for 10 seconds

native tide
#

Dw

#

No

#

That's what I did last time

#

And it didnt work

#

So I took one of the ram sticks out

#

And it works

naive summit
#

Unplug your pc

wooden ruin
#

just unplug the pc

naive summit
#

Yea

wooden ruin
#

nothing bad is gonna happen

native tide
#

No

#

No

naive summit
#

Well rip pc

native tide
#

Ok

#

Pinky finger

wooden ruin
#

if you refuse to listen then your pc will never get better

native tide
#

You pay for new pc

wooden ruin
#

yes

native tide
#

If this breaks it

wooden ruin
#

ill buy u a 3090

naive summit
#

Lol

native tide
#

Ok I did it

wooden ruin
#

good

native tide
#

Let's pray

#

Why can I hear electricity

naive summit
#

Plug it again

wooden ruin
#

plug it in again and restart

native tide
#

It worked !!!

#

Woo

#

I have a computer

naive summit
#

Don't forget to refresh it

native tide
#

What

naive summit
#

Refresh

native tide
#

I'm not even turning it on

#

I need to go to sleep

wooden ruin
#

ok

naive summit
#

Ok

native tide
#

I just wanted 1m views overnight

#

And I have 1m dead brain cells now

wooden ruin
#

🤨

native tide
#

Can I dm you

#

So you dont forget about me

#

And I know who to text

digital mango
#

yo wait could i also get some help for web development?

#
h1 {
  font-size: 60px;
}

section h1 {
  font-size: 40px;
}

figure-1 {
  width:50px;
  height:50px
}
#

so the first chunk of code is my index.html

#

the second one is the style.css

#

im having trouble setting the size for the first one

#

with css

#

could someone help me out?

violet briar
#

I can't find javascript/typescript bundled plugins in pycharm, can anyone help?

digital mango
#

yea its the one above this @formal geode

formal geode
#

ok

#

so your sizing the HTML with the CSS?

digital mango
#

yea sry im kinda new to this

#

yea

#

someone told me that ur supposed to do that?

formal geode
#

well, is it the whole <html> or a <div>

#

and I do see an error in the CSS

digital mango
#

no im trying to get the picture to change size with css

formal geode
#

ok

digital mango
formal geode
#

figure-1 {
width:50px;
height:50px
}

#

there is no ; in height:50px

#

it should be heigth50px;

digital mango
#

so height:50;

formal geode
#

*height:50; yeah

digital mango
#

k let me try that

formal geode
#

k

digital mango
#

yea na it didn't change

formal geode
#

ok,

digital mango
#

its a figure within a section

formal geode
#

well, lets see, HTML or HTML5

digital mango
#

HTML5 i think

#

bc isn't that the new defalt?

formal geode
#

yeah

#

I dont think figure is in HTML5, I have never seen that in common CSS

#

Try styling the image or whatever with an inside style, aka style="/* whatever*/" inside the tags

digital mango
#

alr

formal geode
#

incase its not supported in HTML5

digital mango
#

and how do i determine the position?

#

of the image?

formal geode
#

you can use <center> tags and css padding-top: 0px;, that's how I usually do it.

#

or any padding css command

digital mango
#

yea but wut if i want to line the photos up side by side?

#

wait do i just determine it with

#

top:0x;

#

right:0x;

formal geode
#

no

#

padding-top: 0px;

#

and

#

padding-right: 0px;

digital mango
#

k

#

is ther a left and bottom?

formal geode
#

yes

digital mango
#

k thx man

formal geode
#

any way you need it, its there

digital mango
#

thx man

#

god bless

formal geode
#

also there is a padding: 0px; for all sides

#

your welcome, anytime

formal geode
#

@digital mango WAIT

#

another way to fix your problem is doing

#

.figure-1 {
width:50px;
height:50px
}

#

insted of

#

*instead

#

figure-1 {
width:50px;
height:50px
}

#

But I hope you got it figured out

digital mango
formal geode
#

your welcome

violet briar
#

this is my first time with js and I am really confused, I edit the js code in pycharm, but what next, how do I run it?

#

I can't find "open in browser" option

#

and no, I don't use HTML/CSS, I am just learning the basics of JS first

vale shuttle
#

Hey guys, I'm new to development but I know enough to piece together stuff. I've been playing with writing my own REST api with flask, and was wondering: Is there some good resource or guide explaining the basic "best practise" way to set up a fully functional website, which details kind of a basic structure? Like, is it all just separate containers running nginx and flask (or nodejs or whatever), and how would you structure the back end of a basic web site/service from scratch?

inland oak
vale shuttle
#

no, more in terms of, let's say I want to build my whole back end from scratch. Set up a server, write the API endpoints, run webservers, etc.. Is there somewhere you learn how to build that environment in the most up to date way?

#

basic security no-no's, what kind of services that might be separated into different containers so if one goes down not everything breaks etc

#

or is it just service providers all have their own infrastructure, or builds one custom for a client?

inland oak
#

Um, you are looking to read several books at least:

I know, there is book for django that cover most of your needs. Set up server, write api end points, run web servers, basic secirity and etc

You are also mentioned microservice architecture, it is separated book to read about this

If one goes down, not everything breaks. You are looking for a devops stuff now, like kubernet

vale shuttle
#

Ok I'll see what I can find. I know about kubernetes though i've never set it up.

inland oak
#

Three separated topics basically

#

I would recommend conncentrating on first topic

#

Reading books about django from beginner to professional level

vale shuttle
#

basically, I got into python to write a discord bot for my csgo surf server, so it would fetch server records and user info from the sql server. I wanted to serve them to my website and then I got into flask. Wrote a separate API so that the bot and my website could fetch the data. But I just know I'm not structuring things the "right" way, and want to learn more.

#

if i wanted to scale it up, have a login page and maybe some web apps, I would have to consider a basic setup before clustering with kubernetes

inland oak
#

Do you have already existing mysql database

#

Which you have access for

#

Already filled with data and working in some service

vale shuttle
#

yeah I have a VPS running ubuntu, with a stack with apache mariadb and all that jazz for the main site and flask serving the sql data

#

that not really the point, I just want I flowchart of sorts i guess. some pointers into structuring a full back end for something that could run many different web apps

#

maybe not the right place to ask

inland oak
#

May be, you are looking for docker compose

#

It helps packing with easy into multiple containers

#

Makes your whole infrastructure, as one small script to build everything

vale shuttle
#

no i mean the architecture, never mind what i use for clustering or load balancing

#

just, what is the common setup when running a basic back end serving both html and webservices and api endpoints

#

i think i need to think about this and word it better

inland oak
#

Sounds like good book about chosen framework

#

They cover stuff like that

vale shuttle
#

who cover?

inland oak
#

Authors of framework books explain common good setups for the chosen framework

vale shuttle
#

oh right, like in general

#

i'll see what i can find, thanks 🙂

vestal hound
#

in isolation

#

usually you get that kind of knowledge/experience

#

from working somewhere

#

but feel free to ask specific questions

#

I'll answer whatever I can

vale shuttle
#

yeah suspected that. I've worked in IT but never with development and certainly not infra on that level

#

i dunno, I just found this guide to flask environment that was kind of illuminating, it breaks down the basics of how in a flask framework you have to set up all the parts yourselves whereas in django you have kind of a basic setup to work with, database and all..

vestal hound
#

yeah

#

all that is on the app level though

vale shuttle
#

i guess I just cant shake the feeling that some where some one drew a box diagram with a basic structure of all the different containers and then I could figure out how to construct my own site in a way where i wouldn't over look a huge security flaw or a stupid solution 😛

inland oak
vale shuttle
#

😄

inland oak
#

Plus books are great, explaining common bad solutions for django

vale shuttle
#

and that's probably what i SHOULD be spending my time with but i'm just curious i guess

#

i like the idea of building everything from scratch

#

it gives me so much insight when i need to troubleshoot IRL

inland oak
#

It is great for first experience

#

You appreciate more, framework with everything inbuilt

#

After that

#

I started with flask/quart microframeworks and only after that jumped to rails from the box django

#

Flask gives more freedom. That what should be learned first I guess

#

To try different solutions on your own

#

Before jumping to think in box solutions

vale shuttle
# vestal hound I'll answer whatever I can

Thanks man. A broad qeastion: everyone seem to talk about running nginx and flask or or other stuff instead of the old apache/php, stuff. Is it normal to serve everything from small light weight webservers in containers in loadbalanced clusters etc? Would a huge website like twitter or fb use just a huge farm of containers running nginx or something like that?

spiral loom
#

Badly need help haha

wooden ruin
# spiral loom

How much experience fo you have with html, css and JS?

dusk portal
native tide
#

Can someone help me I just added a user model and this happend

#

models.py ```from django.db import models
from .utils import get_manga_info
from django.contrib.auth.models import AbstractUser

class User(AbstractUser):
pass

class UserReader(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)

# def __str__(self):
#     return self.user.username

class MangaTracker(models.Model):
url = models.URLField(unique=True)
title = models.SlugField(max_length=255, blank=True)
img = models.URLField(max_length=255, blank=True)
description = models.TextField(blank=True)
latest_chapter = models.FloatField(blank=True)
latest_chapter_link = models.URLField(blank=True)
latest_upload = models.SlugField(max_length=255, blank=True)
latest_views = models.IntegerField(blank=True)
reader = models.ForeignKey(UserReader, on_delete=models.CASCADE)

def __str__(self):
    return self.title

def save(self, *args, **kwargs):
    title, description, img, latest_chapter, latest_chapter_link, latest_upload, latest_views = get_manga_info(self.url)
    self.title = title
    self.description = description
    self.img = img
    self.latest_chapter = latest_chapter
    self.latest_chapter_link = latest_chapter_link
    self.latest_views = latest_views
    self.latest_upload = latest_upload
    self.latest_views = latest_views
    super().save(*args, **kwargs)
native tide
# native tide

i feel like the problem here is how I made migrations and migrated

native tide
wispy quail
quasi relic
#

hey guys , need help with flask ... so my problem is when I link css with html and then if I use in my template url_for(‘static’ , filename=‘style.css’) for some reason it doesnt work , any suggestion?

nimble dawn
#

i am making a login page

#

i want to store the data entered by the user

#

like it should come to me

#

how can i do that

vestal hound
#

that's actually

#

a few things that are related but distinct

#

so

#

first, horizontal scalability is important

#

second, full VMs are often too heavyweight

#

that leads to stateless, and therefore fungible, containers that can be easily replicated

#

which is why you see container orchestrators (most common example: k8s)

#

and, yes, load balancing plays into that

#

Flask vs PHP is more a choice of backend technology

#

same for nginx and Apache with regard to server choice

#

though they can be combined

#

that said, the trend nowadays is towards IaaS/PaaS

#

where all these things are managed for you

quasi relic
inland oak
#

apperently datetime.datetime is not serializable

#

found funny solution to work around

#
    def serialize(date):
        return repr(date).replace('datetime.datetime(', '').replace(')', '')

    def deserialize(json_value):
        return datetime.datetime(
            *[int(item) for item in json_value.split(",")])
#

literally one string solutions ;b

quasi relic
#

what are you creating?

#

dark

inland oak
#

mm, Django REST API to work with user database

after user login I create token? to which repeated access can be used
the token I generate from Dictionary with several values (ID to database, user email, and few other parameters) and encode with SHA256

#

I wished to have also datetime.datetime stored in token

quick cargo
#

You can just use Orjson or Ujson for this

#

Which supports this serialization

inland oak
#

huh.

#

looks good

#

I would have to encode/decode to SHA256 with few additional strings then

#

but I guess it should be better may be

#

PyJWT jsonified and encoded for me

quasi relic
#

sounds good 👌 so is it necessary to encode email and username as well?

#

isnt enough with password?

inland oak
#

mm... only password is encoded in order to be stored into database

#

this encoding I use to generate tokens, which are just temporal things for cookies I guess

#

email is encoded into token there as additional layer to verify token after decoding

unreal knot
#

Can you install a package to a live server while its running?

#

pip installing something to the venv

inland oak
#

sure

#

deployment is fully in my hands

#

VPS

unreal knot
#

but the only way to intall a package is to activate the venv ( which I'm assuming is already running ) wouldn't that interupt it?

inland oak
#

to be honest, I don't understand, why would you wish to install package during runing server

#

what's the point?

quasi relic
#

dark have you been using flask or started with django?

inland oak
#

you will not be able to run tests

unreal knot
#

because I am adding a contact form page

inland oak
unreal knot
#

and i dont want to bring the sevrer down

inland oak
#

can you run a copy of server?

#

just test it there

unreal knot
#

ive done it locally

#

it works

#

just need to upload the files to the production server but never have done it with a file that needs a package the server doesnt have

quasi relic
inland oak
quasi relic
inland oak
#

my answer: not enough information to answer

#

usually sessions exist in some form or another anyway
but I have no idea what you are doing there, so not sure if you need

quasi relic
#

I know this is not the Q. channel but it happened a lot that noone answered me so I tried to ask you

inland oak
#

if you want your user being travelling between pages with memorized login state

#

you should use sessions

#

if all your users are guests and authentication is not needed or any other information about user between pages switching, you can skip sessions

quasi relic
inland oak
#

in 98% cases, yes

#

but sometimes websites secretly autologin users to temporal user accounts

#

in this case it would be still needed

quasi relic
#

okay thank you 😎

inland oak
#

all right, all is left to find encoding decoding algorithm which works in both ways

#

HS256

vestal hound
inland oak
#
serialized = repr(date).replace('datetime.datetime(', '').replace(')', '')
deserialized = datetime.datetime(*[int(item) for item in serialized.split(",")])
#

I currently do in this way)

inland oak
# vestal hound WTF
>>> a = datetime.datetime.utcnow()
>>> print(a)
2021-04-30 10:45:00.660008
>>> b = a.isoformat()
>>> c = dateutil.parser.isoparse(b)
>>> print(c)
2021-04-30 10:45:00.660008
>>> 
#

thanks, it works

vestal hound
inland oak
#

huh, even better

vestal hound
#

but it’s okay we’ve all been there

inland oak
#

giggles

#

agree

#

thanks for pointing to the right way

glad patrol
#

ca someone tell me how to hide label text after 2 seconds in asp.net webforms

spiral loom
pearl magnet
#

difference between react and vue? I've been looking into both recently

native tide
#

how

verbal tiger
#

Hi guys, I have a Rails app where I use devise as authentication solution, I would like to create a simple python Flask API and authenticate the API with the preexisting user table, what would be the approach, any advise?

serene prawn
verbal tiger
serene prawn
#

Well, i'm not familiar with it 🙂

verbal tiger
serene prawn
#

I mean how can i possibly help you if you're using some ruby specific library 😉

violet briar
#

do y'all think it's better to use node.js for back end or is it better to use python?
or should I use both?

inland oak
serene prawn
violet briar
serene prawn
inland oak
#

React ;b

serene prawn
#

js is not node.js

inland oak
#

hmm, really? I thought it uses node

violet briar
#

well, flask can handle requests asynchronously, right?

#

if not, I'll have to use node.js

serene prawn
inland oak
#

better to choose some Async framework

#

Sanic or something
Closest analog to Flask is Quart

violet briar
serene prawn
#

It can handle concurrent requests but it doesn't use asyncio

violet briar
#

so I won't have to make my program asynchronous? flask will handle it for me? good

serene prawn
#

I would recommend fastapi over flask though

violet briar
#

is it as easy as flask?

serene prawn
#

It's similar

violet briar
#

I want something that has similar syntax and structure to vanilla python, not something that has its own syntax like django

inland oak
serene prawn
inland oak
#

urgh. I like rails

serene prawn
#

You still have to choose and orm if you want to use one 🤔

inland oak
#

I'll prefer to override rails to suit me ;b

serene prawn
#

I'm not familiar with rails

inland oak
#

I mean

#

Django has everything out of the box

#

like you are already train on rails

serene prawn
#

I know but it's awful for api's

violet briar
#

wait, what's the difference between web applications and backend applications?

#

a simple google search says node.js is better for web applications, where python is better for backend applications

inland oak
#

huh

violet briar
#

first result snippet

serene prawn
#

js isn't node 😅

inland oak
#

Looking at their tables

serene prawn
#

What's this

inland oak
#

tbh, no idea

serene prawn
#

There's like just unrelated columns really

inland oak
#

yeah

inland oak
#

we have different ones

#

due to different advertisement settings

violet briar
inland oak
#

for our google account/ip address

violet briar
#

just use an adblocker and VPN xd

inland oak
#

I guess I am not familiar enough with Node.js

#

to say anything

#

I only worked closely with python

serene prawn
#

What you would use with node for api though?

violet briar
#

I don't know, I am still learning it

inland oak
#

the biggest thing I did there, I was forced quickly to find how to deploy React app to production ;b

nimble dawn
#

What is react used for?

serene prawn
inland oak
nimble dawn
#

Ok

inland oak
#

with all backend logic moved to Python APIs for example

#

React only fetches results

nimble dawn
#

Currently is react needed

#

To learn

serene prawn
nimble dawn
#

Ok

#

I will just focus on css and Python for now

verbal tiger
violet briar
#

so ye, I like both python and node, but I am still wondering if it's a good idea to use both in back end

serene prawn
verbal tiger
serene prawn
#

And what you want to return really?

#

Plus why would you handle it in separate app?

#

When you have rails app

verbal tiger
# serene prawn And what you want to return really?

The return would be user's company information like sales orders status, items and debts, very simple; I would like to have separate because I already have an internal flask API to make some data analysis (in this case I dont use authentication because it is only accessible internally)

serene prawn
#

I think you can use sqlalchemy as an orm and fetch data you need from your tables 🤔

boreal elk
#

hy can u gimme a whole code for webpage

versed python
merry olive
#

Hello, I was in #help-corn and they said my question should fit more over here, if anyone can help me 😮

native tide
#

hey, is it possible to make a wtforms custom validator that can receive 2 arguments?

rich warren
#

Hey guys I'm building a webapp with flask and I want to do kind of like a catalogue but my FE skills are terrible... any recommendations of what kind of css framework to use to hide that fact???

quick cargo
#

Tailwindcss makes it pretty easy

#

very nice framework to use

#

or Bootstrap templates

rich warren
#

Thanks, I'm not planning to use nodejs in my project so I guess I'll have to go for the classic bootstrap

quick cargo
#

you dont actually need nodejs for tailwind

#

you can just use the CDN link

rich warren
quick cargo
#

unless you really want to customise it, its fine

#

but yes

#

you will get better build sizes using the CLI

loud depot
#

hi it's a general question i'm using javascript (even though its a python discord but any help will be appreciated.

#

So this is a very simple login form

#

I'm using php to submit the form data and it takes the user to the new page

#

    let e_user = "<?php echo $_GET["username"] ?>";
    let e_pass = "<?php echo $_GET["password"] ?>";

</script>```
#

This is what i'm using to get the data in JS varaibles.

#

It is basically a login to an admin portal.

thorn igloo
#

but isn't tailwind like css rules but classes tho? wouldn't you be building components from scratch with it?

loud depot
#

It will have only 1 password and 1 username. I want it to check if the entered password matches the password i want to set for it. What is a safe way to do it ?

#

I can just use conditionals to check for-example if e_user == "admin101" and e_pass == "somepassword" but that will be in the source file.

thorn igloo
#

remember to always store the passwords as hashes for security reasons

loud depot
#

I don't know how to use node.js in web development , i just use simple js or php. Is there a place to learn it ?

rich warren
#

@thorn igloo yes, tailwind seems to look for classes in the markup to add some styles but some of them uses javascript that's why the nodejs 😦

loud depot
#

I mean, to connect to mysql ill need the mysql.js right

thorn igloo
#

php is a backend language no? I think you can connect a database to it. it's not a nodejs specific thing

loud depot
#

hmm i'll check

rich warren
#

*any *language can connect to a DB tho

loud depot
#

didn't know php could do that

#

thanks

quasi relic
#

can anyone tell me how to clear a sqlalchemy database from tables?

#

looking for an answer but nowhere can find

terse vapor
#

Is it ok to set dashboard as home page for clinic web?

raven apex
#

can someone tell me why my website doesn't open when i send it to other people

#

but works when i open it

#

ping if reply

thorn igloo
calm plume
#

Using Python, what's the easiest way to implement website search that searches through HTML and markdown files?

thorn igloo
thorn igloo
calm plume
calm plume
thorn igloo
calm plume
#

Thank you!

terse vapor
raven apex
raven apex
calm plume
raven apex
#

python

#

i used flask

calm plume
#

And that's the url in the search bar when you're on the website?

raven apex
#

wdym?

terse vapor
#

show us ur url

#

like the url u get access with

raven apex
#

it was something like this http

terse vapor
#

no wonder why

#

thats ur local machine

raven apex
#

o

terse vapor
#

so u can only access with ur computer

raven apex
#

right

#

so i needa make it public?

terse vapor
#

u can use pythonanywhere or google cloud

#

or something

raven apex
#

i'm trying to run this on python only

pure gull
#

guys, is python excellent for back-end web dev (with intent of linking that backend to android or ios apps), or is it better I consider .net or java or nodejs or the like? I'm new to all these languages anyways ;p

raven apex
#

idk i'm new to this

terse vapor
raven apex
terse vapor
#

u register an account and put ur code into it

raven apex
#

do u have to pay?

#

thanks for ur help

violet briar
#

do y'all think I should learn node.js or js first? I don't know much about HTML/CSS and I am not interested in them for now, but I won't using JS for server-side stuff that much either

#

are the concepts I learn in node.js all usable to js (excluding server-side concepts of course)?

summer echo
#

Honestly, is js better than python for web development?

quick cargo
#

well it depends, use what ever language you prefer on the backend

#

on the frontend you cant use Python (no brython is not a option) so you kinda gotta go with JS or TS

native tide
#

Hi does some ond usd pythonanyehere

#

I want to test my scriot from python on there

#

To see how it works

wary trench
#

guys i got a question. Does anyone know if i can "wait" for a respose (certain text or popup) in python selenium?

#

like if i want to signup in a website and i have multiple emails and i want to try them one after another

wooden ruin
# violet briar do y'all think I should learn node.js or js first? I don't know much about HTML/...

node.js is awesome and has frameworks for both front-end and back-end. (vuejs > react btw). however, it's best that you have a solid understanding of HTML, CSS, and basic JS before moving on to node.js. once you have a solid understanding, i'd say the choice is up to you whether to start learning front end or backend. if you want to use python, use it in the backend (brython sucks). there are tons of node backend frameworks such as express, fastify, nestjs, nextjs, and nuxtjs

crisp oyster
#

hello can someone help me real quick. I have to code on a local server with some python. (make a game with python and show it on a webpage) how can I do that? I have already made a server but I don't know how I could show the code. Do I have to make a html file and use a script node to implement the code?

terse vapor
vestal hound
#

historically, JS only ran in the browser.

#

so, more or less, yes.

grave star
#

can webscaping questions go here? specifically why can't I find an element by xpath in selenium when I'm looking right at it? lol

vestal hound
#

or the element hasn't loaded yet

#

well, those are the two most common causes

rustic pebble
#

Is there a way I can redistribute pods once a new node has been added? I have a node pool of lets say X nodes, and I have made a custom scaler that adds/removes nodes based on certain conditions, but I would also like the pods to be rearranged when a new node is added

grave star
#

yeah. I thought the element hasn't loaded might be the cause, because that is what happened to me before, but I navigated to the page through the terminal, so I can see it has loaded before using

floodZone = driver.find_element_by_xpath("//*[@id='fz']")
vestal hound
#

can you see the element in the actual Selenium driver window?

grave star
#

yeah

vestal hound
#

can you find it

#

in that window

#

using xpath?

grave star
#

yes

vestal hound
#

huh.

#

🥴

#

so

#

you can find it from the window

#

but not programmatically?

grave star
#

yeah

#

lol

vestal hound
#

well

#

compare

#

hm.

#

check the page source

#

make sure it reflects what you see

grave star
#

ok, right click inspect shows it, which is where I normally steal the xpath. but view page source shows much less.

ornate field
#

"view source" shows you what the server sent. "Inspector" shows you what it looks like "now" (i.e. after client-side Javascript has modified it)

grave star
#

That's what I thought, which is why I need to use Selenium vice BeautifulSoup, based on my rudimentary understanding of the two lol

#

The website I'm looking at is

https://www.mymanatee.org/departments/building___development_services/floodplain_management/floodzone/flood_zone_information_tool ```
#

and you can use the generic address they give you, 1112 Manatee Ave W, to search. I'm trying to get the flood zone information.

vestal hound
#

if you're accessing it through the driver

#

it should show the rendered HTML

ornate field
#

You might have better luck calling the API that feeds that page: https://www.mymanatee.org/gisbads/rest/services/flood/flood/MapServer/0/query?f=json&where=((PRIMARY_ADDRESS LIKE UPPER ('1112%25') OR PRIMARY_ADDRESS LIKE UPPER ('%251112ND%25'))%20AND%20PRIMARY_ADDRESS%20LIKE%20UPPER(%27%25MANATEE%20AVE%20W%25%27))&outfields=PARCEL_ID%2C%20PRIMARY_ADDRESS%2CPROP_CITYNAME%2C%20HASHID&returnGeometry=false&returnTrueCurves=false&returnIdsOnly=false&returnCountOnly=false&returnZ=false&returnM=false&returnDistinctValues=false&returnExtentsOnly=false&orderByFields=PRIMARY_ADDRESS

#

To find that, open Developer Tools, click on "Network" then do your search. You'll see that request in the list.

vestal hound
#

^

#

if you can find how the page actually gets the data

#

that is often easier

grave star
#

ok, I see the information I want, I just need to figure out how to get it.

ornate field
#

awesome - have fun!

grave star
#

lol thanks. Any reason why Selenium can't access this?

ornate field
#

I don't know enough Selenium to answer that

#

If you want HTML instead of JSON, you can (apparently) change "f=json" to "f=html" in that query string and get an HTML form. Submit the form and the response has the same data, but in HTML.

#

Maybe that would be a more comfortable starting point?

grave star
#

Maybe. API's is something I haven't tried to interact with yet. I do have the Arc API reference up, and can start playing with that. We'll see if I end up in jail or not lol.

ornate field
#

With all the references they have published, I think they're happy to have you use it, but yeah - check to see if they have rules and follow those 🙂

#

good luck!

grave star
#

Thanks again.

grave star
#

So I went back a bit in the elements and found:

<iframe src="https://gis-publicportal.s3-us-gov-west-1.amazonaws.com/floodzone.html" width="100%" height="1600px" title="Resident Information Tool address lookup" frameborder="0"></iframe>

I followed that URL and was able to interact with it with Selenium and pull the data I needed.

ornate field
#

Sweet!

native tide
#

Is front-end dev in python as powerful as other techs like html+css+js or frameworks like ReactJS?

vestal hound
#

that's kind of a weird question because

#

React is still JS

#

and

#

well

#

there are two ways to use Python in the frontend, basically

#

one is Brython (transpiles to JS)

#

I can't remember the name of the other one but it's a Python interpreter running in JS, basically

#

both are p immature

inland oak
#

what about using Jinja stuff with Ajax/JQuery stuff?

#

will it be a reasonable equivalent?

fathom prism
#

anyone familiar with gunicorn and memory management? I'm curious why when when a gunicorn with sync workers w/ gthreads respond to requests, they make threads that don't seem to ever get recycled until another request comes in.

is this the intended effect? I'd imagine the threads would just die immediately after they're used to free memory.

inland oak
#

also, heavy applications can be reaallly long time initialized, it can be also intended in order to cut down this time as well

fathom prism
#

that is interesting @inland oak . That does sound like it makes some sense. I had a server with 9 workers and 25 threads on a 4core/16gb ram machine and it was chewed up quick

#

i ended up just forcing processes to reset after "x" amount of requests

inland oak
#

it is possible to regular this value in Quart at least, with a little bit diving into their code and rewriting

native tide
inland oak
fathom prism
#

yea gunicorn allows a user to change the workers as well

#

they recommended 2*cpu + 1

inland oak
#

sounds reasonable

fathom prism
#

yea, the thread portion is the one i had to experiment with i suppose

inland oak
#

having them limited to the level your server can process in a queue is a good idea

fathom prism
#

so im still a bit of a noob with threads, but if I'm running "top" and a process is showing 4 threads, is that really 4 OS threads although gunicorn is using gthreads?. Or is it 4 threads where each thread is running gthread on top of it

vestal hound
#

depends on what you want to do.

fathom prism
#

@vestal hound , thanks. I obviously have to re-read my dinosaur OS book

#

:p

fathom prism
#

mostly because the concept of such as "virt" and "res" is still a bit foreign to me

#

and how that ties in with threads

#

like if I see a process with 4 threads, and each one shows 1.0% MEM usage, I'm assuming that's 1.0% of the process, or is it 1.0% x 4 within the process?

vestal hound
#

hm

fathom prism
#

since threads share memory with a process?

vestal hound
#

I actually don't know the answer to that

#

rather outside my sphere of expertise

#

but

#

I would assume that it's the former???

#

I have no idea 🥴

inland oak
#

Perhaps

#

regular thread is created within some function, completes the task and is usually finished or something

#

Flask is meant to be scaled with creating your multiple applications running at the same time

#

I assume Gunicorn makes exactly that

#

each Gunicorn thread contains independent running full copy of your application

vestal hound
#

from what I understand

#

Gunicorn uses green threads

#

like async/await so process-managed threads except it preempts them

#

but

#

each OS thread

#

can have its own green threads

inland oak
#

sounds interesting

#

If only I knew it before that

fathom prism
#

yea, that's my understanding.

gunicorn forks a process, and say we have 4 workers, thats

(main process) -> 4 child processes -> x threads

#

it also has the option for "preloading" flask into the main process

#

or if you don't preload, all 4 processes (workers) will have a copy of the app

native tide
inland oak
#

javascrypt, preferably used typescript

native tide
#

thaaanks @inland oak

lost heath
#

any1 know how i can access 'name'

native tide
#

can django run python code while the website is running, or does it run all the code at the beginning?

lost heath
thorn igloo
native tide
thorn igloo
#

yes

native tide
#

Do i need a host for making my website "online" if i made it with django?

thorn igloo
#

yes

native tide
#

anyone here who knows a bit about wtforms?

thorn igloo
native tide
thorn igloo
#

what do you mean by two inputs?

native tide
#

def validate_subreddit(self, subreddit, userid):

#

like this

thorn igloo
#

are these coming from the form or externally?

native tide
#

it only works with 1 input so: def validate_subreddit(self, subreddit):

#

both form the form

#

atleast i think so i tried to use hiddenfield for userid\

thorn igloo
#

from one form, from one input?

native tide
#

its like this:

#
class SubredditForm(FlaskForm):
    userid = HiddenField()
    subreddit = StringField('Subreddit', validators=[DataRequired()])
thorn igloo
#

ok, i have a question, what's the userid field for? given that it's hidden

native tide
#

i need to do a query and i need the userid for it

thorn igloo
#

you want to query inside a validator?

native tide
#

yeah, but i need 2 things in the query the userid and the subreddit

thorn igloo
#

the validator function

native tide
#

yeah that didnt work

#

it tries to run the validator with just subreddit then

thorn igloo
#

dont you just want the value from userid?

#

you're confusing me now

marble spade
#

I have the following div:

<div id="texts"></div>

And it outputs the following image:

#

Is there a way for me to get each of those images & texts into a seperate box?

native tide
#

userid needs to be userid.data btw

thorn igloo
#

in the chooseuser function

native tide
#

that was a mistake, but it still doesnt work, because the validator inputs this: validate_subreddit(subreddit) instead of validate_subreddit(subreddit, userid)

thorn igloo
native tide
#

okay thanks bro im gonna try that

#

will it work?

thorn igloo
#

also, how are you defining your validators? in the form or separately?

native tide
#

its in the class of the form

thorn igloo
#

ok, if it's in the class form should'nt you be able to like access all the fields in there?

native tide
#

i think it is because it isnt in a function or something

thorn igloo
#

you dont need to specify it like that if it's a class method, wait, let me show you what i'm talking about

native tide
#

okay

thorn igloo
native tide
#

thanks bro im gonna try it

#

thankss its working now

thorn igloo
#

alright

wheat skiff
#

hi, i really need help with building a chat app in django. i built already the site now i need to make the chat with socket or django channels. can some one help me with it?
im very new to django so it is very difficult for me to do this app
(i tried lots of tutorials but its hard for me to understand when i cant ask questions)

toxic echo
#

what is more used in django, function or class based views?

wheat skiff
#

class based views

toxic echo
#

thanks

opaque rivet
toxic echo
#

oh i see thanks

#

i will try both then

wheat skiff
tribal pewter
glad patrol
#

i have this page when i enter information in it then if i go back using browser and then come back to same page again all the fields are empty
how do i save them so if i close the browser of come back to page all the entered inforamtion comes auto

nimble dawn
#

For what sql is used?

hoary brook
nimble dawn
#

Ok

#

Thanks

#

So if i want to store data entered by a user i have to create a database for the website

summer shoal
#

Generally, yes, but there are lots of different options

manic frost
manic frost
# nimble dawn So if i want to store data entered by a user i have to create a database for the...

You don't have to create a database database. For example, you could have a directory with files, where each file has the user ID as its name and store some JSON data about the user. It's a database, even if a primitive one.

If you want to make a sightly more complicated database, you should check out SQLite. It's a database management system that uses a single file for storage. There's a tutorial by Corey Schafer: https://www.youtube.com/watch?v=pd-0G0MigUA

opaque rivet
wooden ruin
#

do know that channels uses redis

#

so if you want to scale, use redis

#

if you are just deploying for fun, you can stick with the in memory channel layer

silver totem
#

Ey up

calm plume
#

Imo, React is only good for SPAs. If you're a react person and want to make multi-page, use Next.

silver totem
#

I don’t like react.

#

And i do a lot of react.

wooden ruin
#

i like vue router for things like SPA's

noble spoke
#

Why dont you like it

#

Asking as a beginner who finds it enjoyable

calm plume
#

React isn't bad

noble spoke
#

I like it a lot but i dont make complicated stuff

wooden ruin
#

they are also a good learning opportunity, personally i prefer vue over react but they each have their advantages and drawbacks

calm plume
#

I hate pure React though

#

I will use Next if I have to do something React-like

wooden ruin
#

is it better to deploy your react/vue app standalone using something like express, or deploy it directly to your api?

silver totem
# noble spoke Asking as a beginner who finds it enjoyable

State management is convoluted using contexts. Global state is iffy at best. It still uses a vdom which is slower than not using it, and there’s enough evidence that it isn’t a good solution anymore. It’s also not compiled into js. It’s just transpiled thanks to Babel and still carries an overhead that isn’t necessary. But for all the shit I give react - it’s popular and well tooled. So it’s not necessarily the devils butthole, but I just think there’s better alternatives if you don’t mind the lack of ecosystem.

toxic umbra
#

Hello

calm plume
#

I kinda want to learn Vue

#

Since I've seen some Vue code, and it seems to be much more like HTML than React is.

wooden ruin
#

i like vue because each component has its own html, css, js, and vuex/vue router is straighforward

manic frost
#

well, vue has vuex, which is similarly a giant global variable

wooden ruin
#

ts support is horrible tho for vue

silver totem
#

Honestly imma sound like a shill, but try Svelte.

calm plume
#

Next ain't bad.

silver totem
#

Or elm.

manic frost
#

I tried svelte, it's nice

#

but I haven't built anything medium/large in it

calm plume
#

Honestly, React is popular, but it's not really the best

manic frost
#

svelte seems to have great TS support

calm plume
#

Really?

#

Sounds nice

silver totem
#

They encourage it afaik.

wooden ruin
#

nestjs uses ts by default right?

manic frost
#

svelte also has single-file components with scoped CSS, just like vue

calm plume
#

Imo, JS has enough frontend frameworks.

#

But it's kinda lacking in good backend ones

wooden ruin
#

nodejs has so much support its crazy

calm plume
#

JS has nothing equivalent to something as good as Django from what I've seen

silver totem
#

That’s why I love it. It’s fast, it’s got a great concept of state, great way of handling performance and most of all it doesn’t relegate stuff to virtual Dom and instead just neatly compiles down to JS

wooden ruin
#

django is a batteries included kinda framework, so if you don't need the features that django has you have the option of going for something lighter like flask

calm plume
wooden ruin
#

like the django session and authentication middleware, that fact that it's all taken care of for you, is crazy

#

@manic frost can i dm u abt smthn pls

manic frost
#

why?

silver totem
#

I remember the days long gone when I used turbogears. Anyone remember that??

calm plume
#

The amount of work put into it is phenomenal

wooden ruin
# manic frost why?

that guy who was in general talking about using tor or whatever dm'd me saying he was 12 which is against tos

manic frost
#

You should contact @hexed spoke

wooden ruin
#

ok thank you

calm plume
#

Is svelte worth learning?

manic frost
#

totally

#

It has a great interactive tutorial:
https://svelte.dev/tutorial/basics
although it gives too much attention to animations for whatever reason, so you can skip that if you want.

silver totem
#

#notashill

wooden ruin
#

wbt graphql?

#

i've also heard people say that passport sucks and all this but is it good for an authentication library?

silver totem
# wooden ruin wbt graphql?

What’s your use case for it tho? Graph Ql is great if you provide api as a service, but if you run the front end as well as the backend, then you just tailor your api to give your front end what it wants. Why use graphql and add the overhead when you’re the one designing both sides.

spiral gate
#

Hello people, I'm currently working on a project developing a website and have some basic questions about that topic/would like to get some general advice on further steps. I hope that this is something you can ask about on this server 🙏🏽

spiral gate
#

so first of all, I work with a group of people who have no experience in programming whatsoever and I tasked them to write a front end html script for our website. After that a web developer friend of mine told me, that if they only write in html they won't be able to acces data from the backend script/data base. I did some research and saw, that in django you can use {{}} to do some simple coding in the html files, but I was wondering if that is something smart to do or that you usually would write functions elsewhere and add them to the html file. I myself am a beginner at coding but i have to manage a group of non programmers rn.

#

At the moment i'm learning on how to connect the db to the website, which seems fairly simple

silver totem
#

Well.. from what I know about Django is that it will generate html based on templates. Which is the {{}} syntax you mention. So really it’s - Server>template > html> front end. But all interactivity is done via JavaScript or at worst - forms via submit\post.

#

What is the goal there? If you can share that

spiral gate
#

sure

#

uhm