Idi alamin
NoReverseMatch at /logout/
Reverse for 'accounts/login.html' not found. 'accounts/login.html' is not a valid view function or pattern name.
Request Method:GETRequest URL:http://127.0.0.1:8000/logout/Django Version:2.2.10Exception Type:NoReverseMatchException Value:Reverse for 'accounts/login.html' not found. 'accounts/login.html' is not a valid view function or pattern name.
Exception Location:C:\Users\User\anaconda3\envs\test\lib\site-packages\django\urls\resolvers.py in _reverse_with_prefix, line 673Python Executable:C:\Users\User\anaconda3\envs\test\python.exe
Idi alamin
I got this error when I click log out from my dashboard django
Idi alamin
Really need you guys best advice to solve this
Suren
Hello guys, can you please tell me. I have a website which is selling tours, also I want to add hotels and sell it as well. Should I create new application or better to leave everything in the same application which is called “tours”
Ameer
How to deploy django code in nginx server can anyone help me..
Shamnad
Ameer
Can u suggest one
Idi alamin
age not found (404)
Request Method:GETRequest URL:http://127.0.0.1:8000/accounts/login/?next=/logout/authentication/login/
Using the URLconf defined in core.urls, Django tried these URL patterns, in this order:
admin/
admin
^$ [name='index']
^authentication/
^/authentication/login/ [name='login']
^app/
^logout/ [name='logout']
The current path, accounts/login/, didn't match any of these.
You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.
Idi alamin
any idea how to debug this?
Idi alamin
still got error
Shrey
Is there a way to remove specific fields from Django Models when a desired condition occurs ??
I have seen methods combining $aggregate and $project functionss.
For example..........
Class ModelName:
field1 = models.CharField(max_length=20)
field2 = models.CharField(max_length=20)
Field3 = models.CharField(max_length=20)
pipeline = [{
'$project': {
'field1': {
'$cond': [
{'$gt': ['$field1', 0]}, # If field1 > 0
'$field1', # return field1
None # else ignore field
]
},
}
}]
query = ModelName.objects.aggregate(pipeline)
*
Through django how to upload pdf files..and how to save
Дмитрий
How work context in serializer, I want add complete link, but it return incomplete link
Дмитрий
I am working with documentation
Дмитрий
https://ilyachch.gitbook.io/django-rest-framework-russian-documentation/overview/navigaciya-po-api/serializers#vklyuchenie-dopolnitelnogo-konteksta
Billy
guys, how to convert db record to json using serializers?
Professor
Billy
i've found it
Billy
some_serializer(query_set, many=True).data
Dark
Good day to all and Happy New Year!
I ran into a problem rendering images coming from a TextField that uses a WYSIWYG editor on the front end when using MDX Remote. I am using Next.js.
I know the problem, the link to the image is built as a relative path /media/images/1.jpg , which leads to the following path on the frontend: 127.0.0.1:3000/media/images/1.jpg, and displays a 404 error.
Unfortunately, I did not find an answer to this question on google, but I found one not very good solution.
Is it possible somehow in Django, when managing media files, to give a full-fledged link of the form: 127.0.0.1:8000/media/images/1.jpg?
If someone comes with the same problem, then I found three solutions: it's just to add the absolute path to the url of the inserted image in the editor, which is necessary. Or reconfigure custom storage. But, as a result, on the deployment I just used nginx reverse proxy, which works as it should, namely, the frontend responds to /, and the backend responds to /media/.
virat kohli
Can anyone tell me how to create multitenant in docker using django
ask
The
Is django suitable for high traffic load
Like for social networking apps?
Django vs fast api ?
Charly
V
I need crispy form designs
abhishek
Hi guys can any one help me
abhishek
I was doing elastic search in django in that after running the command py manage.py search_index --rebuild I am getting error like "connection aborted" Remote end closed connection without response
Ameer
Hello
Ameer
Deployment django with nginx server any one know about it can you guide me ..
Suryo Adhy Chandra
https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/
*
In my system i can't able to install docker..please any one help
*
It's throwing a error
Amin
Hello I'm using dj_rest_auth any idea how can I connect it with flutter
Xoxooxo
Hi..
I am looking for a solution of this problem for hours, but I have not been able to find a solution
Problem:
I have one Django form, and 3 bootstrap modals each containing a django form
So in total there are 4 django forms in a single page
There all are rendered from a single view function.
But , the problem is that request.POST always has data of only 1 form
Any idea?????
Nazim
Xoxooxo
The Sun
Hi everyone 👋🏻
I had a question about a model I have . I want to save images which is already serialized. And now I'm going to write a view by using viewset (not model viewset). The problem is How to partial update? And How to define a method ? And which parsers should I use?
Harshavardhan Reddy
FieldError at /collections/Bike Cannot resolve keyword 'category' into field. Choices are: Category, Category_id, created_at, description, id, meta_description, meta_keywords, meta_title, name, original_price, product_image, quantity, selling_price, slug, small_description, status, tag, trending
Harshavardhan Reddy
for this model.py i getting error as this guys
Issa N'golo
Антон
Hi! please help me... try to add new raw to DB with AutoSlugField, but get -2 in table... What can be wrong? Thanks for all suggestions...
sara
Hello friends, please help me
When I write the django-admin code line in cmd, it gives me an error, what's the problem?
W
sara
Unfortunately, photos cannot be sent here
sara
I will send you a PV
Vishnu
Hello,
I do have 2 apps on my project and and placed static files for each application inside the app itself. But the static files are not loading when I change the debug mode to False and I had added my apps on installed apps and defined static_URL same like mentioned on documentation of django. How can I load static files from both applications if i save the static folder inside the app. Someone please help me with this
The Inspired
Shivam
Django admin model form integrated into html template?
Johnnybrand
Maxim
Johnnybrand
nope
Problems can be easily solved with photos attached..
KD
hi i have problem with postgresql .
KD
anyone can help me?
Mahmud
Hey devs...
Please, what is the best approach to implement social auth with custom_users(multiple users) with different roles in Django ?
Kareem
What's the difference between static folder that hold html css js and collect static
Anjali
Hi,
Can anyone help me?
I am a bit confused.
I want to create a database movie for representing actors and movies.
1.
class Actor(models.Model)
name = models.charField(max_length=50, null=True, blank=True)
class Movie(models.Model):
name = models.charField(max_length=50, null=True, blank=True
actor = models.ForeignKey(Actor)
2.
class Actor(models.Model)
       name = models.charField(max_length=50, null=True, blank=True)
class Movie(models.Model):
      name = models.charField(max_length=50, null=True, blank=True
     actor = models.ManytoManyField(Actor)
3.
class Actor(models.Model)
       name = models.charField(max_length=50, null=True, blank=True)
movie = models.ForeignKey(Movie)
class Movie(models.Model):
      name = models.charField(max_length=50, null=True, blank=True
4.
class Actor(models.Model)
       name = models.charField(max_length=50, null=True, blank=True)
class Movie(models.Model):
      name = models.charField(max_length=50, null=True, blank=True
    
class Movie actor(models.Model):
actor = models.ForeignKey(Actor)
movie = models.ForeignKey(Movie)
    
Anjali
Can I use all these 4 diff ways?
Mohamed Hadramy
2nd seems appropriate
Pouya
Hi,
Can anyone help me?
I am a bit confused.
I want to create a database movie for representing actors and movies.
1.
class Actor(models.Model)
name = models.charField(max_length=50, null=True, blank=True)
class Movie(models.Model):
name = models.charField(max_length=50, null=True, blank=True
actor = models.ForeignKey(Actor)
2.
class Actor(models.Model)
       name = models.charField(max_length=50, null=True, blank=True)
class Movie(models.Model):
      name = models.charField(max_length=50, null=True, blank=True
     actor = models.ManytoManyField(Actor)
3.
class Actor(models.Model)
       name = models.charField(max_length=50, null=True, blank=True)
movie = models.ForeignKey(Movie)
class Movie(models.Model):
      name = models.charField(max_length=50, null=True, blank=True
4.
class Actor(models.Model)
       name = models.charField(max_length=50, null=True, blank=True)
class Movie(models.Model):
      name = models.charField(max_length=50, null=True, blank=True
    
class Movie actor(models.Model):
actor = models.ForeignKey(Actor)
movie = models.ForeignKey(Movie)
    
1,3 Is not correct, between 2 and 4 I choose 4th cause you can quey each actor's movies and each movie's actors.
Pouya
kiran
Is it important to know django channels to become a django developer
Issa N'golo
Can I use all these 4 diff ways?
takes the second relationship because an actor stars in one or more movies and a movie contains one or more actors, there is a many-to-many relationship
Issa N'golo
kiran
Okay..
Hirbod;
hi
i have problem with using persian url in my slugs in django
here is https://stackoverflow.com/questions/75005147/persian-url-in-cpanel-django
Issa N'golo
anyone know how to use the requets library? I want to make an api call but I encountered an error "a parameter is missing" but I think I have put all the required parameters to make the api call.
Mirco