#web-development
2 messages ยท Page 203 of 1
SOE?
My brain is so full at the moment.
Ah, Search Optimization ... something. ?
@dusty steeple turns out this does work, I just had omitted some code when I tried to merge both the regular single object resolver approach and the relay approach.
Ah, I am familiar with those problems.
What is the difference between using Quart and Uvicorn?
or just which library should you use for ASGI web server
Quart is a framework with a built-in HTTP server, while Uvicorn is an HTTP for an ASGI framework (like Starlette) to use.
You can also run Quart as an ASGI application, it seems: https://pgjones.gitlab.io/quart/tutorials/deployment.html
So
[application framework] [HTTP server]
FastAPI --- uvicorn
\ /
Starlette ----+-------------+-- hypercorn
/ \
Quart ------/ ????
I'll tell myself that next time I launch a startup 
Hey guys, I'm using allauth for user register and login, is there any way to add user into certain user group when account has signed up without create a new customer user model?
how do you connect a google colab notebook to a web front end?
Umm like to use colab to host an api? you can use ngrok trying to host some ml endpoints?
honestly something i havnt done yet but was looking into i looked into this and liked it https://github.com/mrtolkien/fastapi_simple_security
please let me know how it goes. Its on my todo list and its coming up soon
I'm using celery for the first time. Im adding it to a flask api deployed on kubernetes. Due to some issues that turned out to be minor (I never restarted the celery worker) I now have two working projects one with regular task and one with shared_task but not really sure whats the difference. I read this https://stackoverflow.com/questions/54506515/difference-between-different-ways-to-create-celery-task but still a little confused are there any disadvantages to shared_task over regular task other then having to turn your task into its own library?
Providing the code in screenshots is not the best way, better copy it as text
Otherwise it is hard to give u help
@latent wagon I used Quart and definitely not going to recommend it.
Quite.... half-baked product. Hell, it is using half of libraries from Flask with semi compatibility.
Plus the Quart was making sense when Flask did not have its own ASGI support yet, as far as I remember it was changed
Anyway, I would better try using Fast API for ASGI.
What I need to know to make websites? Ping me
Just WordPress
Whats that?
<h1>what?</h1>
<p>I didnt know i could that</p>
<label>is this part of the discord bot too?</label>
can i do it with more languages?
const x = document.querySelector("p");
const func() => {
x.innerText = "wow";
};
h1{
background-color: #fff;
/*WOW im impresed*/
}
U need to choose if u wish making website with CMS, Wordpress / or https://tilda.cc/ for example.
That will require mostly Design skills + A small bit of advanced user skills
Should be pretty fast to make, but limited to... certain boilerplates.
To start doing that: start using Tilda or find a book for Wordpress, those are actually almost no code solutions.
or if u wish being fully coding developer
Then u need to learn Frontend / Backend
HTML / CSS / JS / backend language / Docker and e.t.c.
high customization, longer training.
Where to start a bit difficult to say, depends on what u wish to make.
If u wish high client side interactivity and nice viewable part, then start from Frontend
if it is important for you to have some server side work / having database for your web site, then start from Backend
it is plain Vanila JS used to manipulate DOM
if u work with Python / Backend langs, u a limited to use only this and Jinja 2
Actually no, U can also attach JQuery
it should bring a lot of flexibility while still remaining in backend framework ๐ค
but regardless, it is still outdated way to approach it
people use Frontend Framework for this
React / Angular / Vue.js or even Svelte
they replace Vanila JS operations with much simpler and richer their own syntax
Actually u know... it is even possible to insert frontend frameworks directly to backend ๐ค
Although what would be the point? Better having them separated i think
Hey fellas i'm wondering how to run aiohttp or fastapi or flask inside asyncio.gather
I want to run my server and playwright in the same process, so they can share a Q
did you install flask-login?
Yes
Pip install Flask-login
See i used show command and its showing that is is installed
Had stuck from morning
๐ซ
save to github and share its url
nobody can help you with screenshots of a code we can't see
@restive pinety I'll have a look
to me, what makes sense is that you're probably using some sort of environment to run the app, seeing as you're using pycharm, and this environment doesn't have the library installed. just my guess
Any idea how to move forward with an api endpoint which only admin can access and when he hit that api, all the other apis stop (i.e. they don't accept anymore request unless it's turned on from the same admin api again)
My approach is, I will maintain a table to store api status (ON or OFF) and then write an admin api to set that status. After that write a decorator function which check for the status and if status is OFF I will abort the request with 503 status and custom message (like service will be available after half hour)
it sounds good enough.
except perhaps the part maintain a table ? that sounds like an extreme way to approach it.
having requests to SQL database just to check application status is a bit too much and slow way to approach it. And maintaing a special table for this.
how about for admin url to set the state in OS environment, if it is in one server? as fastest no database solution to work across all workers, or even just plainly simple in file.
or at least in Redis NoSQL db if it is across multiple servers.
the problem is admin api and user api are running in different containers and using their respective Redis instance for the same like DB0 is for user related apis, and DB1 for admin related apis. Only thing shared among them is the common database for both
well, the file option is still an option, if u will use shared volume across those containers.
but I guess u should use database then in order to keep your application stateless
the sql database is located in different server right?
or to raise small shared redis
or for admin container to access user container redis
hmmm... it sounds like it should be handled differently
for some reason I wish to approach this issue at level of Reverse Proxies / Floating IPs
yeah configuring on reverse proxy (nginx) is also an option but not much sure on how it will be done
do they run in docker-compose?
This sounds good, I will try to do this, but I think this will require some changes at the deployment end too on kubernetes
yes
or Starlette ๐
admin and user application is completely different applications, or the same applications with different env?
anyway, docker-compose allows to access other containers objects with url like https://container_name/blabla
perhaps in admin application to connect to user container redis://user_container_docker-compose_name/ and making the change state
two different application with shared sql database, they both have different portal too on frontend
Hello, I have a signals.py file in my account folder, I did a Profile model with a one-to-one relation with the django built-in User model. However, it doesnt create a profile. Does it need any additional configurations?
signals.py
from django.db.models.signals import post_save
from django.contrib.auth.models import User
from django.dispatch import receiver
from . import models
@receiver(post_save, sender=User)
def create_profile(sender, instance, created, **kwargs):
if created:
models.Profile.objects.create(User=instance)
@receiver(post_save, sender=User)
def save_profile(sender, instance, **kwargs):
instance.profile.save()
models.py
from django.contrib.auth.models import User
from django.db import models
from django.db.models.fields.related import OneToOneField
# Create your models here.
class Profile(models.Model):
username = OneToOneField(User, on_delete=models.CASCADE)
description = models.TextField()
image = models.ImageField(upload_to="images")
Hey fellas i'm wondering how to run aiohttp or fastapi or flask inside asyncio.gather
I want to run my server and playwright in the same process, so they can share a Q
did u ran the migrations?
Yes
username = models.OneToOneField
try this, don't import onetoonefield
It worked Like this.
from django.contrib.auth.models import User
from django.db import models
from django.db.models.fields.related import OneToOneField
from django.db.models.signals import post_save
from django.dispatch import receiver
# Create your models here.
class Profile(models.Model):
username = OneToOneField(User, on_delete=models.CASCADE)
description = models.TextField()
image = models.ImageField(upload_to="images")
def create_profile(sender, instance, created, **kwargs):
if created:
Profile.objects.create(username=instance)
post_save.connect(create_profile, sender=User)
def save_profile(sender, instance, created, **kwargs):
if created == False:
instance.profile.save()
post_save.connect(save_profile, sender=User)
hey i have build a restapi using flask now i want to scale that api and handle queing. can any one suggest how to do it?
def userProfile(request):
realProfile = models.Profile.objects.get(username=request.user)
form = forms.ProfileForm()
if request.method == "POST":
form = forms.ProfileForm(request.POST, request.FILES)
if form.is_valid():
if(realProfile == request.user.user_profile):
profile = models.Profile(
image=request.FILES['image'],
description=request.POST['description']
)
profile.save()
ERROR:UNIQUE constraint failed: UserAccount_profile.username_id
def userProfile(request):
realProfile = models.Profile.objects.get(username=request.user)
form = forms.ProfileForm()
if request.method == "POST":
form = forms.ProfileForm(request.POST, request.FILES)
if form.is_valid():
if(realProfile == request.user.user_profile):
profile = models.Profile(
username=request.user.id,
image=request.FILES['image'],
description=request.POST['description']
)
profile.save()
ERROR:Cannot assign "7": "Profile.username" must be a "User" instance.
it gives me an error if I didnt send a user id with the Profile model fields, and it gives me an error if I assigned the user id to the Profile model username field.....
This is the model
Hey fellas i'm wondering how to run aiohttp or fastapi or flask inside asyncio.gather
I want to run my server and playwright in the same process, so they can share a Q
Thanks for sharing :)
how do I make selenium to click on a span button?
u cud essentially find the xpath of that button and then use driver.find_element_by_xpath and then if that object is stored as btn then use btn.click() i think
i know to make it to click on a normal button but after using element check it was <span class
im sorry but i dont understand the difference bw clicking a span element and anything else, i suppose u can do it in the same way we do so with other elements? use css selector or xpath am i correct?
i will try that
thanks
glad i cud help
okay so how I make selenium press enter?
soo i am trying to search something in search box and it doesnt have any buttons is it possible to press "enter" in selenium
u can use .send_keys()
so i found this
from selenium.webdriver.common.keys import Keys
driver.find_element_by_name("Value").send_keys(Keys.RETURN)```
from stackoverflow let's use this as an example
oh alr ty
https://betterprogramming.pub/refactoring-guard-clauses-2ceeaa1a9da?gi=d97e914298f8
Could u start with this in order to eliminate the nesting hell
u mean I put the if statements ordered but not nested?
btw it is solved this way
def userProfile(request):
realProfile = models.Profile.objects.get(username=request.user)
print(realProfile)
form = forms.ProfileForm()
if request.method == "POST":
form = forms.ProfileForm(request.POST, request.FILES)
if form.is_valid():
if(realProfile == request.user.user_profile):
realProfile.image = request.FILES['image']
realProfile.description=request.POST['description']
realProfile.save()
Django : what is the difference between using class based views and function based views?
is there some thing extra?
def userProfile(request):
realProfile = models.Profile.objects.get(username=request.user)
print(realProfile)
form = forms.ProfileForm()
if not request.method == "POST":
return response({"error": "wrong TYPE request", 400)
form = forms.ProfileForm(request.POST, request.FILES)
if not form.is_valid():
return response({"error": "invalid form", 400)
if not (realProfile == request.user.user_profile):
return response({"error": "Wrong profile", 400)
realProfile.image = request.FILES['image']
realProfile.description=request.POST['description']
realProfile.save()
return response({"result": "yay", 200)
something like this
oh I see.. Thanks for the advice!
that makes your happy path linear at the left. u a welcome
why is this happening
Isn't it printing the function in innerhtml?
so you need func_1() in the innerHTML to return the result of the function
How is your Vue learning coming along?
Mostly preference on how you prefer to organize your code.
nicely. last two weeks actively used at work.
surprised the boss with so quick learning.
Learned CSS/SASS/ positioning with Flexboxes / Grids / Absolute-relative positioning
Learned how to setup Vue project with all stuff / babel and e.t.c.
Learned how to use Components & Vuex ( state management ) / Router / I8n
Last two days started actively using Jest to unit test stuff
I would say, I learned enough to complete small projects ๐
I need to buckle down and get some Jest testing training.
Any good online sources? Don't tell me you got another book for it. ๐
Uh. I just started to use from scratch
in unit testing i ve read only generic book for how testing is done
Ah
essentially I already knew how to test with big experience in backend / pytest
just googled Jest syntax, and how to test in Vue.js (there is added some Vue library for jest testing of components in addition)
https://v3.vuejs.org/guide/testing.html#recommendations
https://vue-test-utils.vuejs.org/guides/
https://lmiller1990.github.io/vue-testing-handbook/v3/#what-is-this-guide
basically walked through different documentations for framework
Plus had unit testing pre setup for my project with Vue CLI
probably should read more of documentation perhaps
I just learned for now how to test backendish frontend part, the most necessary part for me
later will try component testing, i have one example for that though
I can recommend the book for generic understanding of testing btw if u wish)
I wish to start learning kubernetes now
I wonder how long time it will take to get a middle level hang of it ๐ค
guys say around half of year
i hope to learn it faster
How do you plan to use them?
mostly I wish for self recovering servers
plus to balance load with different amount of servers in different day hours automatically
plus probably for zero down time deployment too
but actually I learn to find out every possible aspect of usage as well
I can't know without knowing/working it
well, basically minimal goal is to learn every possible application
Oh, remembered
I actually want it also in order so I could deploy/remove new servers on a run in load balanced group with easier networking situation
wait, I can probably do it without kubernetes
just a matter of having load balancer with health check, which are available in cloud providers
nvm then, this goal is already fulfilled without k8s
but still interested to learn networking solutions that make life easier in heavy microserviced situation
smth for Service Mesh stuff, there smth should be existing at k8s level
but well, actually it is sort of expected middle level tool for DevOps position, I wish a bit to dive into it more
I am fascinating with automating everything ;b
saves time, faster development / faster deployments
makes possible what is impossible in short time
that's mostly about CI CD though, but all other tools are just part of it to write the infrastructure as a code
Ah I see, sounds like a good skill to have.
Similar to Docker or a different tool altogether?
Docker is Container tool
K8s is Container Orchestration tool
basically Docker at a more global higher level, a tool to control myriad of containers, to scale those containers across multiple servers
Darkwind, good luck with k8s :)
just know that baremetal k8s vs managed k8s is not the same
sure/ thanks. I learned already all prerequisites in my opinion
I already use Docker /Ansible / Terraform / Gitlab CI
with terraform going to spin up managed K8s in Digital Ocean, i see no point to deal with baremetal k8s, except for trying to learn initially in minikube.
On a more joke side. With this full snack development
that's the best representation of my job now https://www.youtube.com/watch?v=uXMuWi0dUBc
An amazing one-man-band street performer in Rijeka, Croatia called Cigo Man Band.
Sign me up for more full snack dev. ๐ญ
Hey peeps, need some help, can y'all suggest some cool APIs to work with, for js practice mainly
P.S Not python, only javascript (html css is okay)
APIs?
what do u mean by APIs, what u wish to achieve
anyway, Node.js backend framework sounds like a fine thing to create REST API
well something i can make a project out of, like some bots n stuff
do u wish to find already built ready to use third party API?
Or to build API on your own
oh nono, the former
eg. discord api helps build bots with python, something like that
Discord API is sort of their own framework tbh
still not clear what u wish
finding a framework to build stuff out of the box, or exactly API to use party services
anyway, if u wish really API, then I can suggest nothing. There are too many of them
just think of what API u wish / google / it should be there for any kind of service
but since they are almost all SaaS usually.... not really useful.
Although world wide messangers offer them for free indeed. Discord / Telegram and e.t.c.
perhaps to google something like Best Free APIs
hmm yea will do that, thanks for the help
I am learning kubernetes right now. I'm using it to deploy machine learning web apps
I have a date time field in a model in django, I want to filter all of the model instances that are less than or equal to the current time, how do I do this
https://www.geeksforgeeks.org/comparing-dates-python/ as far as I remember it returns just regular dates
A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
so... all you need is for getting now
from datetime import datetime
now = datetime.utcnow()
but how would I compare them
and as long as you solve UTC problems, u should able to handle it
link above
apperently overloaded operators > work fine when they are both datetime types
is there any way to do it when I filter all the model instances
so for example I am getting all the events through this command
userEvents=Events.objects.filter(user=pk)
can I do something like userEvents=Events.objects.filter(user=pk, date<datetime.utcnow())
>>> Entry.objects.filter(
... headline__startswith='What'
... ).exclude(
... pub_date__gte=datetime.date.today()
... ).filter(
... pub_date__gte=datetime.date(2005, 1, 30)
... )
official documentation for Django ORM has examples for datetime queries
date__get=some your date should make comparison < apperently
__lte is synonim for >
yes I understand
> q = q.filter(pub_date__lte=datetime.date.today())
Can someone tell me how i can keep my discord bot up with a html?
hey this is probably a stupid question, however im about to order a domain ive come up with a name but im not sure if there rules against certain domain names?
just search for it on your dns provider.
No, I don't think so.
basically alphanumeric plus - and _, no spaces, lowercase.
There's some legacy limitations like needing to be < 64 characters
does anyone know how to make a search bar in django that passes the string in the search bar into the view?
When u wish it being passed.. during button pressed?
yes
Search bar as in regular text field?
so like i have a weather api and i want to pass the city name to the view so it can do an api request and pass that context to the render
yes
Just a regular html form then
Input form with text field
And action to do post request on pressed form submit button
def index(request):
"""Returns render of index.html template to http request"""
# get city name from request?
wp = WeatherPacket(cityname)
return render(request, 'weather/index.html')
cause from my understanding you pass the context for the render
but how do i access the information from the post request in the view?
<div class="main-content">
<div class="search-form">
<form method="POST">
<div class="search-bar-container">
<input class="search-bar" type="text" placeholder="search a city...">
</div>
<div class="search-button-container">
<button class="search-button">search</button>
</div>
</form>
</div>
</div>
U have GET view by default to render.
Allow GET and POST
ohhhhhh
oh the request.method
if request.method == 'POST':
form = UserRegistrationForm(request.POST)
if form.is_valid():
# save the form to db
form.save()
username = form.cleaned_data.get('username')
messages.success(request, f"Your account has been created, you can now login!")
return redirect('login')
i used this in a tutorial
Yup, probably that is
i think this is the same concept
but im not posting anything to a db?
post can mean just posting data to the server as context too?
Hello, can someone help me how to write a proper procfile for heroku, (after several fail attempts)
my github repo is like
flask_notes:
Website:
init
templates
main.py
main.py contains code as
app = create_app()
if __name__=='__main__':
app.run(debug=True)```
and I am getting error as
at=error code=H14 desc="No web processes running" method=GET path="/" host=easydoesit.herokuapp.com request_id=2139c3c5-44ed-475a-ac96-d4481c6678df fwd="117.213.169.158" dyno= connect= service= status=503 bytes= protocol=https```
Hi there, anyone familiar with setting up project in Django, Docker and Postgresql? Would appreciate help with pathing please. Getting some errors which I cannot catch on.
what is the best way to clean tags from a stringfield using wtforms?
Need some help with Flask. Is there a way to redirect unauthenticated users to the login page automatically, without changing every view function? Currently I am doing a simpleif statement at the top of each route/view function:
if not current_user.is_authenticated:
return redirect(url_for('login'))
This works fine. If users tries to manually enter a url without logging in, they are redirected to login, but I need to change every function. Is there a better cleaner way?
Hey folks. What system do people use to deploy their flask apps these days? Is mod_wsgi + <VirtualHost> configs still used? or is there something better now?
I am having the worst luck deploying this flask app to my CentOS 7-based VPS.
Related: Does anyone know how to uninstall python 3.9.7 from CentOS 7 when it was installed from source? I haven't found any articles for this particular version of python, and the MAKE file has no 'uninstall' section.
probably there is something flask specific, but...
Python Decorators exist for that
Create decorator that adds in the beginning
if not current_user.is_authenticated:
return redirect(url_for('login'))
then your views will look like
@other_decorators
@redirect_unauthentificated_to_my_choice
def another_view_function():
# normal function behaviour without any additional redirects
pass
Most resources say to rm a bunch of specific paths.
Does anyone know how to find out the specific paths that a python version might have been installed to? Perhaps hidden in the MAKE file?
Hello. who has a code for tic tac toe?
thanks!
Hello. who has a code for tic tac toe?
The code pls
Have you tried searching google for an open-source repository?
"tic tac toe source code python"
see what you find
are these folders what I remove when manually uninstalling python3.9 which was installed from source?
[Python-3.9.7]# whereis python3
python3: /usr/local/bin/python3.9-config /usr/local/bin/python3.9 /usr/local/lib/python3.9
What?
can you recommend some cheap vps?
i deleted my django_admin table in my DB because of an error im trying to run python3 manage.py migrate admin to make a new one and it says no migrations to apply so i keep getting this error => ProgrammingError at /admin/
relation "django_admin_log" does not exist
go to your application
delete all migration files
delete from 0001_initial
and what comes after
then run python manage.py migrate
and delete your SQLite database
befor making migrations
is javascript for making animations?
so I'm working on a little website project, and was working on the login portion, and was using quart for this, and was playing around with forms to see how they work.
this is the the html code for login.html:
<html>
<script>
function submitForm() {
document.getElementById('Login').submit()
}
</script>
<form id="Login" action="/sus_login" method="POST">
<div id="email">
<label for="email">Enter your email: </label>
<input type="email" id="email" namerequired>
</div>
<div id="password">
<label for="email">Enter your password: </label>
<input type="password" id="password" required>
</div>
</form>
<button onclick=submitForm()>Submit</button>
</html>
import asyncio
from logging import exception
import re
from quart import Quart, request
import quart
from quart.helpers import url_for
from quart.templating import render_template
from quart.utils import redirect
import quart_auth # type: ignore
import json
import argon2
import asyncpg
import toml
config = toml.load('config.toml')
loop = asyncio.get_event_loop()
pool = loop.run_until_complete(
asyncpg.create_pool(
f"postgres://postgres:{config['postgres']['password']}@localhost:5432/spot_a_fly",
loop=loop,
)
)
app = Quart(
__name__, template_folder='templates'
)
app.secret_key = __import__('secrets').token_urlsafe(16)
quart_auth.AuthManager(app)
@app.route('/login')
async def login():
return await render_template('login.html')
@app.route("/sus_login", methods=["POST"])
async def sus_login():
print(await request.form)
return (await request.form)
However, request.form is always an empty dict. why?
Hetzner, one of the best among the cheap
CSS is first for making transitions and animations
Then u think if GIF could be used
javascript is only third in the queue, when all means to do it in other ways were exhausted.
Or actually they could be used in pair
animation in CSS, triggered by javascript often
in javascript we have Canvas for custom stuff
Ok I had a look and couldn't figure it out. My goal isn't specifically to host an API, i just want a front end to control the notebook but run it on colab
forgot the important part
there is an exception where javascript is quite nicely used as animation easily
but it happens if u use javascript from the frontend framework
So I would think of CSS or how to use frontendish/frameworkish js for animation first
๐ค probably there are more ways to apply animations through javascript. The question is only in which ones out of them the nice and easy ones
i tried to pm you but what kind of front end?
just a simple web app
Like a python flask/dash/ stream lit or like a react/ js one thatโs not on colab?
Right
Probably react, but it could be anything else if it's better
Idk if it's even possible to use colab that way
As the backend to a public app
Anvil has a tutorial using their tech, they do some kind of streaming callback
I want to run a notebook with different parameters and queue jobs because of usage restrictions
While I run command 'django-admin runserver', I'm getting this error. I didn't understand what it says this error. Everything looks configured but still I'm getting this error.
Is this a brand new project? I would recreate it if you haven't made any changes yet.
I'm following a tutorial and I came to creating app part. I don't know Is this a brand new project
Yea, I would recreate it if you have a problem like that off the bat.
Clean project should work right out of the box.
I accidentally deleted django_admin_log and now i can not use the django admin
Ctrl-Z!
That's a joke - but if you're in VS Code, maybe you can delete the change in your commits window.
I accidentally deleted django_admin_log and now i can not use the django admin , i get this error => relation "django_admin_log" does not exist
LINE 1: ..."."app_label", "django_content_type"."model" FROM "django_ad...
it went from 2.5 euros to 4.5 in september, why?
Not sure what your question is. If you deleted it then you need to put the table back in.
ive tried not working
if you don't mind starting from an empty DB, I would just drop the database and recreate it and rerun migrations
if that's a big problem, then tell us what error you're getting
guys have a question in django when i delete an object say i deleted a user of id 2 when new user creates a new account it generated with id 3 not id 2 how to solve this
im using sqlite db
why does it need to have id 2?
It's not supposed to do that. In fact, you specifically shouldn't allow it to go back to unused numbers. It should just increase each time.
It's just an ID so it shouldn't be a problem.
ยด
anyone know how to return a post function without redirecting the client using flask?
please explain what you mean here?
you want to post without causing a reload in the front end?
am i reading that right?
I have basic incomplete function: ```py
@app.route('/', methods=['GET', 'POST'])
def home():
if request.method == 'POST':
gameCode = request.form['pin']
name = request.form['name']
p = player.Player(name)
found = False
for game in games:
if game.game_code is gameCode:
game.addPlayer(p)
print("found game")
found = True
# HERE
if not found:
flash("Could not locate a game with that pin.")
print("couldnt find game")
return redirect(request.url)
return render_template("join.html", user=current_user)
the part where I marked `# HERE`. The return redirect(request.url) is needed for the code to work, although i dont want it, I want it to post the error and then just abort everything
so what should happening when it reaches that point?
well, it says at that point, a game with that pin doesnt exist, so try again, and then stops. But when it stops it redirects, I want something like Kahoot. When you enter the gamecode and it is incorrect, it doesnt redirect, it just flashes "A game with that pin doesnt exist"
this is a form?
ok, why not use flask_wtf to handle that for you
the user enters a pin number, if it matches a game, then connect them to it
you can set it to reload the same page with errors
I dont want the page to reload
I dont want the website to physically reload
ok, then use ajax calls
but your endpoint will have to look like an api
Does this advice relate to primary keys in databases? I know the GUI DPG likes UUIDs, but I didn't think about PKs.
how do i add ratelimits to quart/flask ping me pls
They justified it because of exhausted pool of ipv4 addresses
I have a question on the virtual environment for Django
why not implement it yourself using middleware? you can also use a library like https://flask-limiter.readthedocs.io/en/master/
so I'm working on a little website project, and was working on the login portion, and was using quart for this, and was playing around with forms to see how they work.
this is the the html code for login.html:
<html>
<script>
function submitForm() {
document.getElementById('Login').submit()
}
</script>
<form id="Login" action="/sus_login" method="POST">
<div id="email">
<label for="email">Enter your email: </label>
<input type="email" id="email" namerequired>
</div>
<div id="password">
<label for="email">Enter your password: </label>
<input type="password" id="password" required>
</div>
</form>
<button onclick=submitForm()>Submit</button>
</html>
import asyncio
from logging import exception
import re
from quart import Quart, request
import quart
from quart.helpers import url_for
from quart.templating import render_template
from quart.utils import redirect
import quart_auth # type: ignore
import json
import argon2
import asyncpg
import toml
config = toml.load('config.toml')
loop = asyncio.get_event_loop()
pool = loop.run_until_complete(
asyncpg.create_pool(
f"postgres://postgres:{config['postgres']['password']}@localhost:5432/spot_a_fly",
loop=loop,
)
)
app = Quart(
__name__, template_folder='templates'
)
app.secret_key = __import__('secrets').token_urlsafe(16)
quart_auth.AuthManager(app)
@app.route('/login')
async def login():
return await render_template('login.html')
@app.route("/sus_login", methods=["POST"])
async def sus_login():
print(await request.form)
return (await request.form)
However, request.form is always an empty dict. why?
I'm not sure how html scripts and quart.request convert elements by ID to python dicts but that's where I'd look until someone who knows gives a better clue.
... I didn't really focus on web dev at college, but isn't an #id meant to be unique in html?
i have little blog project in django which i have deployed on heroku. and i'm using ckditors RichTextUploadingField in production but when i set debug=false ckeditor shows red x on image preview. can anyone help me with that
i try create new admin but it doesnt work
Hey i have a question what is a domain? Like how its made and is it possible for us to make? Is it possible to use heroku to host my domaind which i created? Is coding required for it?
illuminati song intensifiers
Anyone?
Do you have any idea of one for quart? I canโt find anything other than quart_rate_limter and I donโt understand its docs
How can I deny request with some error message, while the server is still running for maintenance? Clients get 503 when server is not running, I want to imitate the same while the server is still up during the maintanence, so that client get 503.
i.e. any request for any endpoint get redirected to error message of maintenance
web
You buy your domain from a registrar, then you make a DNS CNAME record to point where you want it to go.
hey which will be good smtp provider
hi all, how I could make a Quiz App for Coders?
I would like to make like simpler Hacerrank. In order for studetns to run Tests and get feedback.
Question: let's say someone wants to make an application that is gonna have a really LOT of users. This means quite a lot of work in the dev ops side, as you have to configure a lot of stuff, such as load balancers, HA databases, etc. Ignoring that, is it a priority to choose the fastest language for the framework the backend is gonna rely on..?
For example: Java faster than Python. Let's do it in Spring Boot and not in Flask.
highly likely it will matter almost nothing. Because 99% of the framework time is spent in waitings
and optimizations with caching at all levels and other means will speed up this thing no matter in which language it was done
for example caching with web accelerating caching, intercepts requests before they reach framework
plus with using fast for development language, highly likely u will optimize its architecture just better to perform
Hello! Are you referring to my question by any chance?
oh yeah
for some rason addressed wrong person
highly likely it will matter almost nothing. Because 99% of the framework time is spent in waitings
This is the fundamental click I needed!
web accelerating caching
What do you mean?
example.
U have url /your_awesome_page
served with python gunicorn web server
Yes, ok
in front of it u have Nginx web server setup as reverse proxy to your python server
Ok!
u enabled in Nginx to cache /your_awesome_page and to keep it cached server-side for 5 minutes
First user requests page and receives it from python web server
all other users in the next five minutes, receive the copy of /your_awesome_page stored in nginx. Requests do not reach python server
(Same can be applied to python servers that work as REST API and return just JSONs)
The point of it...nginx will serve FASTER it
the page will be not rendered in python framework
Right, I understand!
if it is rendering requires requests to SQL servers, repeated requests will be not made
By any chance, do you use Docker on a daily basis?
Ohh, I have a quick question
Let's say I have an Angular application
I want it this way:
Container 1:
NGINX -> serves static files with the angular application in it
Container 2:
NGINX -> Gunicorn -> Flask. This is the API the container 1 makes requests to
Is that possible with docker?
Sure.
Ohh, ok!
I have almost same thing
Container 1:
Nginx serves built Vue.js app
FROM node:lts-alpine3.12 AS build
COPY package-lock.json package-lock.json
COPY package.json package.json
RUN npm install
COPY . .
RUN npm run build
FROM nginx:1.21.3-alpine-perl As runner
COPY --from=build dist/ /usr/share/nginx/html
something like that would be used
first container layer Node builds my vue into /build folder
second layer servers it with Nginx
Container 2...
a bit more complicated
usually second thing that u wish is performed with Docker-compose, Docker-compose is an easy way to have multiple containers raised at one server
One container serves Python web server through Gunicorn
Second container contains Nginx that reverse proxies to this Gunicorn
Docker-compose allows easily to unite them together into one multi containerized structure
Hi there, i'm trying to connect to the discord rest API which is using a websockect connexion
Unfortunately, the heartbeat of my client seems to fail after a couple of days
This is the logs i end up with
2021-11-30 15:28:37 Waiting for new event.
2021-11-30 15:28:37 `message_create` middleware has been invoked
2021-11-30 15:28:37 `payload` middleware has been invoked
2021-11-30 15:29:42 < BINARY c2 db e4 32 c1 3b 67 36 b2 fa 1e c0 8a 1b 00 00 00 ff ff [19 bytes]
2021-11-30 15:29:42 < BINARY c2 1f 56 c3 e7 74 83 41 32 cc 6b 64 68 04 5a ec ... 03 4d 00 00 00 00 ff ff [29 bytes]
2021-11-30 15:29:42 < BINARY c2 9f 90 87 cf 32 fd 41 30 5c 6a 64 68 31 ba ad 98 26 89 18 00 00 00 ff ff [25 bytes]
2021-11-30 15:29:42 < BINARY c2 9f 88 29 98 74 a3 f1 d9 c3 a3 69 76 e4 a6 59 00 00 00 00 ff ff [22 bytes]
2021-11-30 15:29:42 < BINARY ec 5d 4b 0a c2 30 10 bd 4a 4e a0 4d a6 a9 2d ae ... 8d 97 e6 08 00 00 ff ff [265 bytes]
2021-11-30 15:29:42 < BINARY c2 5f de e0 98 17 47 ea cc 56 a4 16 64 40 ae 57 ... 02 03 00 00 00 00 ff ff [93 bytes]
2021-11-30 15:29:42 < BINARY c2 1f 40 14 ec 1d 18 d8 46 c4 20 e9 c1 19 03 d3 ... d0 92 00 00 00 00 ff ff [32 bytes]
2021-11-30 15:29:42 < BINARY c2 9f 70 71 cc 19 23 e5 ec 80 c4 92 a2 cc e4 6c ... 91 9b 01 00 00 00 ff ff [77 bytes]
2021-11-30 15:29:42 < BINARY c2 1f 28 14 dc 69 35 e2 bb 04 c6 86 e0 db 15 47 ... f5 73 32 00 00 00 ff ff [26 bytes]
2021-11-30 15:29:42 < BINARY c2 9f 68 f1 ed ad 30 36 30 34 07 e6 45 d0 d2 7e ... 1d f3 00 00 00 00 ff ff [31 bytes]
2021-11-30 15:29:42 < BINARY c2 bd 50 c9 14 cb 88 31 69 0b 95 40 d3 fc a3 0b ... 42 25 00 00 00 00 ff ff [27 bytes]
2021-11-30 15:29:42 < BINARY c2 9b 54 4d f1 ee 1f 18 c8 3b 63 01 00 00 00 ff ff [17 bytes]
2021-11-30 15:29:42 < BINARY c2 ef 6c 0a 86 3b 47 1b 79 c0 0c 6b 62 68 3c 3a ... 93 9a 01 00 00 00 ff ff [26 bytes]
2021-11-30 15:29:42 < BINARY c2 9f 6e f1 8d 70 0e dc fd 15 c4 0e d6 98 18 18 ... 2c 3b 02 00 00 00 ff ff [158 bytes]
2021-11-30 15:29:42 < BINARY c2 9f 9a 28 b8 9b 6a c4 37 8e 4d 0c 2d 41 67 21 ... 2f 01 01 00 00 00 ff ff [28 bytes]
2021-11-30 15:29:42 < BINARY c2 9f 66 07 e7 25 f5 44 97 80 a6 e6 86 e8 25 a0 ... ba 77 00 00 00 00 ff ff [46 bytes]
2021-11-30 15:29:42 < BINARY c4 5d 5d 0e 82 30 0c be 4a 0f a0 66 6b 61 83 03 ... 09 dc 9e 00 00 00 ff ff [213 bytes]
2021-11-30 15:29:42 < BINARY c2 9f fc 28 38 17 7b b4 5b 02 4c 1d a6 a0 a3 40 ... 51 2b 03 00 00 00 ff ff [28 bytes]
2021-11-30 15:29:42 < BINARY c2 9f 70 47 87 59 29 48 b4 46 e0 55 00 a3 89 96 fa 89 16 00 00 00 ff ff [24 bytes]
2021-11-30 15:29:42 < BINARY c2 9f 68 f1 0e b3 e2 3f 54 98 b6 63 57 00 00 00 00 ff ff [19 bytes]
2021-11-30 15:29:42 < BINARY c2 3d d4 6a 46 f1 50 2b a8 89 33 3a d4 3a 38 87 5a 01 00 00 00 ff ff [23 bytes]
2021-11-30 15:29:42 < BINARY c4 9d 4d 0a c2 30 10 85 af 92 95 6b 93 26 4d 8b ... a7 b0 1e 00 00 00 ff ff [216 bytes]
2021-11-30 15:29:42 < BINARY c2 9f 8a f1 8d bc 8f a6 62 70 ec 01 eb 31 73 f4 ... d6 a9 18 00 00 00 ff ff [73 bytes]
2021-11-30 15:29:42 < BINARY c2 b7 61 d3 cc 98 b2 0d 9b 96 56 86 e6 7a c6 d4 ... 75 b7 19 00 00 00 ff ff [108 bytes]
2021-11-30 15:29:42 < CLOSE 1000 (OK) [2 bytes]
2021-11-30 15:29:42 = connection is CLOSING
2021-11-30 15:29:42 > CLOSE 1000 (OK) [2 bytes]
2021-11-30 15:29:42 % sending keepalive ping
2021-11-30 15:29:42 Sending heartbeat (seq: None)
(repeat about 20 times) {
2021-11-30 15:29:42 New event received, checking if handler exists for opcode: 0
2021-11-30 15:29:42 Event handler found, ensuring async future in current loop.
}
2021-11-30 15:29:42 = connection is CLOSED
(repeat about 100 times) {
2021-11-30 15:29:42 `presence_update` middleware has been invoked
2021-11-30 15:29:42 `payload` middleware has been invoked
}
2021-11-30 15:29:42 Connection closed successfully.
2021-11-30 15:29:42 Waiting for new event.
2021-11-30 15:29:42 x closing TCP connection
2021-11-30 15:29:42 Connection closed successfully.
2021-11-30 15:29:42 Waiting for new event.
2021-11-30 15:29:42 Sending heartbeat failed. Ignoring failure... Client should automatically resolve this issue. If a crash occurs please create an issue on our github! (https://github.com/Pincer-org/Pincer)
2021-11-30 15:29:42 Connection closed successfully.
2021-11-30 15:29:42 Waiting for new event.
(repeat about 100k times) {
2021-11-30 15:29:42 Connection closed successfully.
2021-11-30 15:29:42 Waiting for new event.
}
[PTERO SERVER DIED]
I really dont have any idea on how to fix it and if you are wondering the repo is mine
Iโm having trouble trying to think of how to implement flask_login in an api style?
Iโm using react for front end, and flask for backend, and want to create sessions (Iโm using google login). Just unsure how to achieve the session part and actually logging in on the front end side. How would I go about it?
When a user logs in (they use google sign in) a token is given to the backend, the backend verifies the token, and then creates an entry in the database with a user if it doesnโt exist..
Just unsure what to do from here forwards
connection could have been reset by peer
if you dont handle that then that might be the reason

Erm... what do I do to start?
is there any way to display the first 100 characters of a textField in django
Yes.
In a django project each app interacts with other app. there are many imports from one module to other.
- how to handle the too many imports in a module ?
- how to handle commons imports across modules ?
Learn. Dropped the book in front of the person
instead of importing particular function or variable, u can import file as a whole (or even whole module probably)
import customer.models as cm
import customer as cm
what?
Find the book, download digital copy / buy online copy / buy paperbook copy from nearby shops
and read ;b
this is a good book to get started in frontend
Sometimes people get books for free, if they seek hard enough 
Getting education in University costs much more in general though
i am learning to code for 3 months
the cost of the books is almost nothing in comparison to regular education
Plus, I usually find it more satisfying to read paper copy. It allows to relax from PC
yo can someone tell me the basic file structure of a django project hosted by apache2?
i'm on CentOS 8 and python3.6
I already got mod_wsgi working
I just can't figure out for the life of me how to actually serve any content
with django*
i've been building websites in PHP and apache2 for several years so i'm familiar with most of the concepts, you don't gotta sugar coat anything for me
not sure if it matters but the site is a <VirtualHost *:443>
at py.mywebsite.com
this is what I currently see
ping me if you have django + apache/httpd experience
same as with nginx
Django is working with gunicorn or similar webserver at port 8000 for example
apache is used as reverse proxy
80 / 443 ports point to your Gunicorn server (localhost:8000)
optionally u disable 80, by making it redirecting to 443
in addition you write there, that static files for this web server are taken from a certain django folder with already compiled static files
I don't have Gunicorn installed
Python servers can be started only with Gunicorn / Hypercorn / Daphne or some other similar python servers
Apache is not supposed to be able to work with it as far as I know, it should used only as reverse proxy and static files server
Really? I was told Apache would be supported as long as I had mod_wsgi installed
following this guide https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/modwsgi/
All right. U can skip Gunicorn if u wish.
But it is usually easier to do it with gunicorn or some familiar for you way, instead of learning again
I'm intending to write my restful api using python, but the main website with php
unfortunately Apache has a lot of features that I really need access to
and I don't wanna rewrite my whole httpd config to be compatible
as I said Apache can be used easily as reverse proxy
that allows to access all of its features easily
so apache would send it to gunicorn and gunicorn would send it to python?
Users would be met by Apache
Apache will send regular requests to Gunicorn, which will handle Python yes
Apache will send requests for static files (css/js and e.t.c) to serve on its own
shrugs. Go with Apache as python web server if u wish
i ilke it in terms of separating responsibilities. different tools do just one job, but they do well
and that allows me to use Nginx instead of Apache
Nginx is a bit more popular and prefered, and considering that I was not lazy to go through learning its all features... I will not change it until better tool would be released.
or probably i use it because it was the first way which I learned how to setup it ๐ค
anyway, i think read somewhere that nginx handles multiple connections better than apache
and considering that nginx works fine for me to cache stuff in different ways / setting up security things and other stuff
I will not switch to other tool, considering that I don't know if apache can perform simlar things (caching for example)
apache does have multiple caching, security, and supports multiple connections and multi-threading
โNginx was written specifically to address the performance limitations of Apache web servers.โ
I don't think that it applies anymore that nginx is faster, i bet that quote is from when nginx was created (many years ago)
mostly I don't want to switch because it will be a giant pain to re-write the configuration files
I ilke that F5 company that bought Nginx, distributes O'Reilly books for free, including full book about Nginx
I think I am just bought by their generosity
either way I still need help setting up apache to serve this content
this is what my config looks like ```xml
<VirtualHost *:443>
ServerName py.mysite.com
SSLCertificateFile /var/www/mysite.com/private/SSL/domain.crt
SSLCertificateChainFile /var/www/mysite.com/private/SSL/chain.pem
SSLCertificateKeyFile /var/www/mysite.com/private/SSL/domain.key
Alias /static/ /var/www/mysite.com/static/
<Directory /var/www/mysite.com/static>
Require all granted
</Directory>
# django
#LoadModule wsgi_module modules/mod_wsgi.so
#WSGIScriptAlias / /var/www/mysite.com/py_api/wsgi.py
#WSGIPythonHome /path/to/venv
#WSGIPythonPath /var/www/mysite.com
#WSGIDaemonProcess mysite.com python-path=/var/www/mysite.com #python-home=/path/to/venv
#WSGIProcessGroup mysite.com
#<Directory /var/www/mysite.com/py_api>
# <Files wsgi.py>
# Require all granted
# </Files>
#</Directory>
</VirtualHost>```
I can't figure out what stuff I need to comment/uncomment
WSGIScriptAlias / /path/to/mysite.com/mysite/wsgi.py
WSGIPythonHome /path/to/venv
WSGIPythonPath /path/to/mysite.com
WSGIScriptAlias is obviously leading to Django settings folder, which has settings.py, there is also wsgi.py near to it
WSGIPythonHome is also obvious, venv is created at same level where u have root of your django folder
WSGIPythonPath is a bit weird one
I haven't created a virtual environment, I don't intend on using any libraries that aren't globally installed
WSGIPythonPath is a path to root folder with Django project apperently. Root folder from which python modules will be imported
If my form only has a submit button, and no input fields, do I need to worry about csrf protection?
WSGIDaemonProcess and WSGIProcessGroup looks like using same variables already, so it should not be an issue for you
create anyway, your guide assumes only venv usage, although u can probably setup path to global python
which python should point address, or it could be somewhere in /usr/local smth
U will need adress that leads to folder with folder bin
:incoming_envelope: :ok_hand: applied mute to @native tide until <t:1638423973:f> (9 minutes and 59 seconds) (reason: duplicates rule: sent 4 duplicated messages in 10s).
venv usually has folder bin from where it goes to python binary
https://hub.docker.com/r/ndegardin/apache-wsgi
https://hub.docker.com/r/ndegardin/apache-wsgi/dockerfile
btw, consider building your apache as a docker image
and having venv installed as part of image
it will make considerable part of server settings as a code and life easier in general
plus having it frozen for reusage between development and production environment
alright I finally got django to serve something lol
I ended up just sucking it up and putting the site in a venv and using these two configurations ```py
WSGIDaemonProcess mysite.com python-home=/var/www/mysite.com/env python-path=/var/www/mysite.com
WSGIProcessGroup mysite.com
finally
๐
hey i need help
i have a model which store images
so i was using that image in my html
using
object.Image.path
but it is not showing it in my page
you shouldn't be storing images in your db via a model. Store a reference to the asset (string) like the image in an s3 bucket
Any Flask boilerplate that can be used in production, if there is github repo than great โ๏ธ
maybe https://github.com/tiangolo/uwsgi-nginx-flask-docker ? From the creator of FastAPI
Anyone in here that can help me with a Flask-Dance issue? I cannot figure out how to get email address from linkedin provider.
Could anyone confirm this?
@vernal thistle depends what you are using the submit button for. if for a GET request, I would not really care about CSRF. Strictly speaking CSRF is not required unless you are using flask forms WTForms. Just be smart about what you are doing.
hello
i need one thing
i need the code to write the animated text that goes from left to right
can any1 just type me one >
one that says 'The End'
just that
It's a post request, used to confirm the deletion of a user account.
Hello I have a question can I make my api with flask without port just the domain
@hoary kelpra yes. but maybe look at FastApi instead of flask
flask run -h 0.0.0.0 -p 80
can you connect at localhost?
Paste your app startup log?
you mean this:
* Serving Flask app 'pi' (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on all addresses.
WARNING: This is a development server. Do not use it in a production deployment.
* Running on http://192.168.1.216:5000/ (Press CTRL+C to quit)
?
you connected on the same host, right?
Does it work if you don't add host=...?
i didnt tried
it should just bind to 127.0.0.1:5000
its the same log
Did you save?
run it using flask run instead
no
its a py file
normal one
this is the log now:
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
C:\Users\oriko\PycharmProjects\python-p\raspi-zero\app.py:22: Warning: Silently ignoring app.run() because the application is run from the flask command line executable. Consider putting app.run() behind an if __name__ == "__main__" guard to silence this warning.
app.run("0.0.0.0")
* Running on all addresses.
WARNING: This is a development server. Do not use it in a production deployment.
* Running on http://192.168.1.216:80/ (Press CTRL+C to quit)
Consider putting app.run() behind an if __name__ == "__main__" guard to silence this warning.
You should do this.
now this is the log:
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on all addresses.
WARNING: This is a development server. Do not use it in a production deployment.
* Running on http://192.168.1.216:80/ (Press CTRL+C to quit)
now what ?
What is the full command? flask run that's it?
yes
thank you
this is the log
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
There. Now try connecting to localhost:5000
yes
umm
not working
its telling that mybe the domain was moved or that is not active now
@frank shoal
Is this not on your local pc?
wdym
is it on your desktop, or a linux server/raspberry pi?
that won't work. localhost only works if it's on the same machine.
i gona put it on raspberry pi zero w2
ho
well
i need to get to this from other pc
focus on localhost first for a baseline
Now that we've confirmed that, run flask run -h 0.0.0.0 -p 80
ok
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on all addresses.
WARNING: This is a development server. Do not use it in a production deployment.
* Running on http://192.168.1.216:80/ (Press CTRL+C to quit)
Go to this address http://192.168.1.216
not working
same machine?
If it's on the same network, it's a windows firewall issue
firewall issue on my pc or the other pc ?
if your network mode is set to public, setting it to private may resolve it.
how do i do this ?
10
Learn how to set a Wi-Fi network profile as public or private in Windows.
Do you want to disable the firewall (easy) or open a port (secure)?
umm i want the port to be secure i think
but wait
i dont need to
disable the firewall i guss
search for firewall in start. It should be straightforward.
You can do it straight from Windows Security if you like.
Since you plan on putting it on a pi, you can disable the firewall now and reenable it later when you move it to a dedicated host.
wait im searching for firewall and than what ?
just open windows security
then click "Firewall & network protection"
then click the active network, and click the slider to off
or add it to the allowed apps
i have here only domain network private network and public
which one says "(active)"?
there is only a green mark by all of tham
Open control panel > system and security > windows defender firewall
in the side panel, click "Turn Windows Defender Firewall on or off"
Ok. Now does it work?
one sec
or you didn't do anything?
remember to turn your firewall back on later.
<form method="POST" action="" enctype="multipart/form-data">
what does enctype mean?
enc means encoding
with readthedocs, it cant seem to find my added node, which works fine locally?
Error
Exception occurred:
File "/home/docs/checkouts/readthedocs.org/user_builds/acord/envs/latest/lib/python3.8/site-packages/sphinx/writers/latex.py", line 2084, in unknown_visit
raise NotImplementedError('Unknown node: ' + node.__class__.__name__)
NotImplementedError: Unknown node: AttrTable
The full traceback has been saved in /tmp/sphinx-err-m77m996s.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
Code
class AttrTable(nodes.General, nodes.Element):
pass
...
def setup(app):
app.add_directive('attributetable', PyAttrTable)
app.add_node(AttrTable, html=(visit_AttrTable_node, depart_AttrTable_node))
...
im making a quiz type application in django
but idk why my post request isnt working correctly
it has 4 options a b c d
but idk how when im printing the answer(the post request) it's showing on that isn't on the option
Looks like you're not setting a value on the html input elements for the answer
Hello guys ive got a django app hosted on heroku it was working fine but now it throws a 500 server error and error logs are not helpful sending 500 error also without any further data. I have another django app and its also not working...
I recommend setting up Sentry to manage exceptions on heroku from what I remember they have a plugin which makes it fairly easy to do
can u give me the name of the plugin if possible?
Sentry (www.sentry.io)
My Apache website dont work with the Port 80 ?
You don't have permission to access this resource.
AH00035: access to / denied (filesystem path '/var/www/website') because search permissions are missing on a component of the path
How to display the names instead of pk in the list viewset in Django Rest Framework?
how do I get the pk of the item currently in view?
To give more context, I am working on a django project. There is a model for a class. The class is supposed to have a messaging board and they have to click on a button to create a new message. The message model has a variable for class. How do I automatically set the class when they click on the button to create a message?
u can use Django or flask
to make a server
but the web devlopment is in Html and Css
Like in JavaScript?
no django
I figured it out
Hello l have err in django
the errr is:
ValueError: ModelForm has no model class specified.
I failed
Hello there, anyone here could know why I'm getting error on py manage.py createsuperuser ? I'm doing a Django project via Docker and need to create an admin
do you recommend guys start making projects to learn programming now I learned the basics of Python?Like functions,loops,etc...
Yes for sure
After you learned the basics
It's all practice
okay
I would learn a bit of unit tests first
thats the way I can master my career
and Django is simple to learn or directly make projects
cause it will be my first framework as backend
I'm currently working on Django project
Django is great, but it does have a fair amount of magic. Something like flask has less magic and is often easier to understand.
without telling us the error it's really hard to guess
Is it unsafe to have a static IP and host from your home internet?
a bit less safe, if it exposes your private development PCs, but in my opinion it is a small issue
the biggest issue is that you supervise a server in a manual way
that is having a big time cost
it will be especially terrible if u install baremetall regular operational systems
but...
if u will install something to create virtual machines from this server
it will be a bit better in my opinion
but still a lot of time waste...
...cloud providers save so much trouble
cheapest VPS servers cost 5$ a month as well
Ok
How to use GitHub actions or when I push the code to master branch it should be get automatically update to my nginx web server(on my instance) django
is it possible to inject a javascript into a redirected site? like when redirecting i need it to load the redirected site and alert("Your form has been submitted!")
if the user has installed your chrome extension, yes
without a chrome ext?
U could check for Oauth registrations/authorizations
They allow to redirect to other web site, proceed through login, and then return back to the source web site
additional behavior to other web sites you can make only if they provide means to do that.
if they don't have developed ways to do that... then no, all your javascript u should do at your site
because u know.. if that would be posible, it would be a hell of unsafe. it sounds similar to those XSS and e.t.c. attacks
ahh right gotchya
๐
im very new to coding and am currently learning django. is there a difference if i use VScode's terminal vs windows' cmd?
not really. no difference. well, with few exceptions:
- VScode makes auto discover of venv if possible (basically activates venv for u)
- The biggest difference that u can launch interactive visual debug when running from VScode, with usage of breakpoints and using GUI to see values.
but there is console debugger for python that requires no IDEs to use, it gives a similar experience, easier to setup, but less GUI to use
But in reality I use VScode terminal almost never.
Because unit testing is much more superior than visual debug
Maybe you need to run the command as
winpty python manage.py createsuperuser
Assuming that you are creating a form for a model named MyModel then you must add inside your MyModelForm:
class Meta:
model = MyModel
from django import forms
from django.contrib.auth.models import User
class UserCreationForm(forms.Form):
class Meta:
fields = ('username', 'email', 'first_name', 'last_name', 'password')
this is the code
so how it should be?
from django import forms
from django.contrib.auth.models import User
class UserCreationForm(forms.Form):
class Meta:
model = User
fields = ('username', 'email', 'first_name', 'last_name', 'password')
This is how it should be
Because django doesn't what model these fields belong to if you didn't specify the model
okie it worked
but the forms isnt in the page
{% block content %}
{% load crispy_forms_tags %}
<!-- Comment Form -->
<h3 class="border-bottom pb-3 mb-3 mt-5">ุงูุชุณุฌูู</h3>
<div class="border p-4 mb-5 mt-4">
<form method="POST">
{% csrf_token %}
{{form|crispy}}
<input class="btn btn-secondary" type="submit" value="ุชุณุฌูู">
</form>
</div>
{% endblock content %}```
I made an register.html where the user put the data
There might be something missing in the views, the template seems fine
from .forms import UserCreationForm
def register(request):
form = UserCreationForm()
return render(request, 'user/register.html', {
'title': 'ุงูุชุณุฌูู',
'form': form,
})```
I'm not sure if writing {{form.as_p|crispy}} instead of {{form|crispy}} in the template would solve the issue, would you try it?
no didnt work
or wait
I found a fix ig
no it also didnt work
Is it only the form not showing or what?
the form
from django.shortcuts import render
from .forms import UserCreationForm
def register(request):
if request.method = "GET":
form = UserCreationForm()
return render(request, 'user/register.html', {
'title': 'ุงูุชุณุฌูู',
'form': form,
})
Try this
im making a quiz type application in django in which i also want to give user score
correct , wrong answers he wrote n store it all on db
the issue is when user is entering correct answer then it should add +4 in score n +1 in correct
it's adding +1 in correct but idk why it's showing wrong=1 (that isn't) and -1 in score
if answer == queryset.answer:
score+=4
correct+=1
else:
score=-1
wrong+=1```
i checked by printint (answer) yeah it's correct (it's also giving +1 in correct)
so i rn
selected b
n yes it added +1 on the correct
on score it should at +4 but idk why its showing -1
it should show 4 in score

