Dishant
Change the action value in template file to {% url 'add_data_db' %} It may work!
Dishant
Share the log if its not working
Lion
Whon worked with postgis
Shikhar
In double quotes
I've written action="{% url 'add_data_db' %}
Shikhar
But still it doesn't work
Dishant
Send me the log picture in personal
Lion
Nobody know postgis
R
Nobody know postgis
Just ask your question
Anonymous
👍
Anonymous
I've written action="{% url 'add_data_db' %}
try restarting the server as both methods should work as per the screenshots
Mihail
Can't deploy my project on PyhonAnywhere. Have an Error(https://pastebin.com/TsivCPkA) But i installed this module in PyCharm, register in settings.py . So in local server Everything works. Also I Intalled Embed_video in PythonAnywhere's Bash. Can somebody help?
Eddie
Hello guys i have a pivot_table from a dataframe using pandas i want to display the pivoted table in the django templates when i use to_html() it gives me raw html code but i want it rendered
Dishant
Need help in deploying a project on heroku. Can anyone join over in the next 3 hrs using anydesk or teamviewer. Reply with @Computer404 to join
Bunty chhatri wala..
Its easy to use
Anonymous
Please I need help on how to write function for a django page.am confuse where to write the function if is under model or views
Anonymous
I want to Interact with a model class and the model will be inject in my template how do I solve that
Shikhar
I want to delete an entry in database by clicking on a button but before that I want to run two different scripts. Which method should I use DeleteView class or delete().
Orack
how to save a model with a foreign key to some other model in django rest framework
Shikhar
Use DeleteView inside views.py
Can I be able to use 2 different scripts in that.
Anonymous
Can I be able to use 2 different scripts in that.
Yea, u can use 2 different script If u r using class based view then use DeleteView, if u want to use any method then inside that method u call object n delete that object using . delete () method
Shikhar
Like I want then to execute automatically after I click on delete button
Shikhar
Thanks
Anonymous
Mw
Orack
I have 2 models both of which have userid as one of their fields can I do foreignkey through it ? after table/database is complete? like if i delete a particular userid from one it should delete that row from other model.
Orack
stop asking questions which you can easily: 1. lookup on google with simple search 2. consult the Django docs
Im trying since 3hrs+, If i remove that line of foreign key, it works else it shows error 400 but I want them to be linked
Anonymous
Im trying since 3hrs+, If i remove that line of foreign key, it works else it shows error 400 but I want them to be linked
Have you checked the docs first? https://docs.djangoproject.com/en/2.2/ref/models/fields/#module-django.db.models.fields.related
Orack
Images are blocked here, pastebinning every views.py,urls.py etc will be tough task to see everything which is an efficient way to share django snippets here ?
Anonymous
hi guy's i have already local database how i set that django use it? database nam's is shop
Yegor
Evening, comrades, how can I get non document field in django-elasticsearch-dsl-drf, I need to get my model's image_set in serializer (rest standartd or dsl DocumentSerializer), but not include it to Document.
Yegor
P.S. Im using DocumentViewSet
Human
Any one knows why during template view we are using something like Context=super().get_context_data(**kwargs)
Human
What does it do????
Human
Why can't I make a simple dictionary... instead of this???
Yash
How to copy manytomany field to other manytomany field?
Doragonsureiyā
How to copy manytomany field to other manytomany field?
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 firsts results
Yash
By god's grace I already know how to use google search, but didn't find proper answer there.
Anonymous
Hi guys I'm new for django, can you tell me use of meta class in django?
Muflone
Hi guys I'm new for django, can you tell me use of meta class in django?
It defines the class behavior, before it's instanced
Anonymous
How to solve Migrations are not supported in this engine ?
Anonymous
I am using Cassandra the
Anonymous
TypeError: Unknown option(s) for sync_cassandra command
Денис
What does it do????
It probably does this
Shikhar
Suppose there multiple cards with button. Now if I click on one card it should not show that card in template, however the data should remain in db. How to do this
Shikhar
Is it possible to store IDs and then send only that object which is not in the list
Денис
Is it possible to store IDs and then send only that object which is not in the list
what do you mean "send"? You can just skip them while rendering the template
Денис
Let say if I click on multiple buttons then?
depends on how you implement the frontend. If you refresh the HTML page on every click, it's story #1, if you use AJAX requests without refreshing the page - it's story #2, and so on
Shikhar
what do you mean "send"? You can just skip them while rendering the template
What I'm thinking is that every time a button is clicked we should store it's id in a list. If object id of an object is in the list then we will not send that data in template. Is it possible
Денис
What I'm thinking is that every time a button is clicked we should store it's id in a list. If object id of an object is in the list then we will not send that data in template. Is it possible
yes, but most probably this list should be associated with user session or user login. So you'd better create a ManyToManyField in your Card model with User (most basic way if you didn't create a specific user model). Then your User model gets a related_name, say, 'cards' which will store your 'non grata' cards IDs like a list, but as a persisted DB record.
Shikhar
Ok thanks
Денис
what about template rendering... most simply you can put a filtered QuerySet of your Card.objects in to the template's context.
Денис
this will be about model lookups, I'm not much into that
Денис
So in this way can I store the ids of cards
Read about ManyToManyField, you'll see it's what you need. It automatically creates a mid-table associating your User ids and Card ids, so you can filter cards by whether they are related to the user or not
Anonymous
How can I prefill the username value in the login page? I am using Django LoginView
Dave
Hi, Just wanna share it, maybe someone can help me. Thnks. https://stackoverflow.com/questions/59123231/modifying-queryset-in-django-admin-page-for-auth-users-and-a-custom-related-mode
Anonymous
how can i learn django form scratch
Anonymous
suggestion like youtube channel or udemy course
Anonymous
pls guide me.
Dave
suggestion like youtube channel or udemy course
try Django Dev to Deployment by Traversy Media on Udemy, its good.
Anonymous
Corey Schafer imo
Doragonsureiyā
okk any youtube channel?
Check out PythonRes, a channel for Python resources (links to help you out).
Anonymous
🆗
Anonymous
!res
is that channel name?