Cynthia
Still trying to Google the error
Cynthia
I unistall then install again
Subhajit
Subhajit
After reinstalling
Cynthia
Give me a moment to unistall then install
Vasile
hey guys I am trying to setup a django app just for tests only... I want to setup the views and the app inside the test. I am trying to test my code how it works with django app. can someone show me an example ?
Aza
Hey guys, I have 2 models Debt(num=models.CharFIeld(), id_debtor=models.ForeignKey(Debtor)), Debtor(name=models.CharField(), surname=models.CharField()), my question is, in elasticsearch-dsl how i can get Debtor by quering with num field in Debt model?
Sherlock
Does one need to know complete SQL in order to understand django model. I know only little bit , foreign key, one to one, one to many, many to many Is this enough or should I dig more🙏
fateme
dose anybody here have experience working with customized search filters in drf ? ( override the get_search_results() ) ? I want to create a customized search filters based on model property ! I dont know bout its possibility.
Jucaoma
You mean the static files is rendering well?
I finded my problem: I was enabling/disabling debug. Now I need to learn about deployment, thanks
Steve
please who can help with a good solution, I wish to upload many files at once to my database using the concept of *one to many relationship* but unfortunately catching some *Value errors* I explained my problem https://stackoverflow.com/q/68922872/16436036?stw=2 thanks in advance
Sarp
Hello guys, I am integrating razorpay payment gateway in django project but when i am importing razorpay i am getting error that Import "razorpay" could not be resolved
Eugene
Hey guys. Can you help me to make a choice? I want to add a payment system on my website,but stripe doesn't work for Ukraine. Which service could you recommend me ?
عبدالقادر
someone knows about how make autocomplete in django-admin
Jay
User authentication failed authenticate () not working
Sanji
Hey guys... can anyone tell me why After giving git add . Command nothing is happening?
Sanji
Em, and what do you expect to happen?
Well usually It adds all the files to the repository
Alex
Well usually It adds all the files to the repository
No. It adds recursively current dir into changes/cache.
Serge
create a python script to extract the data from pdf and write the heading in one column and description in another column in excel. it is a part of python django?
Sanji
check it with git status
"No commits yet"
Alex
No. It adds recursively current dir into changes/cache.
After that you may or may not commit that changes and then push it into a branch in some repo.
Alex
M?
git commit -m “Your message”
Alex
I see
and don't forget your .gitignore
Sanji
and don't forget your .gitignore
What's that..I have not used it
Alex
What's that..I have not used it
Or otherwise you may end up with tons of .pyc files in the repo
Sanji
git commit -m “Your message”
I did that..and after pushing it says ! [remote rejected]->master (pre-recieve hook declined) error: failed to push some refs to 'https://git.heroku.com/name.git'
Sanji
It sucks, then.
Where to use it?
Alex
Where to use it?
google gitignore where to use it
maverick
Gitignore is file it basically tells the git to avoid the file or folder in it
maverick
Django compile the code and it saves in .pyc format use *.pyc to ignore all compiled python code
maverick
Sorry
maverick
??
maverick
I have an issue in selenium
maverick
When i try to click the element it actually click on label not in the element but used the element's xpath and id (i used both) any idea??
Maxim
When i try to click the element it actually click on label not in the element but used the element's xpath and id (i used both) any idea??
offtopic maybe you need @seleniumpython if you use Selenium with Python if not - that was double offtopic
maverick
Ok thanks
fateme
dose anybody here have experience working with customized search filters in drf ? ( override the get_search_results() ) ? I want to create a customized search filters.
fateme
Use django-filters
I used it 🤔
fateme
Use django-filters
do you have any examples for me ?
Zhiger
guys tell me the solution, I want to display these two models on one page, the first is the main post, the second is a list of posts, I thought to do it in the view through class inheritance, but no, how to be for 3 days I can't solve
Doragonsureiyā
guys tell me the solution, I want to display these two models on one page, the first is the main post, the second is a list of posts, I thought to do it in the view through class inheritance, but no, how to be for 3 days I can't solve
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain: - what you're doing - what you're expecting - what you're using - where you're running the script - what Python version you're using - what packages and their versions you're using - and the most important thing: show the code YOU wrote (read rule 5️⃣ for that) and more details, that way your chances to get help will increase
James
Hello: I have a Results model and i want upload results for all student using excel file; is it possible to do :
James
class Results(models.Model): student = models.ForeignKey(Student, related_name='results', on_delete=models.RESTRICT) entry = models.ForeignKey(Entry,on_delete=models.SET_NULL, null=True) subject_name = models.CharField(max_length=20) marks = models.FloatField()
James
Yes.
can you help me? because my model have a student foreign and i dont know how to handle it
Astrit
What have you tried so far?
James
What have you tried so far?
to upload student using with excel sheet : and my model is looks like: 👽, [25.08.21 22:37] class Results(models.Model): student = models.ForeignKey(Student, related_name='results', on_delete=models.RESTRICT) entry = models.ForeignKey(Entry,on_delete=models.SET_NULL, null=True) subject_name = models.CharField(max_length=20) marks = models.FloatField()
Astrit
Yes,I saw what your model looks like but what have you tried uploading result from excel for each student,what errors are you facing?
Karlygach
Hey)✋I wanted to upload multiple photos to one product, how can I do this?
Karlygach
class Image(models.Model): name = models.CharField(max_length=255) product = models.ForeignKey(Product,related_name='desk', on_delete=models.CASCADE) image = models.ImageField(upload_to='images/') default = models.BooleanField(default=False)
Jovial Joe Jayarson
Hi, I'm working on a FOSS project trying to create a single page django form. The questions are being loaded from a JSON file. So Instead of manually adding them to the model, one by one I'm looping over JSON object. But makemigrations does not seem to pick up the change. Can someone please help me to figure out what's wrong? Here are some relevant code snippets: https://gist.github.com/joe733/f9b7dc957551b2613a9a47466d295f2e
Pr
Can anyone give tutuorial link ....in which login with Facebook and login with Google api integrated
Fox
but The query to the database is long, can this be implemented in one object?
If you know the max photos that you will be uploading and don't want other attributes to your image then you can just include ImageField()
ILYOSBEK
I'm sorry, I didn't say anything about uploading images.
img = models.ImageField(upload_to="images")
Anonymous
Hii... Having problem with django formsets, UI part. I need js or jQuery implementation to add forms dynamically. Anyone up for help..?
Siddharth
How to save data from form into database
ILYOSBEK
How to save data from form into database
with admin panel or html form ?
Siddharth
Html form
Sanji
Html form
First make sure yoh have set the method of the form to POST If you’re not using any class based view, set the action according to the specific view in the views
Sanji
the action name must be specified in the urls
Sanji
Then customize the view
Siddharth
Ty
Sanji
Is there any way to add my own attribute in " Formview "