Anonymous
Hi there, Suggest some best practice to use async in django.
Jerome
Hi there, Suggest some best practice to use async in django.
Don't use it yet, but consensus is all on Celery
Prateek
Hello all , I want to copy + past one drop down from one page to another . That drop-down sorts the records . I was able to make drop-down on the front end . But the function of sorting isn't working . Please help me out
Fatih
Hello. I just joined you. I have a few questions in my mind. 1.si: Is it possible to build a nice shopping site from django? 2.si: should I choose django or something different
Fatih
If you wanted to start again, would you choose django again?
Fatih
I mean
Fatih
I was curious about your site. If there is, can you throw it away
Bobosher
I was curious about your site. If there is, can you throw it away
For some reasons(and rules), no. If you wanna build something complex, there's no technology that fully covers its needs. Backend of Instagram and Spotify is (mostly) developed with Django.
Bharathwajan
is the following is logically correct in jinja {{ form.post == blog.id }}
Bharathwajan
then how can i give an explicit value to some object in jinja
Zey
When I am using objects.filter sometime it is showing data and sometimes not what can be the problem.I had deployed it on heroku and when I am using .get it is throwing error
âshîsh
When I am using objects.filter sometime it is showing data and sometimes not what can be the problem.I had deployed it on heroku and when I am using .get it is throwing error
Filter will sort all the reference values and get will pick up the single value. If you get the specific value and that specific value assigned to more than one queryset then error will be generated
Zey
But filter is also sometimes not showing data
Anonymous
does anyone know that why it different when I execut sql on django-views and on db-sqlite SELECT "employee_employeesign"."id" AS "id", "employee_employeesign"."jobs" AS "jobs", "auth_user"."username" AS "name" FROM "employee_employeesign" INNER JOIN "auth_user" ON "employee_employeesign"."author_id" = "auth_user"."id";
Anonymous
fk django db
Anonymous
when i execut this sql in django views like: queryset = EmployeeSign.objects.raw(qry1), the queryset only return one info
Anonymous
jobs
Anonymous
whats is the wrong, I had try so much ways
Idk
I am getting Inconsistent migration history when trying to deploy a django app on heroku. Although it is working fine locally. PS - It is an existing website with an existing database. I just upgraded the dependencies and now pushing it.
Krish
How clear chache on page reloads in django
Krish
I am new to django .. can anyone tell me what is the best source to learn django..
Dinnis ivy and chorey schafer and simplybettethancomplex.com
Shay
im using the User class of django and i want to show all the DB in my page, how can i do this?
Shay
this is a function in my views file but i want to show this i a table in HTML how can i do it? def show_all_DB(request): """prints all DB""" objects = User.objects.all() res='' for x in objects: messages.error(request, x.username) messages.error(request, x.email) return HttpResponse(res)
Shay
this is something i wrote in my HTML page but it is not working {% if messages %} <table> <tr><th>username</th><th>email</th></tr> <tr> {% for message in messages %} {% if message != "," %} <td>{{ message }}</td> {% else %} </tr><tr> {% endif %} {% endfor %} </table> {% endif %}
Ganesh
Render the html and pass context instead of using message
Straw hat
Hi, I am a python fresher and I am looking for a job, please let me know if there are any vacancies
Веселый Роджер
Is there anyone who can babysit me through a django course? Im ready to pay 26 usd per hour.
Ganesh
Is there anyone who can babysit me through a django course? Im ready to pay 26 usd per hour.
just join some one to one professional django course in some Institute if you are willing to spend 26$ per hour...that will lot cheaper than this
Веселый Роджер
just join some one to one professional django course in some Institute if you are willing to spend 26$ per hour...that will lot cheaper than this
im studying school 42 and because of covid p2p help is no as good as it should be. And im starting to fall back
Harsh
Hello all, I am learning Django using this video. I am learning about adding apps to the framework. (Timestamp in video url) I did the exact same steps in the video but couldn't get my category on admin page. dir structure: myfirstapp: - myfirstapp/ - db.sqlite3 - firstapp (my app)/ - admin.py - models.py . etc. Code: https://del.dog/qumurfavyg.txt Please help :)
R
Can anyone suggest me a good project on django for submitting in my college
R
??
software
Hi friends I need help YYYY-MM-DD D1 ="2021-05-04" D2 = "2021-05-09" I want to subtract D1 from D2 help me plz
Rudraksh
Hi friends I need help YYYY-MM-DD D1 ="2021-05-04" D2 = "2021-05-09" I want to subtract D1 from D2 help me plz
Convert string into datetime object and then you can subtract 2 datetime object to get diff
Anonymous
Hii dear how to create sub menu in my Django block
Anonymous
Like this: menu menu1 sub menu1 sub menu2 My model class Menu(models.Model): name=models.CharField(max_length=555) slug = models.SlugField(null=True, blank=True) def str(self): return self.name class Submenu(models.Model): name=models.CharField(max_length=100) menu_id=models.ForeignKey(Menu,on_delete=models.CASCADE) coco=models.IntegerField(null=False)
Well Done
Hi, I use postgres and I have a question: how I can create model with an arrayfield of unique user's id? I want that user's id will be removed from the array when I delete the user P.S. Now I use standart auth user
Caesar
red underline is not appearing in pycharm after I press some button which i didn't see))
Hikmet
Hey there. How can i get the date of last request made to the website for each user as an endpoint in django rest?
‎_/-\_¦--¦‎
Hey there. How can i get the date of last request made to the website for each user as an endpoint in django rest?
You can create a Middleware that will update the fields you want (for example you can add a 'last_request' field to user model and let the Middleware update that) and just normally fetch that with Django rest framework
‎_/-\_¦--¦‎
you're welcome
Hikmet
Just thought that it could be implemented using sessions
‎_/-\_¦--¦‎
yes but the client needs to be aware of that (you need to use session ID) of you're working outside of of the browser plus session data might not be there forever
Hikmet
Yep u r right
Idk
I have downloaded a backup file of a psql database from herkou app. How do I save it in a psql database locally ?
Глеб
If i need input data(text) i should use only forms? Can i do input using models
Joseph
Please who knows any website to host wordpress for free
Richard
Please who knows any website to host wordpress for free
Wordpress.com they host for you but not much is customisable on free tier 000webhost.com will auto delete your site after three months if not much traffic Hostinger.com starts at $0.99 first payment then $2.99 a month second payment
Станислава
Как перенаправить пользователя на определенную страницу, если он вводит в адрес другую? Например, с site.com/one перенаправлять на site.com/two
Imteyaz
How to install IDE jupyter notebook with python
🄻🄴🄰🄳🄴🅁
Roman
pip -m install jupyternotebook
Станислава
didnt understand a word😅
How do I redirect a user to a specific page if he enters another in the address? For example, from site.com/one redirect to site.com/two
Islom
How do I redirect a user to a specific page if he enters another in the address? For example, from site.com/one redirect to site.com/two
def two(request): return redirect(request, 'page/one.html') or return redirect (request, 'one') - если у вас уже есть метод one.
Avi
What changes we have to make in settings.py in django for production and hosting our website??
Chapi
What changes we have to make in settings.py in django for production and hosting our website??
check this link https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/
Avi
How to hide secret key and EMAIL_HOST_USER
Chapi
How to hide secret key and EMAIL_HOST_USER
by using .env file or someother file and load the files to settings.py
Chapi
How to hide secret key and EMAIL_HOST_USER
you can use python-dotenv module it is nice
Aman Jain
In view.py file request not working how i solve this problem
Aman Jain
If i type request.method Then the method through a error
Avi
In view.py file request not working how i solve this problem
Open your terminal and type pip install requests
Lamboo
If i type request.method Then the method through a error
You should at least specify the exception Django is throwing