Anonymous
Okayyy
Anonymous
Thankyou
Vitaliy
Please advise what is the best AWS windows based server for Django.
shelby
Is it a must to know about django templateing lanuage to build a something
Yehor
Hey, I am importing third party app to my Django project, I have admin.site.urls included in to my urls.py, and the app is in the isntalled apps, models are visible by show_migrations and applyed, the 3rd party app has admin tables that are registered inside it, but I can not see it at my /admin/ page. Here is the admin.py of 3rd party app I am trying to include to my project
https://github.com/xtrinch/fcm-django/blob/master/fcm_django/admin.py
Why it’s not visible inside my admin page ? (the urls are working once I added views to a router and run migrations)
I laso checked demo project of fcm_django and I didn’t found any specifics regarding admin page. It’s just working with this urlpatterns url(r'^admin/', admin.site.urls), I have the same within my project and /admin/fcm_django/fcmdevice/ is not there
GOJO
Which web server is best for django?
Mr.AkB
ModuleNotFoundError: No module named 'restframework'
Mr.AkB
Any one please help me to resolve.
Anonymous
Mr.AkB
Yes I Know....
I am using mkvirtualenv.
Mr.AkB
I have freeze and checked its installed.
Awele
You called it wrongly then.... or didn't put it in your settings.py INSTALLED APPS
Anonymous
Mr.AkB
INSTALLED_APPS = [
'rest_framework',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'corsheaders',
'phone_field',
'rest_framework_simplejwt',
'account',
]
Mr.AkB
Mr.AkB
from rest_framework.responce import Response
from rest_framework import status
from rest_framework.viwes import APIView
Maxim
Mr.AkB
*typo 👍
RKIN
Hi! Can you please help me?
I need to get value from dictionary, but it contains ::. What can i do?
{{ m.COLOR::VISPLAYER }}
Error: Could not parse the remainder: '::VISPLAYER' from 'm.COLOR::VISPLAYER'
cj
Anonymous
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Отказано в доступе: 'C:\\ProgramData\\Anaconda3\\Lib\\site-packages\\PyQt5\\py.typed'
Consider using the --user option or check the permissions.
can you help me
Drag
Can anyone please send some links about payment systems in Django
cj
Anonymous
Doragonsureiyā
how about bing ? 😂
Jokes are better made at @pythonofftopic.
It's better not to make jokes here.
Be sure to delete this very funny joke.
Mh Asif
Hii
Can anyone suggest me from where i can start learning django , actually i have 2 years of experience in DevOps... Now i want to learn django
Ramil
Mh Asif
Mh Asif
GOJO
GOJO
Doragonsureiyā
Looking for Django tutorials? you can follow these three recommended ones:
* Official documentation and tutorial
* Tutorial from MDN
* Tutorial from django-girls
aRi
Code with mosh's course
Django for beginners 4.0 (book)
Other courses of YT and Udemy
After all, document
Khashayar
aRi
saravana rajan
Anybody help me to done this in django
❤️Create a products API to list all the products based on rating (sort the products based on the high rated products)
❤️Create a order API (post) to order a product with quantity
❤️Create a product API to view/add rating and review
❤️Create a orders API to list all the orders done by the user (sort the products based on the high rated products)
❤️User can only see the orders which is completed by him
❤️Orders should be sorted based on the "order date"
❤️Return a product API to return product if damage (on return the quantity should increase)
saravana rajan
Anyone help me to do this
Hasan
hi
I have one model that all fields have default values so there is no need to give data in creating a record
But how can I create a record without passing any data?
عبد القيوم
Doragonsureiyā
Anyone help me to do this
What have you tried to do, to solve that issue?
Show your code (read rule 5⃣ first) and explain where, and why, you're stuck.
Raheem
Iam trying to study Django from the basics. Can anyone suggest tutorials, websites etc.
Maxim
A
Hi , I'm building single vendor store and every store has a unique slug when I enter it , I see the customer store .
Basic Explanation :
As a simple thing I select the items I want and move to the checkout !
What I want to do :
When anyone presses the checkout button , the message should be formatted and send the card to the customer whatapp !
The code :
def SendOrder(request ,order, sent_to_admin, plain_text, email) :
if (email.id == 'customer_completed_order' or email.id == 'new_order') :
link = str(str('https://wa.me/' + str(order.get_billing_phone('edit'))) + '/?text=') + urlencode('your text messages')
print(str(str(str(str(str('<div style="margin-bottom: 40px;">
<h2>' + str(('Customer WhatsApp link', 'text-domain'))) + '</h2>
<p><a href="') + str(link)) + '" target="_blank">') + str(('Contact', 'text-domain'))) + '</a></p>
</div>',end="");
A
I'm trying to format it to send it to the costumer WhatsApp
A
Any help ?
Mirco
Any help ?
first of all change the signature from SendOrder to send_order
if you don't study Python, you will never be a good Djangonaut
Mirco
second point, you have better ways to create html rather than this bad way
Finjp
Can we print username in middleware ??
Of course
Hello, I receive follow error yet after fix my date column in my models. How can I fix it ? django.core.exceptions.ValidationError: ['“” value has an invalid format. It must be in YYYY-MM-DD HH:MM[:ss[.uuuuuu]][TZ] format.']
Of course
Anonymous
Anonymous
Amd check once
Of course
django.core.exceptions.ValidationError: ['“” value has an invalid format. It must be in YYYY-MM-DD HH:MM[:ss[.uuuuuu]][TZ] format.']
Of course
Of course
class Post(models.Model):
title = models.CharField(max_length=150)
image = models.CharField(max_length=100)
excerpt = models.CharField(max_length=200)
date = models.DateTimeField(auto_now=True)
content = models.TextField(validators=[MinValueValidator(10
)])
author = models.ForeignKey(
Author, on_delete=models.SET_NULL, related_name='posts', null=True)
slug = models.SlugField(unique=True, default='',
db_index=True, null=False, blank=False)
tag = models.ManyToManyField(Tag)
Of course
Patricio
Hi I know this may not be the group for this and I am sorry if it’s been talked before, I’ve searched but didn’t find anything.
Can you recommend me a group or page where to finde Django jobs?
Thank you in advance
Mirco
Nasib
guys I have just come across this django application called easy-thumbnail and I don't what is and have tried to gogle there are no enough details about
Hunter
Hiii...can anyone help me...
How to send auto mail whenever I receive mail in my inbox... django mail
Hunter
I mean whenever I get an email...a auto reply should go to sender
Павел
Hi all! There is a task to make a button that will allow users to copy an element in the admin panel.
How I did it: I overridden the response_change method in my app's admin.py, which keeps track of if the "copy" button is clicked. If it is pressed, then a special function takes all the names of all fields in the model and their values, from which it collects a dict. For example, for a user model, it would look like this: {"name": "Thomas", "age": 20}
This dict is then converted into url parameters via urllib.parse.urlencode(). And the user who clicked the "copy" button is redirected to the page /admin/app_name/add/?name=Thomas&age=20
That is, the created "copy" is not actually stored in the database, but simply opens the "add" page with pre-filled values
This works well with all the data types I need except JSONField. json example: {"test": true}
When I try to pass it in url parameters, it doesn't work. If I just take the values of my json field and pass it to the url, then in the admin panel it will be displayed as {'test': True}, this is not a valid json. Then I tried to get valid json through json.dumps(). In the url it is passed as %7B"test"%3A+true%7D which is {"test": true} when decoded, which is correct. But the django admin displays it as "{\"test\": true}", by itself adding quotes at the beginning and end and escaping the existing quotes with the character /
Is it possible to somehow fix this? Code example: https://www.toptal.com/developers/hastebin/ifofufuxus.properties
Tulasi
Hello i received below error
Cryptography.fernet.InvalidToken.
I am receiving this error encryption part was done while decrypting iam getting this error.
Tulasi
Any leads must appreciated
Tulasi
And as iam taking encrypted data from db the data type is string now that I converted to bytes and sending for decryption
salar
Tulasi
But if iam trying to sent encrypted data directly for decryption without having db it's working