noneofurfuckinbusiness
U should add media before
Anonymous
I am trying to build a web application which shows the current value and positions of bitcoins. I am fetching the values from an API endpoint and able to display it in a table format. Now i need to update the values without refreshing the page. For that what method should i use? I heard some solutions such as: - Using AJAX and JQuery - Using Celery and Redis I dont have much knowledge in Javascript, im ready to learn it if necessary. Which method is better for my problem? Is there any other solutions to this problem?
noneofurfuckinbusiness
👍🏾
Mr.Perfect
Hello guys anyone know how to add coupon code feature to Django Website..? If yes please let me know. I'll share my source code.
Anonymous
i wanna write api for a model in that model i have client (Foreign key) and wanna show a client name and in the client’s name all products which contains clients id
Anonymous
who can help?
Anonymous
?
Anonymous
class Person: def init(self,first_name,last_name,address): self.first_name=first_name self.last_name=last_name self.address=address class Worker: def init(self,employment_date,employee_id,department): self.employee_id=employee_id self.department=department self.employment_date=employment_date self.job_group=job_group class Employee2(Person,Worker): def init(self,first_name,last_name,address,employee_id,employement_date,department,job_group): super().__init__( employement_date,department,job_group) def get_details(self): return 'First name: ' + self.first_name + \ '\nlast name: ' + self.last_name + \ '\nEmployement_date:' +self.employment_date +\ '\nEmployee ID: ' + str(self.employee_id) + \ '\nJobGroup:'+self.job_group +\ '\nAddress:' +self.address +\ '\nDepartment: ' + self.department kim = Employee2('Kim', 'White', '12/08/2020', 4556655, 567, 1121, 'Developer') print(kim.get_details())
hi there, I am trying to connect my project to a mysql db , I changed settings into DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'covid19', 'PORT':'3306', } } and got this erre django.db.utils.OperationalError: (2003, "Can't connect to MySQL server on 'localhost' ([Errno 61] Connection refused)")
also made changes in __init__.py import pymysql pymysql.install_as_MySQLdb()
anyone knows how to fix this error?
you need to specify a USER and PASS ( if exists )
i think the error is in the port somehow, I changed the port to 8080 and the error changed
kuzmich
anyone knows how to fix this error?
just follow the docs and u'll get through
Mirco
i think the error is in the port somehow, I changed the port to 8080 and the error changed
I don't think you have changed MySQL port, that one is the default one
Игорь
Hello guys! How can i get that on Django templates? I have title with 6 words. I want get first 3 words and other words. I want to split the title into two parts. With one tag, print the first part and the second tag, the second. I know, for first 3 words I can use filter truncatewords. But, what I can use for other words? 4.5.6... Thanks
Abd Ur
Any one blockchain developer here?
Doragonsureiyā
Any one blockchain developer here?
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z!" Just ask directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
ابو السباع
Hey everyone. I am very new to Django. Can someone point out a good tutorial on getting started with Django?
Spence
Dennis ivy YouTube
I love his work too💪
ابو السباع
Assalauagaleikum! There is a website called Django Girls.
و عليكم السلام و رحمة الله و بركاته. رمضان مبارك. Thank you! Do you have the link?
Akash
Why do we need json? What is the real use? Why do we need data in that format? If I created a website with django in backend, where does json come in this picture? Can't the website function well without json?
âshîsh
Why do we need json? What is the real use? Why do we need data in that format? If I created a website with django in backend, where does json come in this picture? Can't the website function well without json?
Because easy to read format Creating dB from objects in JSON format is great It's in dictionary format, so python operations can be easily applied I mean JSON is good to use overall
Akash
Isn't there any other way?
âshîsh
Format
Akash
Yes in dict form
So json in between backend framework and SQL to transfer data. If there is a web app built in django that contains user data. Then django uses json to create, delete or get data from\in database
âshîsh
Are you asking or telling ?
âshîsh
Akash
Im really confused after reading so many articles and watching videos
Akash
People only define what it is and won't say how it is used
âshîsh
You need to know your goal first then according to that, search it. Else you will waste your time by learning and reading each and every article.
Akash
bro.
Akash
I created the frontend
Akash
Linked the frontend with django.
Akash
I'm yet to move to the models part, where database will be used
Akash
I got a vague idea about it.
Akash
I just want to get the data from database and show it in front end.
Akash
So in this picture django acts as a middleware right?
Akash
Like something that connects the database with frontend?
kuzmich
Like something that connects the database with frontend?
in order to communicate between applications, services, whatever it might be javascript's team came up with the solution called JSON every other languages took that for granted
kuzmich
it's the same as, let's say, UTC (Coordinated Universal Time). People agreed on that and life goes on
So that you don't need to worry about anything else, you just use it and it's ok
Akash
How do you use json?
on
Hi
on
I cant find ht access file in Django
on
Where can i find that file
on
Iam working to install ssl certificate in Django can any one plz help me
kuzmich
How do you use json?
just imagine you have to login for example the fields are email and password you make it to be a json {"email": "myemail@email.com", "password": "_password"} then you send a request to the server with that json then server does its work: 1. it checks if this email in the database. if not send response back in json format that can have a message: {"message": "There is no account with this email."}. You can display it to the user on frontend 2. If there is user with that email. Then check password. If it does not match then send response back with the message: {"message": "Wrong password. Try again."} 3. If it's ok. send response back that says : {"message": "success"}
kuzmich
it's just a silly example, you can have whatever you want in response
kuzmich
How do you use json?
also it should have a validation you don't wanna even try to go to the database if email is not a valid email 'cause it doesn't exist
kuzmich
How do you use json?
and you should validate it on frontend as well in order not to send such a request
kuzmich
How do you use json?
you can ask why... you can send a request from postman for instance that's why you need the validation on both sides
kuzmich
i hope i made it clear for you
🏁 🏁 🏁
how to make django site start faster?
𝓙𝓪𝓶𝓸𝓵𝔁𝓸𝓷
how to make django site start faster?
It’s all up to the quality of your code
🏁 🏁 🏁
which Django will run faster: one file with 10 dictionaries, or 10 files with 1 dictionary each?
W
Hi Dudes, Im working with pisa from xhtml2pdf LIB in order to get a pdf. That works OK, but i cant figure out how to attach the generated pdf to a MIMEMultipart in order to send it in an email. Anyone dealt with this? I would appreciate any help on this!
Nathaniel
Please I want to jump into Django rest framework. Any recommended videos for me
Anonymous
hey, I'm new to coding . i'm building a web app. which takes some input from user and runs some functions and shows the out put. there are multiple functions which takes much time to complete. my question is can i run it in background as multi threading. ? while user can do another jobs. any helps appreciated. thnaks in advance
T I T T U
Social media integration using Instagram login showing errror
T I T T U
Error- Oops an error occurrd
googly
Social media integration using Instagram login showing errror
App cache and data may be corrupted so that we see error. ... Go to Setting >> Go to Application Setting (In some devices application setting is named as apps). Go to, All the apps > >Find the Instagram >> Clear Cache and Data. Once you have clear everything, Next you need to Force Stop the application.
googly
Try this
Rup
to make post is this necessary to build a form or we can just define function.?