#web-development
2 messages ยท Page 3 of 1
tbf e6 api is pretty god tier
yeah, I was surprised it had so much
yesterday I looked at the r34 api
it's literally just this
never had a shot at theirs
reason being I dislike both of their sites
pop up ads out the ass
?
e6's font and formatting look identical to me
r34 is completely custom, but the odds of them having the same font aren't that bad
as for formatting
well, I dunno
maybe it's just drawn porn apis around the world



For someone with zero requests experience and zero HTTP experience, it was very easy for me to figure out
thought i was stroking out for a sec
e6's api is the first I used and I'm glad I started with it
not just cause of the content
I would've started with e6, but r34's just looked so simple that it only took literally 10 seconds to get results
does r34 also support searching by md5?
probably not since filenames aren't md5 and it's not stored in the same way as e6
Not by md5, but you do have access to them afaik
then 20 minutes after I was parsing URLs consistently
funny this gets mentioned cause I'm writing something to sort your local collection by tags by the magic of searching by md5
? after a *,+, or a {x,y} makes it non-greedy btw
greedy?
greedy means it makes the largest match possible
non-greedy means it goes for the smallest
ah
so if you do a greedy search in a book with r'"(.+)"'
It will get the first and last quotation mark, with everything between them
Well, . actually doesn't count as newline so that isn't true
But if you didr'"(.+?)"' instead, it would give you shortest match

So you'd probably get "Huh?" instead of "(Entire book here)"

but yeah, I'm making an application just to browse these sites
wihtout having to open my browser
interesting
I plan on saving search history, having fancy boolean operators, and being able to batch-save images.
next up, start a patreon and sell it to people
hey guys be sure to come by and donate to my patreon
i already donate 10% of my wealth to the church of xnirox
better than the church of xXx_darkwulf_xXx
but yeah, I started all of this because I was grumpy about lack of Boolean operators
if ur not a variation of "shadow wolf" ur bad
I might also implement a soft-search mode, which only requires one of the entered tags
it would just be a checkbox
pretty simple too, just do a search for each set of tags, then merge the results
I should also make it entirely usable in a left-handed mode
No, it was to expand my porn collection and also tag it
And get better searches
cus some sites have crappy tagging, so an OR operator is needed to search for one type of image when the type has three different tags
same
It's weird, but there's an art to browsing porn
it's not a talent, it's a skill
I can tell you I don't have talent. But what I do have are a very particular set of skills, skills I have acquired over a very long career.
Skills that make me a nightmare for images like you.
If you let my tag change go now, that'll be the end of it. I will not look for you, I will not pursue you.
But if you don't, I will look for you, I will find you, and I will report you.
I'm sure there's a portal 2 quote I can doctor to make it relevant but I can't think of any
something something cake
To maintain a constant pleasure cycle, I simulate nighttime at all hours and add adrenal vapor to your oxygen supply. So you may be confused about the passage of time. The point is, yesterday was your birthday. I thought you'd want to know.

