ARBAAB
what is UserBaseManager in django models?
Alda
Hi, guys. I have a question, ¿how can I use a same form in different view without creating it every time?
Akshay
Can anyone help me about mongodb
Akshay
I need to create a collection name user But when am creating the collection it is showing as app_user how can i create a collection name without underscore
h
Hello Everyone, hope you are doing great, I want to ask one simple question related to DRF, I want to create an endpoint by which I want to update a single value - I know we can create a PUT request for that task but I don't want to do the PUT request, here I mean I just want to visit this url for ex 'profile/hitesh/' as soon as I visit here the status should turn from ACTIVE to NOT ACTIVE. I tried to search online but didn't get any information regarding this. can someone please guide me? Thanks
h
Is that hard to implement?
I figured it out, I'm so sorry for asking this question. I got confused at one point but thank you so much for this much fast reply I really appreciate this community. Thanks
Äli
If u get stuck, back here ❤️
Vaibhav
Thank you so much for your reply, got it.
Just try to keep things as simple as they can be, you don't have to code using advance function, for starters just use generic views
Rino
Hi, Just one question: Does Django version the data? I mean I'd like to keep all edit, change of a row in th database. Can Ido this with django?
Ivan
Good evening. What is the easiest way to implement a form in Django that would allow the user compose something like items list. I have several different types of elements and I want to allow the user to arrange them in different order an unlimited number of times. Thanks!
игорь/igor
Hi, Just one question: Does Django version the data? I mean I'd like to keep all edit, change of a row in th database. Can Ido this with django?
Sorry, personally I didn't understand anything. Can you give an example what you are trying to accomplish
Samuell
Hi guys, how are you? I have a doubt. I'm working with Django and MongoDB, but I can't make relationships in models.py classes. I'm trying to use models.Foreingkey, but the result I get when I try to write a record is a form validation error. Can anyone give me any tips?
Samuell
magodb it's not relational dB, so it's not working same as mysql, postgres there's a different procedure u should to follow, to get relationship..
Perfect, that's right, I don't want to make the relationship itself at the database level, it was just in the model, in the classes. What procedure do you suggest to me?
Äli
Okay, so you should to use models.EmbeddedField Instead of foreignkey..
Martin210345
Hi guys Can you refer me a django tutorial
Doragonsureiyā
Hi guys Can you refer me a django tutorial
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Samuell
Okay, so you should to use models.EmbeddedField Instead of foreignkey..
I'm going to run some tests and do some research. I would like to avoid filling in the data in the form manually.
Äli
You can a brief introduction here https://www.djongomapper.com/integrating-django-with-mongodb/
chaygo
Hello! I have this error Programming error how can I fix it?
Deleted
hey guys, django url.py, <str:parameters> could not al/ow empty string how should I make it allow both full string and empty string?
Deleted
in my case, this parameter could have both string or empty
Deleted
but in URL dispatcher, <str:XXX> could not allow empty str
игорь/igor
but in URL dispatcher, <str:XXX> could not allow empty str
https://stackoverflow.com/questions/51084909/how-can-i-use-a-catch-all-route-using-path-or-re-path-so-that-django-passes Might help you
Adie
I am getting keyerror in celery when I run a task ? Can sombody share some good resouce for setting up django + celery + redis setup?
Rino
Sorry, personally I didn't understand anything. Can you give an example what you are trying to accomplish
Thank you forma answeing! I nave to save the log of alla changes of data.
Rino
I mean... For example, if I have a product in my model I'd like to log all charges of prices... Or changes of. name of product
karamjeet Singh
I hope you have done the registration on our website, given below is the link for classes. https://us02web.zoom.us/j/86401978376?pwd=cGRrcTBjaEtYUXlkcVkzTWl6OVZEZz09 *If the link is not clickable, please save this whatsapp number.* Here is the Itinerary for the session . Time Topic Trainer 11:00 – 11:40 Personality Development Riya Baheti 11:45 – 12:25 SQL Meghna Jangid 12:30 – 1:10 DSA Anupreet Sihra 1:15 – 1:55 Python Basics Aishwarya Sharma 2:00 – 2:40 Big Data Analytics Reeta Sharma 2:45 – 3:25 Applied Deep Learning Karamjeet Singh 3:30 – 4:10 Digital Marketing Janak Shekhawat
tushar
How to update model on live server I try copy model on docker but it is not change fields. So how can I cbange
tushar
Change*
Тemurmirzo
Hello guys, I hope you are well. I am looking for a free book to learn django. Could you please help me to find
H
How can I deploy django project in heroku with postgress database??
Doragonsureiyā
How can I deploy django project in heroku with postgress database??
Step 1: Open a browser Step 2: Write down https://google.com or https://duck.com and press Enter Step 3: In the search box, write down the same words you asked here Step 4: Read the first results
Anonymous
Семён
Hi, I recently started learning django and can't solve this problem TypeError: init() got an unexpected keyword argument 'max_lenght' I searched the Internet for anyone who has such an error, then it is usually a syntax problem, but I have already checked everything several times and did not find it
Семён
# models from django.db import models class Article(models.Model): article_title = models.CharField('Название статьи', max_length=200) article_text = models.TextField('Текст статьи') pub_date = models.DateTimeField('Дата публикации') class Comment(models.Model): article = models.ForeignKey(Article, on_delete=models.CASCADE) author_name = models.CharField('имя автора', max_lenght=50) comment_text = models.CharField('Текст комментария', max_length=200)
Семён
change it to max_length not max_lenght
Thank you very much, everything worked
Doragonsureiyā
S
!!!!!!!! Sql server schema : xyz Django models created while giving explicit schema name like : "xyz.table1" Now while unit test cases(as it connects to sql lite and no schema concept in sql lite) facing issue No such table "xyz.table1" How to mock schema for test cases??
No name
Good evening dear ones, If there is any possible to combine django + raspberry Pi do projects . Any can say the what are ways to work it
Mohaali
Is there a way to package a django app, if there is would you like to help me?
cj
Is there a way to package a django app, if there is would you like to help me?
yes, just be sure to include the needed files in the MANIFEST file
Hunde
I want to create dataframe with 2 decimal point
priyanka
Using django I have created two pages music and index but after creating virtual environment and activated it but then also page no responding , path error showing. What should I do ?
Оleg
could anyone help me! After receiving the data from the form and before writing it to the database, I'd like change some parameters of the image (width and height) How can i do this? my view.py: def change(request): if request.method == "POST": form = ChangeImage(request.POST, request.FILES) if form.is_valid(): # here is where to change the image try: form.save() return redirect('home') except: form.add_error(None, "Adding error") else: form = ChangeImage() return render(request, 'my_app/add_data.html', {'form': form}) when i turn to: form.cleaned_data['picture'] i got: <InMemoryUploadedFile>
Mohit agarwal
I am bca graduate 2020 and I have excellent knowledge of python and sql but my drawback is I am from bca can you suggest me any company name who recurring the bca freshers 🙏🙏
Senior Software Engineer
I have some problem with Djano and Multi-tenant
Senior Software Engineer
who can help me?
Frez
Hi for these models: class Website(models.Model): url = models.URLField() users = models.ManyToManyField(User) class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) bio = models.TextField(null=True, blank=True) nickname = models.CharField(blank=True, null=True, max_length=50) location = models.CharField(blank=True, null=True, max_length=50) weight = models.DecimalField(null=True, max_digits=5, decimal_places=2) How to create good signal for Website changes? bio in Profile Model : a string that created by websites urls and sepreted with '\n' My signal: ( what is the problem? ) @receiver(m2m_changed, sender=Website.users.through) def do_something(sender, instance, **kwargs): for user in instance.users: query = Website.objects.filter(users=user).values_list('url') websites_of_user = list(query) string = "" for site in websites_of_user: if string == "": string += site else: string += "\n" + site Profile.objects.filter(user=user).update(bio=string)
Оleg
Check Image.resize() in python
I still don't understand how do it. I got an object <InMemoryUploadedFile>. Нow to convert it in PIL.Image and save in db? I have no idea
shubham
Why authentication function return none every time ? (On correct email and password)
Maxim
Why authentication function return none every time ? (On correct email and password)
if this is your custom function, show us the code don't forget the rule #5
Bwaks
Hello am using django formtools for multistep form and now i have an error ..........how do i solve this error ---------> raise NoFileStorageConfigured( formtools.wizard.storage.exceptions.NoFileStorageConfigured: You need to define 'file_storage' in your wizard view in order to handle file uploads. --------------------> am not doing multi image upload on one field ...i have multiple field this i my model --------------------->good_conduct = models.FileField(upload_to=user_documents_path,blank=True,null=True) certificates= models.FileField(upload_to=user_documents_path,blank=True,null=True) id_front = models.ImageField(upload_to=user_id_path,blank=True,null=True) id_back= models.ImageField(upload_to=user_id_path,blank=True,null=True) ------------------ and this is my form --------------->class DocumentsForm(forms.ModelForm): class Meta : model = Personal fields =('good_conduct','certificates','id_front','id_back')
Philo
opened this group after a while and its been 50k+ msg that i just scrolled
Doragonsureiyā
Anonymous
Can anyone help me create django model for availablity timetable like in astrotalk app