Vinayak
William
Share the code
Глеб
I have a model with two vars. I know the value of the first var and I wanna know the second. How do I query the value of the second variable if I know the first?
William
William
Or try using filter
Глеб
Oh. Thanks, stupid question
William
👍
Charanpreet Singh
Hey, I am making an api using DRF. For purposes of login/signup, I have not used the inbuilt user model (it seemed to be a bit confusing ) , rather I have made my own model. I wanted to ask the way I should implement the login now. Like if there is a request for login and username and password matches, can I use any inbuilt libraries for authentication? Also which authencation technique should I use for the same (token based or session based ) ?
William
Check authenticate and also you can use django.contrib.auth import views as auth_views and used as auth_views.LoginView.as_view(template_name='') in ur urls file
Anonymous
William
Siddhartha Inturu
Do any one know how to keep search bar in django project ?
Damron
Hi!
Have smbd tried to override union in django? That's the question of filtering qs after executing union, because now it's raises error
Steve
John
Hai guys how do input additional values in Django serializer
John
??
Anonymous
My model is
class Display(models.Model):
name = models.CharField(max_length=255)
roll_number = models.IntegerField(unique=True)
date_of_birth = models.DateTimeField()
class AddMarks(models.Model):
marks = models.IntegerField(choices=[(i, i) for i in range(1, 101)], blank=True)
hello
Make a form based on this model then validate that form in view
Anonymous
The get method is used to display all the marks of the student and the Post method is used to add the marks to particular students
Anonymous
hello
Anonymous
**What my question is how to add marks to particular student through roll number
enansi
Hi all I want to automatically add permissions to some default django.contrib.auth.models.Group 's that I create. Is there a better way to do it than just iterating through the permissions I match with Permission.objects.filter(content_type=content_type, codename__regex="^view") doing then group.add()
Prince
enansi
you can use post_save signal
Oh. But then in the signal function, I'd basically be doing what I described above right? i.e. just filtering through the Permissions I want add and doing group.add() right?
Prince
Prince
group.add(**permissions)
Prince
#
Guys I'm learning django from last week .but I'm facing this issue several time . ..pls help me with this
#In django static css files are not working with my html page ""
Is network connection is required to run css files ?
shashikant
#
Ankit
Can anyone suggest a simple django project?
Anonymous
Ankit
Using Api?
Avi
Can anyone suggest me a major project in python??
Anonymous
Hi
I'm working on a django project.
In that I want to display a loading gif, till my script runs in backend and fetch the data from the server.
Can anyone help me with it ?
hello
Anonymous
Prakhar de
Upload your project on github, please.
Prakhar de
If you face any issue, uploading your git repo on Github, you can read my answer on Stackoverflow.
Prakhar de
https://stackoverflow.com/questions/51997057/upload-local-repository-to-github-com/67230734#67230734
Anonymous
Content Security Policy: The page’s settings blocked the loading of a resource at http://127.0.0.1:8000/favicon.ico (“default-src”).
Anonymous
Why I he this error
Anonymous
And what is solution
Dev__master
Can anyone know after creating zip file with function, where we need to mention the root or path to store that created zip file.
Dev__master
Inmy case zip file is storing directly in the project directory
Dev__master
But I want to store that created zip files in some folder 📂
Dev__master
Iam asking in python-django only
Dev__master
This is my zip function
Dev__master
ZipFile = zipfile.ZipFile(f"{sentgroupid}.zip", "w" ) for zip_files in list_append: ZipFile.write(zip_files, compress_type=zipfile.ZIP_DEFLATED) ZipFile.close()
Dev__master
Please help me with this
Dev__master
https://del.dog/egrawicrul
Sai
Sai
Hey I read the django azure blob package. I tried uploading in synchronised manner. But I want the same in asynchronous. Just need your help guys
on
Hi any one can refer me best hosting platform for django app
Vemula
Heroku
Curious
Hey guys what is the process to deploy Django to heroku with MongoDB. on heroku. should i deploy mongoDB again? after Django deployed?
Maz
ST
How can i access external API's using DRF? Like which classes or something so i can read about it in documentation.
313c10r09
Hi! What is it web components? is ti isolated web code? Is it only front-end ? Thanks!
Jenish
Jenish
ST
requests library
Yea, that would be my go too, but i need to know if there is a way to do it using only DRF
313c10r09
Jenish
Jenish
it is django rest framework for building API
Jenish
for getting info from API you need to make request, drf not give you any tools for making request from drf package
Jenish
Jenish
see mocking request in drf tests
ST
Yeah, but it was a test for accessing real API and storing data in models.
Jenish