Ing. Mario Tamayo
And the html
Rebellion
And the html
https://pastebin.com/Z31Fum24
Pagination HTML snippet
Ing. Mario Tamayo
I think everything there is on rule, my guess is that in your search form u r making some mistake, maybe the form method is get but your view is expecting some post data
Rebellion
vlad
Rebellion
Search functionality is working well,
but, pagination is not working for it...
If I remove pagination, it shows all the data on single page
vlad
Rebellion
Carlitos
https://pastebin.com/TmXrFz6a
your search function will work only with POST requests, when you click the paginator you are sending a GET, so what does your function return for a GET request?
Carlitos
Ing. Mario Tamayo
class="page-item"><a class="page-link" href="?page={{i}}">{{i}}</a></li>
Do u have any url waiting for this ?page=i request
Carlitos
hello all, btw :)
Ing. Mario Tamayo
Here u r making a get request to the server but the code resolving which page to deliver is inside the request.method post if
Rebellion
Ing. Mario Tamayo
Ing. Mario Tamayo
But your logic is inside a conditional for the post method
Ing. Mario Tamayo
So when request.method is not post the server will return some nonsense
Rebellion
Ing. Mario Tamayo
This is why almost always is better to maintain search functionalities on the REQUEST.GET scope
Ing. Mario Tamayo
Try to just use post for saving data on the server
Akash
I have a get request like
Test.com? field=login.start(date).end(date).name("demo")
Here I am not able to understand are these multiple parameters or single parameter ?
SUDO
Hi everyone
SUDO
i need your help
SUDO
how to synchronize postgresql database after adding new model in models.py pls help me
SUDO
in dbsqlite can synchronize database with migrate —run-syncdb i need like this script pls
Neo
Are you using multi db?
SUDO
no
Neo
then simply run migrate
SUDO
only 1 user
Neo
I mean do you have multiple databases configured in your settings.py
SUDO
no no only one user in database
SUDO
if i want add new user and how to migrate multi db
SUDO
can anyone answer my question pls
CryptoHunt
Hello friends, help me please
I need to give to user notifications when someone wrote message to user or comes on his page
Messages creating through django channels and i have an issue with my employee: he said we need to keep websocket connection on everypage and give user automated notifications, without storing them in database
But there is a problem, so i need someone to help me:
1) As i know - there is no way to keep websocket connected when user goes on different pages, is that true?
2) Is there grammar way to store notification? Am i doing right by storing them in db?
CryptoHunt
🙃
Poppu
# Create your models here.
class CategoryModel(models.Model):
name = models.CharField(max_length=255, unique=True)
slug = models.SlugField(max_length=255, unique=True)
# Create your models here.
class TagModel(models.Model):
name = models.CharField(max_length=255, unique=True)
slug = models.SlugField(max_length=255, unique=True)
description = models.TextField(blank=True)
category = models.ManyToManyField(CategoryModel, blank=True)
Poppu
Poppu
I tried inline but it's giving the error there are no forginkey
Mohamad Reza
Mohamad Reza
Your TagModel and CategoryModel are not related to each other
Mohamad Reza
Use ForeignKey
Santhosh
Haii,
Actually I'm new to django world, but I practiced n number of project in basics. Any of you can guide me what to do next?
S.H.K
Hi, how used date picker ?
cr
Charly
Santhosh
more complex projects
Can you give me some examples?
Bcz I'm confused to select complex projects
S.H.K
For large data from django which database is good
MySQL community server or PostgresSql ?
S.H.K
Mohamad Reza
Poppu
Check again what error said!
First of all i doesn't know how can I achieve it's so i do hit and tried.
So i use normal foreign key inline method but it's work many to many
Mohamad Reza
chappa
Guys is there any way you can get a client's port number used to access my site?
Charly
Банковские карты
Someone explain.
Im doing api's in DRF for SPA prj.
So, frontend client main page will show: banners, categories, products, stickers and so on.
Should i do different serialisers for each of them or it must be one serialised with all objects. Pls tell me.
Javlon
How to activate virtualenv on windows
Charly
Yaroslav
Hello! I have this problem: 'Model class django.contrib.sites.models.Site doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS'
Help me, please
KENNEDY
Yaroslav
I'm doing lessons on YouTube and at this step I had such a problem. Before that, everything was fine
Anonymous
Is it possible to implement jwt using rest framework and fe using Django template
Банковские карты
Yaroslav
Javlon
Doragonsureiyā
Anonymous
Yes
Can you please guide me to the resource please
𝕬𝖒𝖎𝖗-𝕸𝖔𝖍𝖆𝖒𝖒𝖆𝖉
Банковские карты
𝕬𝖒𝖎𝖗-𝕸𝖔𝖍𝖆𝖒𝖒𝖆𝖉