|
Thermopyle posted:Here's a neat thing I've been doing. Could you explain this like I am 5? What problem does this solve?
|
# ¿ Jun 7, 2018 23:00 |
|
|
# ¿ May 15, 2024 09:52 |
|
Any tips for hiring someone to develop a Django based site when I personally don’t know much about django and am just becoming handy in Python?
|
# ¿ Nov 9, 2018 08:02 |
|
I wanna start baby’s first Django project this week, basically displaying a subset of a pandas dataframe in a bootstrap table based on url strings. I picked out a bootstrap theme I like. I watched sentdex’s Django tutorials and it seems pretty doable. Copy paste some static stuff, add some jinja things, seems easy enough. What are packages like this for? Would it make getting started easier? https://pypi.org/project/django-bootstrap4/ My current website is with weebly and I’m thinking about redoing it. It’d be nice if my nontechnical cofounder can make minor edits with a WYSIWYG editor. Should I got for djangoCMS? Is this useful: https://github.com/divio/djangocms-bootstrap4
|
# ¿ May 28, 2019 02:00 |
|
I think it was in this thread that someone had an issue with their site loading already "pre scrolled down" or in the middle of the page. I'm having the same issue, does this ring a bell to anyone?
|
# ¿ Jul 29, 2019 11:55 |
|
KICK BAMA KICK posted:How many more times am I gonna be trying to nest like three {% with some_str= [...] %} and a bunch of filters to get a template to display something formatted a certain way if a value exists but something else formatted different if it's not before I realize "just put a method on the model that handles it with a one-line f-string and call that from the template"? f-strings are the best things
|
# ¿ Feb 13, 2020 00:46 |
|
Why would anyone wanting a blog based website not use Wordpress? It has basically everything you need to get writing, SEO your site, etc. way
|
# ¿ Feb 21, 2020 00:51 |
|
I haven’t used them but zapier will let you do web sockets and it looks like it’s super easy. I was gonna give them a try for a mail tracking API I want to start using where the only way they’ll give you updates is a POST via websockets. EDIT in my use case I’m just sticking them in an RDS database so I have some data about delivery times. CarForumPoster fucked around with this message at 02:12 on Mar 28, 2020 |
# ¿ Mar 28, 2020 02:09 |
|
I'm trying to set up analytics tool Segment on a Django project. Once a user has logged in, I want to attribute them with their previous history. The Segment Javascript that sits on my website seems to generate a user id, what I can't figure out is how to use the one it has created nor how to send it one so I can use the code shown in the docs (linked above) on login to identify them: code:
CarForumPoster fucked around with this message at 18:52 on May 19, 2020 |
# ¿ May 19, 2020 17:11 |
|
I need to make user logins for a Django site where I snail mail the usernames and passwords to people and I can't figure out how to externally check if a user exists or create a new user from a python script. Whats a decent way to create new usernames and passwords externally from a django site using a python script? The site hosted on AWS ElasticBeanstalk w/ an RDS database. EDIT: Should I just write a script to SSH into my instance and then try it via the django shell? Is there a recommended SSH via python library? I see a few different ones all looking pretty dated. CarForumPoster fucked around with this message at 19:21 on Jun 5, 2020 |
# ¿ Jun 5, 2020 18:41 |
|
Data Graham posted:Really what's wrong with just adding users through the admin? My sales enrichment team is using an enrichment web app I made to create 5000+ users/year. I want to make a button for them to generate the creds but it complicated the explanation. IAmKale posted:What if you create a new API endpoint to a custom view that you POST a username + password to? It'd attempt to create the user account, or could return a 400 if an account with that username already exists. This sounds exactly like what I want but I've not tried something like this before. Looking to spend max 2-3 days on it. EDIT: https://medium.com/swlh/build-your-first-rest-api-with-django-rest-framework-e394e39a482c This looks pretty easy actually, Ill give it a try early next week CarForumPoster fucked around with this message at 20:46 on Jun 5, 2020 |
# ¿ Jun 5, 2020 20:22 |
|
IAmKale posted:What if you create a new API endpoint to a custom view that you POST a username + password to? It'd attempt to create the user account, or could return a 400 if an account with that username already exists. So using the DRF looks like the winning option and looks pretty easy. I got it up and running pretty fast, got an API token, etc. When I changed from listing all data about all users to trying to return the data for specifically the logged in user I now get the below error: code:
code:
Any help? I don't see how I'm trying to iterate over User there. CarForumPoster fucked around with this message at 15:30 on Jun 9, 2020 |
# ¿ Jun 9, 2020 15:15 |
|
NtotheTC posted:objects.filter expects keyword arguments that it tries to iterate over: filter(blah=self.request.user) where blah is the name of the foreign key field for user on your Case model Man I'm dumb. Fixed, thank you!
|
# ¿ Jun 9, 2020 15:31 |
|
minato posted:I have what I think is a common problem, but I can't seem to find a solution. I’m a Django newbie but this is trivially easy in Dash (Flask) with callbacks.
|
# ¿ Jun 10, 2020 03:40 |
|
Hadlock posted:What's the go to Django plugin for payment processing for an American centric ecommerce website these days Any third party payment processor seems to have a Django version I easily found one for square, stripe and PayPal
|
# ¿ Jul 10, 2020 02:27 |
|
I see tons of django projects with the secret key in the public repo. How much of a security risk is that? Everywhere I read says its a critical one but I dont understand why. What can someone actually do with a secret key? I read its the seed for the hash for the passwords...I take it if someone gets DB access they can then be decrypted or ...un...salted?
|
# ¿ Sep 12, 2020 16:57 |
|
I’ve used Django CMS twice now but not for any good reason over wagtail or mezzanine. Any opinions amongst goons as to one being way better? With CMS I basically install and forget.
|
# ¿ Sep 29, 2020 01:26 |
|
Hed posted:Does anyone here run Django serverless (Lambda, Azure Functions) in production? I have a couple of Zappa sites that are basically landing pages but for anything more involved I still host Django on EC2, with an RDS database if the site is sufficiently complex. I don’t have any complicated ones but yea deployed with Zappa is the easiest route. AWS SAM is good too. For anything with a series of lambdas calling lambdas I use lambda+ stepfunctions deployed with SAM.
|
# ¿ Sep 29, 2021 03:44 |
|
|
# ¿ May 15, 2024 09:52 |
|
Hed posted:If anyone cares I solved this by writing some Django middleware, and putting it higher in the settings.MIDDLEWARE stack than the built-in SecurityMiddleware, such that it short-circuits the response before "Host:" header gets checked in the HTTP request: This actually is helpful, I forgot that we had this same problem 2 years ago and had to fix it until you posted your solution, unfortunately. I still don't recall how we fixed it.
|
# ¿ Sep 13, 2022 15:40 |