Very impressive!
(Because this message is prerecorded, any comments we may make about your success are speculation on our part. Please disregard any undeserved compliments.)
heyy.. I am new to programming. I just wanted some information. What is django and whats it used for? (is it just for web development)
its a back end web development framework, one of the two most popular used with python.
but i wouldnt really recommend it for programming newbies, it is a really advanced tool/framework
I use it for sending myself reminder mails, lol
i mostly use flask for...... anything that needs to accept http requests
k. thanks.. i was just wondering because i kept on hearing it everywhere,
what other web frameworks are there that are easy and quick? @strange thorn
flask is the kind of epic antagonist to django
django is this "we help you a lot, give you less freedom but you cant do mistakes in exchange for that"
and flask is like "do whatever you want you may do amazing stuff or may do some horrible mistake an everything fails"
flask is simpler in my opinion
^
from flask import Flask
app = Flask(__name__)
@app.route("/")
def index():
return "Hello there", 200
app.run(port=3000, debug=True)
like this is what you have todo in django to display some basic html page: https://stackoverflow.com/questions/15674257/displaying-simple-html-pages-django
and this would be some very simple flask code for that
import flask
app = flask.Flask(__name__)
@app.route("/")
def index():
return flask.render_template("index.html")
app.run()
django makes me cry a little everytime i see it
two idiots one thougt huh? @kind steppe
from flask import Flask
app = Flask(__name__)
@app.route("/")
def index():
return "Hello there", 200
app.run(port=3000, debug=True)
something something flask
:(
lmao
there is only space for two idiots with the same thoughts here
django give you less freedom
I don't agree :(
I mean it is a bit hard to do stuff indeed, but can do pretty much everything
Django doesn't give you freedom that easy then?
if one had fire fox os and a certified application for it...
i have one of those
Can I set up a custom domain for a Github Pages Project?
I already have franccesco.github.com as my main page in github pages with a custom domain (codingdose.info)
Solved, nevermind 
@deep cave i got it fixed
how do you do that box thing on discord when you want to write some code?
print("HI")
thats markdown
oh and if you want todo short snippets in a sentence (thats the wrong `) print("HI")
``print("HI")``
its important to use those `
and when you should want a syntax highlighter always leave the language in a seperate line
py print("HI")
doesnt work only if its
```py
code
```
py!tag codeblock
If you are going to post code in Discord, please use syntax highlighted blocks, as it makes it more legible for other users.
To do this, you should input your content like this:
```python
print("Hello world!")
```
This will result in the following:
print("Hello world!")
how do u make another line. mine just enter
shift + enter
def func():
print("HI")
while 1:
func()
no
when you havent closed your codeblock yet you can actually do just enter
like when you have
```py
Hi, could i ask for help with a web server project?
xD
this sever is amazing.. active. ๐
Im trying to get a POST message to be listened to by my raspberry pi
ok
And activate a bash script, depending on what data is sent with the POST
I only need one line from the POST, the command data
that is usually a bad idea
activating shell scripts via post
or via remote in general
well
when someone does sql injections he also "just sends a variable" but executes an command in the end
anyway if you want it i wont stop you
Preferably i would send a ssh command
Its between IFTTT and my pi
So if you have a better idea
im all ears xD
well the best idea would possibly be to use sth like paramiko in order to open a ssh session (ofc password secured ๐) and execute the command over that
although one could indeed implement a similar concept with some flask and requests scripts in python
oh
pythons super power is 3rd party man
Cause it gets messy
No like
(a third party one)
what isnt a third party application in your eyes
i (the I here is important there are dozens of ways) would prbly use requests module on client side and setup some tiny flask based server on server side (both 3rd party libs for python) and exchange data via those
I meant 3rd party applications*
flask is a library
you can do anything with it
alright
Ty
also
I don't quite understand how Port forwarding works completely. If i have a port open... is it only linked to the device i set?
So if i switch it off.... the port is useless?
Thats my problem xd
executing commands from outside your network is nearly always a bad idea
There are so many ways this could go wrong
what i thought ;-;
Yeah
Out of interest
Is portforwarding of any type bad?
E.g ssh?
Portforwarding itself is ok the question is what service is running on the port
Anyway if you don't have any questions left I'll do my lineage os updates now @shrewd sand
takes that as a "no questions left"
@strange thorn in case your interested, I found a useful software for doing this https://www.triggercmd.com/
seems to be a good ulternative
You pinged me ๐ค

hullo if i were to get into web development with python, should I be going with Django?
A lot of people here recommend Flask
ah ok what is the difference between them?
You would have to wait for someone else if you want specifics, but generally Django is more verbose
aight thanks flask i shall go with then LOL
How's Django more verbose? @cyan pilot
I was referring by vague memory of the convo on the 21st in this channel
Django is more opinionated. It comes with many batteries included.
Flask is far more barebones. A Flask webapp can be a single file with a couple of decorated functions.
you can extend Flask to be as comprehensive as you need it to be
with Django you don't really have a choice. It has very strong opinions about how you should do things. It wants you to use a SQL based ORM, have migrations, use class based views, have an admin panel
but on the other hand, Django will also force you to be more secure, and most of the batteries that come included are very good batteries.
they're both good, they're just extremely different. Flask is far more forgiving for beginners, because it lets you just write exactly what you need and learn one thing at a time.
Django throws you into the deep end and requires you to understand a great many things before you can really use it properly.
I think Django can be a great choice for professionals that happen to agree with the various methodologies and modules that Django so devoutly subscribes to.
Flask is far more versatile, which is why people love it around here. You can do anything you want with Flask. With Django you shouldn't try to do anything you want, you should just do what Django wants. And Django is a reasonable guy.
, but generally Django is more verbose triggered
use class based views, have an admin panel
No and no
someone calm down we already had the discussion
django gives you harder access to freedom
than flask
that's.. no.
No I'm just fixing couple key points :'c
I mean you can use functions simply
And you can very easily close the admin panel in the settings
just because you can do all of these things, doesn't change the fact that it's not what django prefers.
django makes it very clear how it wants you to use it.
you can disregard all of those opinions but at that point, why even use django?
Welp, didn't know that it wants me to use classviews
Don't really know why are you even saying it xD
I'm using functions and they do the job pretty well
I mean I agree with everything else but don't know this particular point
the reason I say that is because if you want to use any of djangos generic views, you need class-based views so you can inherit from them
and the generic views are useful.
to be sure.
and you don't wanna be mixing the two approaches.
Oh, I really don't use them and don't even know most of them since I want a bit more freedom than usual
so it's usually a better option to just go class-based from the get-go.
to be clear, I'm not saying class-based views are in any way inferior to function-based views.
I prefer them.
but it's just that django sort of assumes you're using class-based views when it comes to some of its internals
like generics.
and that assumption is an example of how django feels opinionated.
Welp, I guess you are right then
I used generic views when I built a CRUD back in the day
and they served me well - but I do think perhaps that for larger projects, people never use them.
they're frequently employed in django tutorials though
because they abstract away the actual view logic so you can have something up and running much faster
iirc djangogirls uses it
which is a good tutorial btw
they're one of those girl coding workshops
and their official tutorial is pretty well written.
Yeah I saw them too but it feels like they are rather for simple views
(for learning absolute basics)
huh neat
the only "girl coding workshop" i seen was kode with karlie
and it gave me terminal cancer
I'm not sure how to extend them to my huge views
you can't.
they're just for simple stuff like listing a model.
but herein lies my main concern
why is Django offering a tool to do something that beginners would love to do - a simple way to list a model
but forcing you to use class-based views (which are kind of complicated to fully comprehend for a beginner) to do it?
and is it really useful to abstract listing a model, or could it be more benficial to have to write exactly that sort of thing when you're starting out? it's a good way to learn how ORMs and templates are supposed to play together.
Yeah that is weird but just use functions instead, I mean the main things are pretty much the same with them too; I mean everything has a weird part just like django
sure.
has anyone managed to implement discord OAuth into their web app? I'm trying to do so using https://github.com/pennersr/django-allauth, which kind-of-worked initially, but now when trying to log in I just get UNKNOWN_ERROR. goal is to allow users to log in and "connect" django's permission system with the guild permissions from discord
@meager anchor We're using flask-dance for it
It has a specific module for Discord
As for django though, I have no idea
yeah, flask allows you a bit more freedmo about configuration D:
i'm gonna retry with the allauth thing for the third time, maybe i get blessed and it works
Haha, worth a try
It's getting somewhere, at least
except that this framework decides to append random characters to my name if a django account for it already exists ๐ค
hey i mean at least its API is well documented /s
hey django is well documented ๐ฆ
but this oauth thing isn't, I literally have no idea what it's doing
Should I start learning django or databases first?
databases could become more useful
Okay thanks ๐
like you do webapps with django and there may be db in it but you can do more than webapps with db
I assume mySQL is the most popular one
not use mysql
for a lot of reasons
go with postgres if you want an sql based one
danke
np
this is complete hell
i've been sitting on this issue for like 2 days now and made almost no progress
the package is very poorly documented and customizing default discord oauth provider is not proving to work properly either
right now the library only saves data from the /@me endpoint
which is this
but I also need to access the guilds data, and since i have no information on how to request further user data whatsover I tried making my own provider
or well, "adapter"
now I have this... with """commented out""" body ```py
import requests
from allauth.socialaccount.providers.discord.views import DiscordOAuth2Adapter
from allauth.socialaccount.providers.discord.provider import DiscordAccount
class CustomDiscordOAuth2Adapter(DiscordOAuth2Adapter):
"""
guilds_url = 'https://discordapp.com/api/users/@me/guilds'
def complete_login(self, request, app, token, **kwargs):
headers = {
'Authorization': f'Bearer {token.token}',
'Content-Type': 'application/json'
}
profile_data = requests.get(self.profile_url, headers=headers).json()
guild_data = requests.get(self.guilds_url, headers=headers).json()
extra_data = {**profile_data, 'guilds': guild_data}
return self.get_provider().sociallogin_from_response(request, extra_data)
def new_user(self, request, social_account):
return DiscordAccount(social_account)
"""
and set it up to use this. now I have no idea why, but for some reason when I tell it to use the direct subclass of the adapter that works it stops working
although complete_login is the only method I need to override, if my logic isn't wrong
i gotta admit this is too deep in the lib for me i guess you will have to find someone who knows it sry
dw about it
you need to other scopes @meager anchor
I assume allauth.socialaccount.providers.discord.provider gives something like that
yeah scopes are customized
SOCIALACCOUNT_PROVIDERS = {
'discord': {
'SCOPE': ['identify', 'guilds']
}
}
you just need to get to the guilds endpoint
that's what I'm doing in the complete_login method
and it's just not appearing there?
no, it doesn't even get to the point of logging in properly
I keep getting attributeerrors for seemingly unknown methods
although I'm subclassing the adapter with which it worked
This is the issue with un-documented middleware
If you are feeling fancy it's a lot easier making a class to manually work with OAuth2
hm
Discord docs even use python for their oauth2 examples
yeah I looked at that before
but then I'd have to integrate all of that with Django manually
i suppose I could add a function to the discordaccount class to fetch this information later
It's at minimum only two extra functions, both just sending and handling requests
or use something like https://pypi.org/project/python-oauth2/
well
I've looked at alternatives but I didn't get them to work and now I have this which almost works, but I just need to customize it. but thanks to its horrible documentation, it's near impossible
next weird thing, the oauth2 dialog on discord tells me nothing about the service not asking for my e-mail yet for some reason it's there
i give up w/ this for now, need to learn front end anyways
handler404 = 'mainsite.views.handler404'
handler403 = 'mainsite.views.handler403'
handler500 = 'mainsite.views.handles500'
Okay never mind
it is handler not handles
๐คฆ
Is there an online service for testing HTTP stuff?
Oh my that is so cute
Postman is great, I use that
Me too
ey guys i am at a point where i have to fiddle with css and html shit....
what would u reccomend for a django page?
bootstrap 3. or 4.?
or something entirely different?
I don't think the html and css have anything to do with front-end
It greatly depends on what you want
well iam trying to learn about python as my most general goal.
the best opportunities to make use of python in my own sphere are to create something I and maye others actually will use
so after trying pyqt5 i realized that noone ever apart from myself is going to use anything i built with that
so i came up with the idea that if i ever want to have someone else make use of what i produce a website is the best choice...
so i went into django (cuz thats the best way to make stuff "right"... i heard)
learning how to use Database with Django was fun
also using its server to present the Data from the Database in a webbrowser is the way i prefer
so now since i have a project my friends are interested in using if i can provide them easy access too
i also want to learn how to make the websites i create visualy appealing...
so atm i just want to gather some oppinions on what is the most efficient and maybe also most rational approach to learning about
making sites beautiful
could be that certain stuff in things like Bootstrap are not wise to use in combination with django
basically i know shit about css and only very basic on html
so i dont want to spent the next weeks learning about that on a broad spectrum but just get comfortable with a thing like bootstrap
i guess i answered it myself now....
using bootsstrap via maxCDN is super easy and does the job
Bootstrap has nothing to do with Django dude
Use whatever you want
I like bootstrap personally. You can look at the pythondiscord.com site source to see what we do
def staff_member_required(view_func=None, redirect_field_name=REDIRECT_FIELD_NAME,
login_url='admin:login'):
"""
Decorator for views that checks that the user is logged in and is a staff
member, redirecting to the login page if necessary.
"""
actual_decorator = user_passes_test(
lambda u: u.is_active and u.is_staff,
login_url=login_url,
redirect_field_name=redirect_field_name
)
if view_func:
return actual_decorator(view_func)
return actual_decorator```
This is the django's decorator to check if a user is indeed a staff member and if not this little guy redirects them to django-admin-login
I do not want to edit the source code in anyway(why? no idea, should I?) so my question is this
urlpatterns = [
url(r'^admin/', my_magic_decorator(admin.site.urls)),
]```
Can I do something like this which redirects to my desired url instead of `'admin:login'`
Or that which raises a 404, really doesn't matter
I'm asking because I'm having a hard time understanding decorators fully
It looks like you just supply it as the login_url param?
Yup
Just changin that there would probably solve my problem but no idea if I can do it without changing it there
Is it obvious and am I not seeing it?
That's more of a django question than a python question I think
"I don't understand decorators" is a python question
I don't, I don't know if I can change the login_url that is hard coded here with a decorator
Yes, you can
guys calling a JS library client side as such js <script src="https://www.howsmyssl.com/a/check?callback=parseTLSinfo"></script> dangerous?
Unlikely
Browsers implement a sandbox so for the most part that's safe
Okay then. Just out of curiosity, when would it be a vulnerable implementation?
It shouldn't be unless someone's using a browser without a sandbox
But as far as I know, that isn't a thing that exists
Well there may be ways to get out of the sandbox but for that someone would have to find a vulnerability in the browsers js engine
An official book for working with the Bulma CSS framework has been released.
https://bleedingedgepress.com/creating-interfaces-bulma/
15% off with the code: BULMALAUNCH
Guys if i am sending a web server the following JSON object: { 'potato' : 'new'} and it replies back with a JSON object as well. What should the server be expecting for it to reply with its JSON object?
I am asking because i am more of a security guy, and I am testing how null byte should be handled server side
please ping me if you can answer me or wanna ask for more details
that makes very little sense
are you saying "if i send this and get this what should i send"
{ 'x': 'y'} -> {"z":["a","b"]}
My question is: What is the web server expecting, and how does it process it? Just asking for experience
gathering knowledge on the matter
That is a case to case thing though?
For example, api.seph.club is not expecting the same thing as discordapp.com/api
Is there a jo.seph.club
asking what to use to trigger something you want without having any docs about the server is impossible
as of now no but that is smart aperture
sad
Yeah what @strange thorn said
its like
@mild bridge was also thinking jo@seph.club tbh
Okayyy, I get your points
ooo
you use a random word to try to say hello in chinese
that's also nice
@strange thorn bonjour
uuuh french
@strange thorn Bread
i shouldnt have said that
lmao
haha
wait fuck
you didn't see anythin
but now they don't know it's me 
what about now
which channels?
what y'all doing in #web-development ?
weeeeell
back to the null byte question @dense sapphire
the webserver will just handle it normally
there was this guy asking some more or less unsolvable question and i had some funky idea to answer it so we ended up here after some time
@kind steppe i am receiving a certain response though from sending a %00 ๐
you could
a valid response
then the webserver does not see it as an issue
and why should it? it's just a character after all
I'm off for my tea
just open chrome open dev tools record network traffic copy the ones you are interested in as curl go to curl to python converter and BAM python code for interacting with the server
i am interpreting requests and responses on burp
just saying what i would/do usually do for finding out how stuff interacts if there is no docs
Who is ducking?

Mihow
I'm wanting to learn more about web dev using Flask to get started. Without a website to test with is their a test environment I can use or do I have to setup a webserver?
Your own pc will be your webserver.
In your browser you just browse to localhost:<port> or 127.0.0.1:<port> to go to your website.
ok I think I just found a good tutorial for flask mysql on a localhost. Ty as always you guys are great
HTML and CSS control how web pages are displayed, but they are not programming languages and cannot change the content of the page after it has been rendered
if you need to change the structure of your webpage after it has been sent to the client, you need JavaScript, which is a programming language the browser can execute
does that answer your question, @fiery kestrel ?
HTML and CSS are like a blueprint for a house. When someone wants to see your webpage, you send them a blueprint and their browser builds it. If you want to change how something is displayed and send them a different blueprint, you change the HTML and CSS you send to them. If you want the blueprint to change AFTER you have sent it you need JavaScript.
Jinja is a templating engine
oh
maybe they mean google chrome?
they mean the google search results.
you can change what they say, but you can't swap their positions.
oh
sorry, my dude.
@mild bridge yes ofc... i dont know how a 'web dev' sees or understand the question, sorry
just to be clear
@fiery kestrel you're saying
you wanna swap the position of the blue and green parts?
on google search?
for your page?
if so, it can't be done.
@deep cave yes
sure. are you trying to just do it for your computer?
or for the google result itself?
yes
ye
I have no idea why you would want to, though. it would look far worse
okay.
well then I suppose it is possible, yes.
aperture mentioned writing a chrome extension, that'd be the way to do it.
and yes there'd be JS involved.
but for just swapping two elements it shouldn't be too complex.
this looks promising
monkey patch the css
lol
:^)
OFFICIAL PYTHON DISCORD CHROME EXTENSION
let's have it detect pictures of people on websites
and glue josephs face onto them
done
hahaha
josephify
your
chrome
it also detects any avatar you might be using on google, facebook, twitter etc and replaces that with joseph. and it changes your usernames to joseph.
so that you can be logged in as joseph, too!
same
ok brb
currently seeing if I can make a bare extension to change the background of every page to hackerjosephโข
alright, let's see if this works ๐
@deep cave @native tide version 1.0 is up bois
where's my invite
what A levels?
cs biology economics and phyisics
econ and physics are for those half a level ones
- maths
ugh i always forget what theyre called
body {
background: url('https://cdn.discordapp.com/attachments/305126844661760000/413063511455957015/unknown.png') !important;
}
@deep cave how do I stretch to window size
pls help
modify width and height attributes of body?
I'll try that
/* Full height */
height: 100%;
/* Center and scale the image nicely */
background-position: center;
background-repeat: no-repeat;
background-size: cover;``` add this
maybe then itll work
oh
idk
i gave up with css
body {
background: url('https://cdn.discordapp.com/attachments/305126844661760000/413063511455957015/unknown.png') no-repeat center center fixed !important;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
meh nearly had it
okey
ok so i had most of it
lol
@mild bridge not economics
i just realised i said my options
but im only doing 3
see i was going to go with maths
then my brain decided to do way better in biology
and i got asked to do that instead
nice
i miss maths
maths is fun
more fun than physics :'(
yup physics is just memoring equations and explaining experiments
Maths Physics CS and Economics here
hi
hi there
I'm trying to answer this question, but I know next to nothing about how mobile/web apps work:
Say you are trying to upload a photo to share with a photo sharing app. You see a non-specific error message, like "Sorry, something went wrong." List all the ways you can think of to try to fix or work around the error.
any ideas?
what does conn stand for
connection
oh and of course
maybe something during transmission went wrong so try again
also can u elaborate on this: "check if the server is aviable"
Well there are multiple ways for example if the Devs have something like discords status (just Google discord status) you could check for that
If you are bored you could try to get the IP and port of the server and ping it / check if the port is open.
what is a port
For example a MC server yes
So in order to make things easier some very clever persons thought of ports a port always hosts one service like a website a MC server etc
(ofc ports can be closed to if no service is running on them)
Try to get the IP and port of the website's server and ping it. Or check if the port is open.
does that sentence make sense
like
is it the app's server?
although check if the port is open CAN (not is can) be illegal
its a grey zone
and yes
i never said something about a website
so should i switch website to app
i am a high school student trying to get into this summer web dev bootcamp hosted by google inc
but like
It's due at midnight
breakpoint setting seems a little overkill also, there is a difference between web and phone apps, all this debugging stuff isnt possible if we are talking about phone apps
but jan
you do realize these question are there to find out if you have the knowledge required to follow the bootcamp, if you cant answer them yourself you should prolly reconsider your opinion on this
nah it's for beginners who have never touched this content
like a gauge to see where they are at in the learning process
can gimme the source of the question?
CSSI is a 3-week summer program for incoming college freshmen (current high school seniors) who are interested in studying computer science.
and you are in which timezone?
YAYYYY
I HAVE
MORE TIME
thank you god bless you!!!
i didn't even notice that lmao
which timezone?
Central, why?
think about what?
how much time you had left
okay, I finally figured out how to request the necessary extra data for guild permissions. allauth wasn't as customizable as I was hoping, so I ended up forking it and I now have the data available. Now I want to change the Django user model's is_staff to check whether a certain permission bit is set for the guild permissions, and for that I need access to the associated social account. now I could just assign Staff status and other permissions manually, but I might as well just not use Discord then. Anyways, is there a way to customize that?
will the djangod @kind steppe please grant me his attention

@meager anchor no I hate django
Joph is the flasgod
Yo
I'm working with Sanic right now
in Flask you have session
although I can't find that in Sanic
is there some sort of sanic session?
https://github.com/subyraman/sanic_session you are one github search away
in flask you don't have to store it, its with secret key or smth
ik
Hey guys I'm new here
I have a question relating with Django,I have pycharm community version and it doesn't support css file,I tried creating css file in other folder n tried to link,but it doesn't work,any suggestions?
yes css isnt supported by community
Any way to add it by giving link href to other folder where css is located?
You don't need IDE support to use CSS
It just won't highlight or complete it for you
Hmm,1 sec
<link rel="stylesheet" type="text/css" href="C:\Users\Home\Desktop\website_django\django.css" />
๐๐ฝ ?
i tried to change IDE to eclipse pydiv but i started geting the error -"import error"
Any solution for this?
nvm,abandoned it and made a new one
@marsh canyon should i be using powershell over cmd for python?
no
why?
not really a good reason for it
Not worth it?
yup
Yeah thats what i thought
ty
btw
adafruit.io is what i used intead of a webserver
Its rly good
How do i get my django site running on pythonanywhere?
Did this one help? Did you have trouble with a specific tutorial? Run into a specific problem?
Hm, I included an anchor in that URL but I don't see it on my tablet
Nope, it did send, okay.
the tutorial didnt work for me, im stuk with a module not found error
this happens most of the time
powershell just works fine with me ,i was using the pycharm terminal before tho @shrewd sand
GDPR will be upon us soon. If you run a website or service of any kind, you must be GDPR-compliant. If you are not EU-based, you risk fines and sanctions from the EU regardless, unless you personally take steps to prevent European users from making use of your services.
This article is a great primer on what this means to you as a developer. https://techblog.bozho.net/gdpr-practical-guide-developers/
Is the 'forget me' function also the deletion of the account?
........ That's just a total overkill
So, if you have say a blog platform, you delete the user account, and also the blog posts
You also keep a record of their user ID
That record is used for when you're restoring backups, so you know to not restore their data
The Patrick Mac hardies will come from everywhere
If a user has a profile page, this also extends to search results
So it's important that you make their profile 404 as well
Otherwise the search engines might miss the removal
Reason i was asking is because I don't see the option to delete my profile on a website with wordpress backend, and i'd be surprised if wordpress isn't up 2 date yet.
Wordpress does not have a good reputation
This can be a manual process, by the way
But I imagine most people will want to automate it
@brave mantle can you post a tl;dr of that EU post?
No, not really
It's not trivial
This post is the closest to a tl;dr you will find
Why does the EU do this.......
Wait
What if I have a blockchain service
I can't delete a user there
It would destroy the system
You will need to make sure your blockchain doesn't contain identifying info
User IDs are fine
Ah ok
It's stuff like usernames, emails, addresses, phone numbers, real names
I mean Google has been following this for years
Google has all features requested there
So it's basically a be like Google law
What's missing?
Well let's say for example you're using Google for advertising on your site
The user deletes their account
You will have to notify Google of this
So that they can delete their related advertising data
Yeah but that's a problem solved by Google
That's a client problem
You can request to be forgotten
Yeah, that is Google's problem, but it's not a solved one
No, you have an obligation to notify the third party
Any third parties that have had access to the data you collected
They must also remove the data
That's a guarantee you have to provide
Yes but I mean you can ask Google to delete your data Google has that service
So from Google's side it's ok
You have to take care of that
No, that isn't entirely true
A user with a Google account can request to be forgotten
But if you have a Google ad on a page only accessible to the user - for example, a private profile page
sigh, good luck web dev community
I see
If the profile page URL has a username in it, you have to notify Google
We are basically fucked
This is kind of the "wishful thinking" part of GDPR
The EU will injure major parts of the internet with this
Your responsibility ends at notifying the third party
So if Google doesn't have the procedures in place, that's on them
Of course, you will need a log of your contact with them
Yeah I know, it's tricky
It's a pain in the butt
But it's already passed, so we have to deal with it
feels like they're testing in production
Can I ensure that my app has no EU users
Well that's nothing new @deep cave
No, that isn't enough @strange thorn
You need to ensure that nobody in the EU can even access your services
It's uh, also not trivial
There is always VPN proxy etc
You would need an address verification system
yeah
If the application runs on an EU server but isn't EU accessible is that ok?
Damn
By the way
GDPR goes a bit further than this
If you got someone's details from a third party, you have to give them the same access and rights as people that don't have an account on your site
If you collect any identifying information, you also have to collect enough information that a user could provide you with some data to verify themselves to get that access
This is the paradox of GDPR
Maybe you didn't need an email address before, but you might need it now
..l.. EU
Haha
That's more or less all the big details
There's a few smaller ones
For example, the right to rectification
You must allow users to edit all of the fields of their user profiles
Stuff like that
Yes, usernames as well
It would be nice if the internet community just stopped servicing EU users and let them suffer because of their legislations
I think it's the best Internet legislation the EU has come out with
It's just a pain to implement
The guarantees as a consumer are fantastic
And it puts pressure on America to follow suit
Some of it is super easy to implement as well, but they're picky about it
Like you have to explicitly gain consent for each use of a user's data, which means you can no longer have a huge terms document with a single checkbox at the bottom
That checkbox thing is the most worthless thing.
I bet whatever they'll write there will either not make sense or isn't clear anyway. And since you can't continue without checking everything people just do it anyway.
Ah, well the thing is
Your system is going to have to deal with that too because it requires that users can revoke specific "checkboxes" later
For the rest, like seeing your data and being able to delete your stuff, that is okay.
https://cdn.discordapp.com/attachments/336562029924188160/419780637176627200/unknown.png a couple days ago came across this
You must opt in, must opt ggwp
Well really this part of it is more concerned with marketing and such
So you have to allow people to use your services but opt out of you handing data to the company that does your marketing
Realistically if your service doesn't need a thing to operate, it can be optional
If it needs a thing, require it
I will be able to get back to working on Gear soon
Gear will fully support GDPR
Gotta brb, sorry
o/
Any other questions?
Hi
oke nice ๐
There's no good way to do it
....
You can request proof of identity but
You basically need someone to scan their passport in for you
Some sites actually do this
In other words whenever is set up a website now with user system etc I have serious law problems
Well, the approach given in the guide is probably fine
But honestly nobody knows how they expect us to enforce that
That's how sony does it
about GDPR could you even do email subscription lists anymore
Yes
Yup
since youre storing emails
You have to ensure its deleteable
oh
Erasing isn't that hard
do they fucken expect you to have a self destruct on facebook and some indian hacks in and clears Facebook
It's the deactivation part I'm curious about
deactivation == restrict processing in the article?
That just adding a boolean column to the user table where you filter on in most of the SQL clauses no?
Yea that's true.
It's basically deleting the account without actually deleting it just yet :P
Yeah, I guess
depends what it involves ^^
is each line bolder than the last?
this is what my mac is showing
but my hackintosh it works fine
Yea if i open the link in a tab every line is bolder than the last.
In the discord preview it's not though. (400 is bolder than 500)
I'm using 32 bit palemoon (old version of firefox) on a windows computer
although it could be an issue with your browser, @proud igloo
it works fine
path('', include('products.urls')) is there anything wrong in this? (in main urls.py)
i have an app called products
this is regarding django
and this also please path('',list_products , name='list_products'),
views
from .models import product
# Create your views here.
def list_products(request):
products = product.objects.all()
return render(request , 'product.html' , {'products ' :products})
please check the views and urls,my website is giving me a blank page
which error do you get
@marsh canyon
np,its fixed
hello
what are u making @marsh canyon ?
just a simple website for practise where people post about their discord servers and post links and a person looking for a server can hook up the search for a server he is looking,im not that good at django but im trying to improve my skills
u can find my project(currently in progress) on github
@grand badge
nice
im currently making a school website in django to get practise with making custom CMS's
cool
i got started with django in winter of 2017, itss reallyy good
last week?
how long do u code a day?
not everyday,i do on holidays like 2-3 hours
exams are currently going on so till 26th march im not free,but holidays between exam i code
i dont know jack about authentication in django, ur really good!
๐ im still a noobie tho
๐คข django
u wot m8?
