Vinayak
Use Django default libraries like UserCreationForm with crispy forms. It will do all the validation for the forms.
I used usercreation form only It's works only if password is strong Either it gives value error page
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
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
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
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
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()
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
group.add(**permissions)
#
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 ?
#
Have you seen the doc to manage static files in django?
No bro but ..If I add that css files to main project they are working but ..when I save it on static folder ..there is nothing different with my html page
Anonymous
Give some extra information
Django Rest API ManyToMany Field can support Front api like React js
Anonymous
Give some extra information
Have submit form data include as it is django rest many2many in react how to rectify?
Ankit
Can anyone suggest a simple django project?
Ankit
Using Api?
Anonymous
Using Api?
Using whatever you want
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
Can anyone suggest me a major project in python??
Search " awesome python projects GitHub "
William
**What my question is how to add marks to particular student through roll number
data = Display.objetcs.get(roll_number=value). data.related_name.marks = your_value
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
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
Dev__master
Ib I have code
Can u help me?
Curious
Hey guys what is the process to deploy Django to heroku with MongoDB. on heroku. should i deploy mongoDB again? after Django deployed?
Curious
https://pypi.org/project/django-heroku-mongoify/
Hey thanks! should i have to deploy my local MongoDBfirst, to access?
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!
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
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
ST
for getting info from API you need to make request, drf not give you any tools for making request from drf package
Thanks. There was a test with a demand to make requests to external API using DRF. When i asked for details they said to use DRF classes. Idk what theyre talking about.
Jenish
see mocking request in drf tests
ST
Yeah, but it was a test for accessing real API and storing data in models.