thank you so much for taking the time to answer! really appreciate it.
u a welcome
anyway, I can recommend Terminal Multiplexors
in general usage they are the most comfortable way to run stuff
Terminator and Konsole for linux are cool
Your view should handle one answer at a time, because all other answers will be evaluated as wrong I guess
hey i have some questions , can u come over vc
can i get ur 5 mins plz?
stuck on a logic
The view user.views.register didn't return an HttpResponse object. It returned None instead.
Okay, so the reason that the form was not being rendered is UserCreationForm is inheriting from forms.Form, it should inherit from forms.ModelForm.
Now in the view you can remove the if statement, the error should go now and the form should show up, However you should validate the form data in the view when the user sends data.
so the code will be?
In views.py:
from django.shortcuts import render
from .forms import UserCreationForm
def register(request):
form = UserCreationForm()
return render(request, 'user/register.html', {
'title': 'ุงูุชุณุฌูู',
'form': form,
})
In forms.py:
from django import forms
from django.contrib.auth.models import User
class UserCreationForm(forms.ModelForm):
class Meta:
model = User
fields = ('username', 'email', 'first_name', 'last_name', 'password')โ
This is how it should be (without validation)
from django.contrib.auth.models import User
class UserCreationForm(forms.ModelForm):
username = forms.CharField(label='ุงุณู
ุงูู
ุณุชุฎุฏู
', max_length=30,
help_text='ุงุณู
ุงูู
ุณุชุฎุฏู
ูุฌุจ ุฃูุง ูุญุชูู ุนูู ู
ุณุงูุงุช.')
email = forms.EmailField(label='ุงูุจุฑูุฏ ุงูุฅููุชุฑููู')
first_name = forms.CharField(label='ุงูุงุณู
ุงูุฃูู')
last_name = forms.CharField(label='ุงูุงุณู
ุงูุฃุฎูุฑ')
password1 = forms.CharField(
label='ููู
ุฉ ุงูู
ุฑูุฑ', widget=forms.PasswordInput(), min_length=8)
password2 = forms.CharField(
label='ุชุฃููุฏ ููู
ุฉ ุงูู
ุฑูุฑ', widget=forms.PasswordInput(), min_length=8)
class Meta:
model = User
fields = ('username', 'email', 'first_name',
'last_name', 'password1', 'password2')
def clean_password2(self):
cd = self.cleaned_data
if cd['password1'] != cd['password2']:
raise forms.ValidationError('ููู
ุฉ ุงูู
ุฑูุฑ ุบูุฑ ู
ุชุทุงุจูุฉ')
return cd['password2']
def clean_username(self):
cd = self.cleaned_data
if User.objects.filter(username=cd['username']).exists():
raise forms.ValidationError('ููุฌุฏ ู
ุณุชุฎุฏู
ู
ุณุฌู ุจูุฐุง ุงูุงุณู
.')
return cd['username']```
I made the code like this
and it worked :)
That's good ๐
same, it's also really slow
I am trying to store main user and his/her team data but when user type the number of people in his/her team then the below team details must be change to that number of fields in admin panel
so how can achieve this
Maybe you should use m2m field in your team model
Hello guys anyone have CSGO website Template ? for community gather games ?
@sudden sierra
I have managed to figure it out. docker-compose -f local.yml run -rm django python manage.py createsuperuser works.
Tho I still don't know why py manage.py createsuperuser doesen't work.
can you explain this in detail
Anyone can briefly tell how to deploy django on apache
How do registering of models work in django?
Like I have created an app "myapp" (an api app - has all the routes and models for a rest api) and in it's models.py, and whatever model I create and migrate, it reads that file automatically.
But I need to split the models.py into multiple files each one in different folders (all in the same app)... I guess django won't register them automatically then... So what should I do to achieve this?
Not sure but should I do admin.site.register() or something like this?
Arabic hhh an Arabic too
come in dm lol
You could probably import the other files into your main models.py
Ohh Ic.. I actually did nothing and just used the models created in different files and django migrated them properly. So ig I don't need to take care of location of files if the models are being used. Thanks ๐
@inland oak Have you heard of the CPython front-end scripting? Any experience with it?
Do you need to use apache? This is a great tutorial: https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04
https://brython.info/
https://github.com/jonathanverner/circular
Heard, but not really interested. It is all not really developed
Let's be honest, it will be wonders if it will be ever accepted in commercial programming
Yea, I have doubts.
Unless it has some huge benefits over JS, it's unlikely to take over. But I think speed is one of the supposed advantages.
And as disadvantage
It is all looking equal to vanilla js at the moment
I saw no developed Frameworks yet.
JS Frameworks just dominate in amount of boiler plate solutions
Not the mentioning lack of developed libraries / ecosystem for that
Terrible, worst case ever
then what
except digital ocean
pythonanywhere good ?
I would recommend to choose from Digital Ocean, Vultr, Linode, Hetzner
Or if u wish challenge, then AWS, GCP, Azure
Possibly Alibaba can be good, but haven't tried it
There's this thing https://lona-web.org/
but I don't think it's going to take over either ๐
I shoul use a soap web services only accessible by vpn and I have the wsdl file how can use this wsdl file to generate python code ?
My Apache website dont work with the Port 80 ??????????????????????????
You don't have permission to access this resource.
AH00035: access to / denied (filesystem path '/var/www/website') because search permissions are missing on a component of the path
hi, how do recursively create nested html tags from a graph? I posted a question on SO. can you please give a hand ? https://stackoverflow.com/q/70213240/5713751
Is it better to build a website in flask or Django?
guys i have a little problem: the html is not finding the image "image.jpg". Can anyone help me solve this problem?
here is the tag to show the image
import fromurl
assuming ur using flask
and google what to do
fromurl module
within flask
and django maybe idk
wait? what? That tag is in html not in python...
are you using flask or django
flask
then you need fromurl imported and google how to use it
Hey @lost frost!
Uh-oh! It looks like your message got zapped by our spam filter. We currently don't allow .txt attachments, so here are some tips to help you travel safely:
โข If you attempted to send a message longer than 2000 characters, try shortening your message to fit within the character limit or use a pasting service (see below)
โข If you tried to show someone your code, you can use codeblocks
(run !code-blocks in #bot-commands for more information) or use a pasting service like:
hi all,
I am making this slackbot
The code here https://paste.pythondiscord.com/bazajadalo.py
contains a segment with the flask endpoints commented
I am trying to add it either in the main method or create a class and add call it from the main method.
any advise would be appreciated it ..
The code was working in a script way but I am trying to OOP it
can someone helpme to "translate" this code of python 2 to python 3?
`from flask import Flask, render_template, request
import sqlite3 as sql
app = Flask(name)
@app.route('/')
def home():
return render_template('home.html')
@app.route('/enternew')
def new_student():
return render_template('student.html')
@app.route('/addrec',methods = ['POST', 'GET'])
def addrec():
if request.method == 'POST':
try:
nm = request.form['nm']
addr = request.form['add']
city = request.form['city']
pin = request.form['pin']
with sql.connect("database.db") as con:
cur = con.cursor()
cur.execute("INSERT INTO students (name,addr,city,pin)
VALUES (?,?,?,?)",(nm,addr,city,pin) )
con.commit()
msg = "Record successfully added"
except:
con.rollback()
msg = "error in insert operation"
finally:
return render_template("result.html",msg = msg)
con.close()
@app.route('/list')
def list():
con = sql.connect("database.db")
con.row_factory = sql.Row
cur = con.cursor()
cur.execute("select * from students")
rows = cur.fetchall();
return render_template("list.html",rows = rows)
if name == 'main':
app.run(debug = True)`
How do I prevent this page from showing up?
Nobody who is unauthenticated should be able to view this page
This is what the view looks like for now py @api_view(['GET', 'POST']) @authentication_classes([TimeBasedTokenAuthentication]) def users(request): if request.method == "GET": return Response(UserSerializer(User.objects.all(), many = True).data) elif request.method == "POST": serializer = UserSerializer(data = request.data) if serializer.is_valid(): serializer.save() return Response(serializer.data, status = 201) return Response(serializer.errors, status = 400)
I've barely worked with Django myself but looks like the documentation on this question is pretty clear https://www.django-rest-framework.org/api-guide/permissions/
Django, API, REST, Permissions
The permissions are working
I'm getting a 403 error
I just don't really want people to be able to see this page in their browser and play around with the options
I'd prefer to see a generic 403 forbidden page
p.s. Debug is already set to False
Can someone help me with a name of a .hmtl file?
In the code after you register an email; an email is sent to you. Then a new html page is rendered after you click on the email. What should I name the .html after the email is clicked on?
I figured it out
Added this configuration option in my settings.py py REST_FRAMEWORK = { 'DEFAULT_RENDERER_CLASSES': ( 'rest_framework.renderers.JSONRenderer', ) }
the BrowsableAPIRenderer is included by default, and manually setting it to this removes that option
Hi all,
Im trying to set my sessionid created by django back to my vue frontend. its not working right now. I was wondering why. on the console its showing the values and all. There was a reddit post about this issue and he solved it by moving the code to the server. Im just testing locally right now. Just wanna hear some opinions before i go ahead and do that
csrftoken = request.COOKIES.get('csrftoken')
response = redirect('vue/')
response.set_cookie('sessionid', sessionid)
response.set_cookie('csrftoken', csrftoken)
print(response.headers)
print(response.cookies)
return response```
does anyone know a good HTML/CSS framework that would make this UI easy to make using django?
pov: when u hire a web dev and u gave idea but he cant understand
hmtl and css
guys need some help
i am trying to make a discord bot dashboard
and i am using discord oauth to verify the user
but even after the verification the oauth i redirecting me to the same page
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.```
how fix this error
then give it file psth name
html and css
You gotta keep in mind everyoneโs a learner here. Someone giving you advice might not actually know exactly what you want or even have the knowledge. Doesnโt mean theyโre trolling you
Cd into the actual django folder where manage.py is at. Make sure youโve activated your virtual environment as well
it is
Just do it in the terminal instead of vs code
i have done it in terminal
this site works when i run it on my local machine but it doesnt work when i try to run it on repl.it
still html and css
the code ```py
@app.route("/login")
async def login():
return await discord.create_session()
@app.route("/callback")
async def callback():
try:
await discord.callback()
except Exception:
return redirect(url_for("dashboard"))
return redirect(url_for("dashboard"))
@app.route("/dashboard")
async def dashboard():
conf = await discord.authorized
if not conf:
return redirect(url_for("login"))
you're still using css classes in an html file
you clearly dont know what a framework is
ty
try it out
np
hi
i dont get why people try to troll in servers meant for discussion about stuff
may dsalgo kayo
bruh... nvm
what?
im karlo im desperate?
Off-topic channels
There are three off-topic channels:
โข #ot2-the-original-pubsta
โข #ot1-this-regex-is-impossible
โข #ot0-fear-of-python
Their names change randomly every 24 hours, but you can always find them under the OFF-TOPIC/GENERAL category in the channel list.
Please read our off-topic etiquette before participating in conversations.
what happens on replit
If any of you want to review a minimal Django & DRF based API project, here it is:
https://github.com/Ksenofanex/stock-management-api
Any kind of constructive criticism is welcome.
Does anyone have any experience with using channels and django before?
Because I am getting a WebSocket connection failed error
Hey I have a question, I am very new to web development and stuff. Someone wanted me to add a function to their code and only gave me the file which directs me to the web
and the code is on the developer page thing but how do I edit it? I tried making some changes but it wouldn't let me save them
Some would say pip install django
You can't make changes to the website's code as a user. You need to ask the person to give you access to the code (can be done through github) and then restart the website with the updated code
Has anyone set up a simple Digital Ocean droplet soley to use its ip address to redirect an old website to a new one? I have the droplet created but I don't know where to go from here. I was asked to drop a simple text file to see the page live, but how do I get to that? I have an ssl cert installed, but was asked to open port 80 then redirect that to 443 and then I would need to redirect from there to the new website. Any help or tips would be great.
Does anyone know about decent articles or tutorials or resources in general for UDP sockets in python 
I'm not too knowledgable about DO, but if you edit the CNAME record of your old website's domain to the IP of your new website, whenever visitors visit the old domain they will be redirected to the new one. That's an easy way if you can edit them.
Alternatively you could use nginx to redirect users that visit the site without changing any records.
hello guys mind i ask something how do big companies like google microsoft build their website like they use only one backend framework ? or they use a frontend framework and create a rest api from a backend framework
google and microsoft both have 500 different websites that probably all use a different mix of stacks
if you are trying to figure out what to use for your own project, pick whatever you are comfortable with or want to learn
hey, i'm working with flask to make a private file upload service for myself and it works great, the only issue is the server denies files that are too large in size
is there a way to increase the content-length header for a single path without changing it for the entire app?
because that's what settings MAX_CONTENT_LENGTH does
thanks
I Still waiting ...
For something very simple Flask is easier. Django does a lot more but is more involved
Thank you for the response! I was able to figure things out and get the redirects working.
anyony good with html?
use this https://github.com/byteface/domonic
whats this?
a lib for working with html
can http.server use another python script to serve different pages
what do you mean?
what's in script.py?
if i may ask
You have to check out an apache tutorial or documentation
hey so i made a code on visual studio code
and i'm trying to upload it to online website(something like google sites or anythign that's free)
and make it interactive so like user can input a setence to a website and it will return the output
is there a youtube video i can follow?
So the "=Predicted as: 'tech" would be returned by the website
You may need flask and php check out this for an-example @native tide https://github.com/imMatt/Learncode
But nothing
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<form action="{{ url_for('delete_post', post_id=post.id) }}" method="POST">
<input class="btn btn-danger" type="submit" value="Delete">
</form>
</div>
im using bootstrap, why is my Close and Delete buttons misaligned?
I dont think the code is wrong?
Hey everyone, I am currently in my 3rd year of Engineering and I am familiar with Python and basics of C++. And now I am thinking about learning either Django or JS. Can anyone guide me?
I have started learning about Django but having a hard time learning it Since I don't know from where to start?
hey sorry to bothering you but, is there someone who know french and know well django/frameworks?
i mean like can i server a page from script.py and how would i do that. its just an example
if to learn Django, I would recommend starting from documentation, they have tutorial to learn it in 7 steps
https://docs.djangoproject.com/en/3.2/
if documentation is not enough, there is more comprehensive way to go with books
Django for beginners
Django for professions
Django for API
by William S. Vincent
If to learn Javascript, I would recommend this book
https://www.amazon.co.uk/Head-First-JavaScript-Programming-Freeman/dp/144934013X
if to learn HTML/CSS, similar book "Head First CSS" exists.
hi can someone help me: im running a flask app that run on the local wifi on host 0.0.0.0 and port 80 and its work on my pc but whan i run this on my raspberry pi zero w2 it shows me this error:
PermissionError: [Errno 13] Permission denied
can i get an help pls ?
wait
yes
i cant send the full error
this is the code:
import glob
import os.path
from werkzeug.utils import secure_filename
from flask import Flask, request, redirect, url_for, render_template
app = Flask(__name__)
@app.route('/')
def index():
return "{'msg':'welcome'}"
@app.route('/send', methods = ['GET', 'POST'])
def upload_file():
if request.method == 'POST':
f = request.files['file']
f.save(secure_filename(f.filename))
return 'file uploaded successfully'
@app.route('/get/<path>')
def get(path=None):
if path == None:
return "{'msg':'please enter a path'}"
else:
for file in [val for sublist in [[os.path.join(i[0], j) for j in i[2]] for i in os.walk('./')] for val in sublist]:
if path == file[2:]:
return open(path,"r+").read()
return "{'msg':'please enter a valid path'}"
"flask run -h 0.0.0.0 -p 80"
if __name__ == "__main__":
app.run("0.0.0.0", port=80)
at my pc it works
so you know what the problem is ?
@native tide
you here ?
no
ho wait yes
33
umm
no its no
its not telling
i cant
its to long
yes
see
wait
whan i run this with sudo it show me this:
pi@backup-server:~/Desktop $ sudo flask run -h 0.0.0.0 -p 80
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://0.0.0.0:80/ (Press CTRL+C to quit)
Bind to a different port
One recommended way is to use systemd to run gunicorn listening on a Unix socket and use nginx as a reverse proxy to host on 80 and 443
still idk what this is
80 port is forbidden by default unless run with sudo/root in linux systems
not sure why, I have the same
nevermine i fixed that
u can run freely with 8080 for example
Ports 1 to 1000 are reserved by the system for various services. I believe it's generally to be secure by default. This is a good example of not exposing an insecure Dec server over the default HTTP port which would allow an attack vector if the server was left running
It also means users cannot mess with key system level services if they were running on the server
Why in Python3 is no function to handle PT ISO8601 string?
For example PT32M5S
I am looking for well-experienced python web developers. Please DM me if you are.
flask
without a doubt
you'd have to write less code with flask and tailor it to your task more easily
@native tide you can use here for html asking
ah thx mate
need some help with html, ping on reply pls lol
what is your question exactly tho lol
just someone to check out my site and tell me how to clean it, and also image importing and how to place it at a specific area
ah
Boring website i made, check it out idk u might find some code you want and copy and paste it
Super silly, no styling to the site, but sort of fun. Surprised me with snake game
If I want use a discord bot to store a message/post (as a Postgres text field or in a file), and then using django to render those fields/files in html; am I barking up the wrong tree? Should I just be looking for a CMS like ghost or jekyll?
It seems like all the functions/views/classes are there in django (and postgres + python + django play together nicely) but it feels like there could be a lot of attack vectors if it gets opened to other users.
Not sure about how you're doing it, but I think there's a "get element size" and "set element size" variable in JS, and there are a lot of options for sizing in CSS.
in any situation when your content/border/margins are misbehaving apply this property first
box-sizing: border-box;
and just use width, height CSS properties
@heavy ferry and especially never try resizing such simple element with JS
anyway, if u wish them matching in size... they just should be under one shared div
60px is height or width?
lets assume its height, make the div wrapping them as 60px
and inside let the elements have the height 100%
this will make them possibly not centralized though.
dispay: flex;
justify-content: center;
aligh-items: center;
flex is quite well able to center literally anything.
Rationale? If it's due to complexity, I totally agree. I really dislike JS...
it is not about disliking or liking, it is about best fitting instrument
let HTML be telling structure, let CSS/SASS to style
let javascript to handle data model and to do everything else that first instruments can't do, but full programming language can
True, true. Having all the layout in CSS makes the most sense.
Is that a general guideline for other areas? Having the implementation being according to tools? Or is it sometimes valid to keep the tool all in one place?
(i.e. in an integrated project, to have all the software according to purpose, or to have he purpose across different software according to best software?)
(not sure if my choice of words is good there)
software is made in 5 steps
Planning, Analysis, Design, Implementation, Maintanance.
at Analysis/Design stage we evaluate best fitting instruments, according to project requirements, and according to human resources we have.
basically, we can be wishing to use specialized tools for everything, if we have need in them and we know why they are better than general purpose tools
but not everytime we have knowledge how to use them or why we need them, and learning them requires time that makes projects delivered later
it is all about skills we already have, and risks we have to learn them instead of using already known tools
Hmmm, so if the design was compartmentalised or delegated into the roles of the team members, it could make sense to have less ideal implementations of a service/tool... yeah... Project Management would be hard to get right. Lots of communication and comprehension.
less ideal implementation when it is delated to another team member?
the purpose of delegating to specialized member is usually so he could invest more time and experience to make it better than all around general purpose developer or developer that is not knowing how to do that at all
but eventually this is collaborative stage... so all around developers participate in this part always
as well as all other participants
Ah, I meant just general-purpose delegation. Sometimes you don't have enough people in the team so the closest one to competent in the task is the one that gets given a task that they "just have to make work".
yeah, yeah, yeah
im using bootstrap rows and cols does anyone know how to align the text inside of it to be center vertically
