Роман
bhzad
Hello, good time. Friends, I encountered a problem in Pycharm. When I create a new project and select the interpreter, it encounters a problem when creating the virtual environment. I also searched and tried Site Stacker Flow, but I did not find the desired result. Can you help me? thanks a lot
bhzad
Problem:
Failed to create a virtual environment
Izzat Alharis
bhzad
bhzad
I went through the steps, but the previous problem is still not solved
Artyom
lilobaje
zveroboy_
zveroboy_
And also make sure that ur in system's directory when ur finding the exe file
zveroboy_
https://youtu.be/YypH4XD_Fmc
bhzad
Iliya
Hi
I've set an env variable in a file let's say a.py and after I want to get that env variable in a file named b.py. I tried to get that variable like below :
os.environ.get('pass_var')
but it returned None. Why is that ? Is it just available for 'a.py' ?
𝖇𝖎𝖌𝖟𝖟𝖍
you should take a look at the load_dotenv package
𝖇𝖎𝖌𝖟𝖟𝖍
you can use it like that
import os
from dotenv import load_dotenv
load_dotenv()
SECRET_KEY = os.getenv("SECRET_KEY")
.
Hi, I have a simple question
What skills are required to learn django rest framework
?
Vyacheslav
Can't catch handler404
handler404 = page_not_found (urls)
def page_not_found(request, exception):
return HttpResponseNotFound('<h1>Not found<h1/>') (view)
All seemed to always work, and then it does not work, something has changed, maybe someone has faced?
Vyacheslav
Sorry
Саша
Hi guys!
Vyacheslav
Саша
who made the mailing?
Саша
I need to make a newsletter, but I don't know how yet
Саша
google took away the less security program option:(
Саша
And now I don't know how make mailing in google
Hajri azza amina
Hello
Hajri azza amina
Can someone help me create a portfolio builderapp with django
Саша
Саша
Yep)
Artyom
Саша
Сергей
Then just
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'smtp.gmail.com ' EMAIL_USE_TLS = True EMAIL_PORT = 587 EMAIL_HOST_USER =' my email' EMAIL_HOST_PASSWORD = yor_app_password_goes_here
Сергей
Of course there's 500 emails per month limitation for free tier.
부산
Hi guys.
I am getting this error SMTP AUTH extension not supported by server When send task using celery in Django.
can anybody help me?
Iliya
𝖇𝖎𝖌𝖟𝖟𝖍
𝖇𝖎𝖌𝖟𝖟𝖍
you shouldn't use environment variable to change the application state i think
𝖇𝖎𝖌𝖟𝖟𝖍
env aren't made to be changed all the time
Iliya
the thing is you can not read that variable from other python scripts, if you try you will get none
Jay
Can we pass object I'd to the serializer
부산
Nasir Ahmad
Hello, in Django, I have a model in which I store my list of articles and I want to create another model to select 10 articles from my article model and display only these 10. How should I do this?
..
Why not select 10 articles rather than creating another model?
Nasir Ahmad
Well, I wanted to select 10 articles from this model, it doesn't matter in what way, I just have to choose, that is, it must be selected on the admin page.
matrix
hey guys, could you please review this repo and tell me why am i unable to store the data in db.sql
Sahar
Hello everyone. do you use Stripe for your payment system?
I have a question about it. Imagine a user is doing different things in our system and for each part, he has to pay. We send these payments to Stripe by calling:
stripe.InvoiceItem.create()
Then we create and finalize the invoice for him by calling:
invoice=stripe.Invoice.create()
stripe.Invoice.finalize_invoice(invoice.id)
So if the user has to pay for 3 items:
item1 = 1
item2 = 2
item3 = 3
The finalize_invoice will have an id, total, ...., and:
total = 6
To test if all items are sending the correct amount to Stripe, I have to check the total from Stripe.
In order to write unit test for our payment system, I had to mock Stripe, but the Stripe invoice total would always be zero.
does Stripe has special way to test it? can you help me?
EZNEBEZIM
EZNEBEZIM
void
Rajat
Charan Cherry
Did anyone of you linked react app with django???
Doragonsureiyā
Mirco
Huzaifa
How can i add boilerplate to django...i installed it through pip and added it to installed apps but it is not showing up in html..
Morteza
Sahar
Morteza
Morteza
and a test public and private key
Holla
am seeing this recurison error that i never saw before
Holla
https://pastebin.com/rRXyJdig
Holla
RecursionError at /admin/europe/trip/add/
spignelon
Hey, I am currently learning Django, while I was running
python manage.py makemigrations I got this error, and I am not able to run migrate or log into admin panel because if this, I have searched a lot on the internet and I found nothing useful.
System check identified some issues:
WARNINGS:
home.Contact: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
HINT: Configure the DEFAULT_AUTO_FIELD setting or the HomeConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
No changes detected
Holla
check your models
spignelon
check your models
Someone sent me: https://stackoverflow.com/questions/66971594/auto-create-primary-key-used-when-not-defining-a-primary-key-type-warning-in-dja
Like the warning and the comment suggests,
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
is already added to my settings.py and I have also tried with
DEFAULT_AUTO_FIELD='django.db.models.AutoField'
but I am getting the same error.
Holla
i never defined primary keys that way
Holla
maybe someone will help
spignelon
Hmm, thanks
v6nom 『 🅽🆃🅼 』
Hello i have a file view.py in Django and i want to use the variable start_event1 in a other file
who name is api.py how i can make ?
view.py
py
def form(request):
form_user = Form()
if request.method == 'POST':
form_user = Form(request.POST)
if form_user.is_valid():
start_event1 = form_user.cleaned_data['start_event']
I want this render in api.py
py
sequence = Sequence(start_event1, "10:10", 2, "Bonjour", 1, "Jean", "2")
Mujahed Saleem