gadghimuradm
Use openpyxl in your view
gadghimuradm
Or pandas
(⌐■-■)
इमरान عمران Imran
Hi, I'm using ckeditor, when I'm writing ' content | safe ' then the content becomes unresponsive, i searched on stack overflow, cudn't find solution
༆𖤍ཽ🇻 G⃖r༙e༙y༙h༙a༙t༙⚚×͡×
Anyone have django notes
Doragonsureiyā
Anyone have django notes
Looking for Django tutorials? you can follow these three recommended ones:
* Official documentation and tutorial
* Tutorial from MDN
* Tutorial from django-girls
unknown
hi any body know free course of learning django?
Charly
Hasan
class Message(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE, default=None)
text = models.TextField()
date = models.DateField(auto_now_add=True, editable=False)
time = models.TimeField(auto_now_add = True, editable=False)
edited = models.BooleanField(default=False)
pinned = models.BooleanField(default=False)
@property
def message_time(self):
return self.time.strftime("%I %M")
how can is use this properties in client side?
im working rest and react js
Charly
Hasan
Charly
chappa
guys I need hep, its a simple python issue that I cant seem to get around lol.
Charly
chappa
Pardon
values = (70,35,50)*
Baran
hey guys
Baran
can someone help me with virtualenv & gunicorn?
Nikolai
Hello, everyone! Can someone help? How can I get an instance of a child class with the same Id as my parent class? I have multiple child classes, and I don’t want to iterate over queryset for each of them. Thanks
Ps
models:
1) class Question(models.Model):
2) class QuestionOneAnswer(Question):
3) class QuestionMultipleAnswers(Question):
in views:
question = Question.objects.filter(test=test, number=question_number).first()
from that id like to get child object of question which would be instance of QuestionOneAnswer or QuestionMultipleAnswers
Alisher shamuratov
Nikolai
fn
Hi all!
Little confused, help is appreciated!
https://stackoverflow.com/questions/70870533/how-to-use-django-filter-package-for-foreign-key-fields-in-django
👑 Dharmzeey
Hello Kitty
Hasan
Hello Kitty
yes
There is a video for this, in mosh's django video. You can refer that i think
Mohd
Hi all, how can I give login required for static resources in django?
Anonymous
I need some help, so my django site is now online, in production, it loads on my phone, and laptop, but not on my. Client's phone, please help
Lucky
Converting image to binary format using base64
Doragonsureiyā
Lucky
It means converting image to binary format
Lucky
In python using serializers naa
Lucky
Serializers in django
Sandesh
{%submit row%} does this mean we are extending a component
Sandesh
or adding a piece of code from other file
Prasanth
I am having an issue while inserting data into the MYSQL database using Django ORM. I have defined multiple databases in my Django project.
While I am trying to insert data using the below code, it deletes the existing data and replaces with the new inserted data.
class NewGoalViewSet(viewsets.ModelViewSet):
def list(self, request, *args, **kwargs):
result = {}
id = self.request.query_params.get('id')
goalname = self.request.query_params.get('goalname')
goalyear = self.request.query_params.get('goalyear')
goalvalue = self.request.query_params.get('goalvalue')
priority = self.request.query_params.get('priority')
goal = NextGoals(
user_id= id,
goal_name= goalname,
goal_year= goalyear,
goal_present_value= goalvalue,
goal_priority= priority
)
goal.save(using="next")
return Response(result)
Rinat
I'm planning to make videos to help django learners. What topics are you interested in?
Kaveri
Can anyone please tell ..whether we can create static files in multiple projects?if yes then what are the settings for static under respective projects ..
Sandesh
yes you have to create static in all your apps if needed
Sandesh
and also remember in static also you have to create folder named same as your app name static/<app_name> and put all your static files like css js images in /static/<app_name>
Sandesh
cause it helps you from file conflict when doing collectstatic
Sandesh
in settings you have to add the path of all created static inside each app to this in settings.py STATICFILES_DIRS = []
Sandesh
this is my ans acc to what i uderstood
Kaveri
Thank you
Eli
Hey guys
Why is Linux server better than a windows server for deploying Django apps?
Lange
Eli
Paul
R.
Lange
And why?
In some lines i would Say that linux is faster and more stable than Windows (few bugs or system crashes). Not very susceptible to viruses and offers more security and much better system control . Linux is also the kernel of the future because today all technologies are on it (Android iOS Cisco network equipements mac os etc)
Denis
How can I use viewset DRF to receive a file and save it, marking the sender as creator (foreignkey User)?
is there any example or tutorial?
Eli
Diyorbek
https://stackoverflow.com/questions/70812038/how-can-i-convert-html-to-pdf-in-django-cyrilic-font/70812203#70812203
Javokhir
rest_framework.urls and dj_rest_auth.urls who knows difference between them?
Javokhir
Mirco
Javokhir
yes
but why we need dj_rest_auth or does it have advanced features?
Santhosh Ram
Can we have model field's values from the result of a queryset?
Vahid
Hi dear all
How can I handle multiple django forms in a single page with a single submit button?
Thanks
Javokhir
Mirco
Eng. Mohamed
Hi All,
Hope my message finds you well,
I Have a question here
Can anyone support me, please ?
My problem is in django rest framework
my aim is to create a new tag if this name is not exist, and also update profile tags
but it is not working
https://stackoverflow.com/questions/70880827/django-rest-framework-modelviewset-manytomany-field-override-partial-update-meth
Hemant
I am a beginner in django
I've made one to-do application by following one youtube tutorial
It have one model and by default I am using sqlite3 as database
I want to make it opensource and till now my sqlite binary was in .gitignore file
If I clone my private repo in some other dir., make an empty sqlite3 file, create a superuser manually and try to login with that user in localhost.. I am not able to login
Things I tried to resolve it: I copied my older sqlite binary file to the newly cloned directory, I can access all previous data that I used while creating the whole app
Hemant
Is it safe to opensource the sqlite binary file which have data of superuser?
Hemant
I just want to separate the sqlite3 binary file of production site and the opensource repository
T4P4N
Hemant
Hemant
I am using heroku for a tg bot, flask project too
T4P4N
I am planning to use heroku
clone the project to your localhost, & host it from there, don't publish the URL until you finished changing username & pw for admin
Hemant
Idk what password you are talking about
I just created one super user account with createsuperuser command
Hemant
do we have any default account provided by django?
Hemant
T4P4N