D🌷
Qwerty
Qwerty
It's a bad practice.
Suryo Adhy Chandra
Mr. Developer
Hello Developers,
I need one help please
Page not found (404)
Request Method: GET
Request URL: http://localhost:8000/
Using the URLconf defined in crudproject1.urls, Django tried these URL patterns, in this order:
admin/
[name='addandshow']
The empty path didn’t match any of these.
my code
``
from enroll import views
urlpatterns = [
path('admin/', admin.site.urls),
path(' ', views.add_show, name="addandshow"),
]
def add_show(request):
return render(request, 'enroll/addandshow.html')
I'm new in django
Mr. Developer
dosya
Hey! On my windows computer, i open windows shell, and after 4 seconds it is automatically disappearing. Could you please assist?
Nushh
Hello everyone!
If anybody could help me , pls do. My css and js files are not reflecting on my django project even after linking it correctly.
Anonymous
Anonymous
Nushh
<link rel="stylesheet" type="text/css" href="{% static '../../firstpage/static/sayanaocr.css' %}">
Maxim
Hello, I am working on a small app, where anonymous users will be booking appointments to the office365 calendar of the app subscriber. The front end uses rest_framework_simplejwt authentication.JWTAuthentication for Authentication for Subscribers, but what is the best approach to store tokens for anonymous users? I do need to store OAuth token to pass it to the end point, should it be done via custom payload ?
Nushh
Azhan
Have you added {% load static %}
Nushh
Azhan
At the top of html file
Azhan
Above doctype
Nushh
Okay
Azhan
If still not working show me your file structure
Nushh
Okay
Nushh
Azhan
Okay
Dj - 505
If i did web application django project and deployed it on free hos , how can get vistors to check and evaluate our work?
The programmer need real users to discover his project and evaluate it ..?
Rose
User Benso has 1/3 warnings; be careful!
Reason:
useless "hello"
..
When can I learn video tutorials on django channels step by step.
Rahul
..
Estomihi
I have installed Tailwind CSS on my Django project. However, after the installation, I observed that the admin page does not have the proper CSS and JavaScript settings as default. Does anyone have a similar experience or know a solution to this problem?
nimbus
Rose
User Rajat has 1/3 warnings; be careful!
Reason:
totally offtopic
Haleem
I couldn't able to send email from godaddy professional email.. BUt its working fine with gmail smtp connection.. can you check if the below is ok please
BASE_URL = 'http://localhost:8000'
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtpout.secureserver.net'
EMAIL_PORT = 465 # GoDaddy SMTP port
EMAIL_USE_SSL = True # Use SSL for secure connection
EMAIL_HOST_USER = 'support@website.com' # Your GoDaddy email address
EMAIL_HOST_PASSWORD = 'mypassword' # Your GoDaddy email account password
Anonymous
Can you share the error
Haleem
I am not getting any error.. but mail not going.. its working fine if i use gmail authentication
Anonymous
Is that email configuration in GoDaddy is working fine... ?
Is there any way to send test mails through GoDaddy... ?
Haleem
Haleem
Haleem
its working now if i use DEFAULT_FROM_EMAIL... is it compulsery ?
Rose
User PEMIDI has 1/3 warnings; be careful!
Reason:
contextless link
Mirco
Move to @python
Rose
User Arrav has 1/3 warnings; be careful!
Reason:
totally offtopic to DJANGO
Shawna
anyone can explain to me the danger of setting null=True why they don't recommend it and if so why it exist
i have set one field in model null=true because this field is optional is there a security issue i should be aware of ?
Alex
Shawna
Maxim
Shawna
meaning in serializer i should be able to assign allow_null=true
Shawna
and if i don't then the field must be passed
Shawna
Shawna
Ibnu
ImportError: cannot import name 'ContentType' from 'uniclass.models' how to solve this?
Ibnu
its in admin.py and eventhough its in installed app, its showing me this when i make migrations
Amir
Can I learn django best site !
Maxim
move means delete here
Rose
User Murodulla has 1/3 warnings; be careful!
Reason:
contextless offtopic link
Husen
Hello everyone, I need to make a model that does soft delete user register but can't login, please guide me.
M R. WICK
I want to add courier api with my django e commerce website please help me out
Tushar
In anchor tag how I get the name of anchor tag in django view
Charly
Tushar
When I hit the anchor tag then how can I know which anchor button clicked in view
Charly
Rose
Can I learn django best site !
Looking for Django tutorials? you can follow these three recommended ones:
* Official documentation and tutorial (https://docs.djangoproject.com/en/dev/intro/tutorial01/)
* Tutorial from MDN (https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django)
* Tutorial from django-girls (https://tutorial.djangogirls.org/en/)
Amir
Maxim
the test says something's wrong
it doesn't tell you how to fix it, that's for the programmer to know
салли
class Delivery(models.Model):
order_id = models.ForeignKey(Order, on_delete=models.PROTECT, related_name='delivery')
address = models.CharField(max_length=120)
latitude = models.FloatField(blank=False, null=False)
longitude = models.FloatField(blank=False, null=False)
status = models.CharField(max_length=10, blank=False, null=False, choices=(
('searching', 'Searching'),
('in-process', 'In-process'),
('delivering', 'Delivering'),
('delivered', 'Delivered'),
('canceled', 'Canceled')
), default='searching')
amount = models.FloatField(max_length=6)
courier = models.ForeignKey(Courier, on_delete=models.SET_NULL, null=True)
started_at = models.DateTimeField(auto_now_add=True)
completed_at = models.DateTimeField(null=True, blank=True)
def __str__(self):
return f'{self.order_id} - {self.status}'
def save(self, *args, **kwargs):
from .kafka.sender import send_delivery_to_tg
super().save(*args, **kwargs)
send_delivery_to_tg(self)
Can some1 explain me why edit page of this model in django admin panel loading for 10 secs??
TonFutures 💎
Hi everyone
I have a question
What is diffrent between RestFramework and Views?
I think they same
Example :
return JsonResponse({'status' :200})
So i think this is a API 😐
Victor
class Delivery(models.Model):
order_id = models.ForeignKey(Order, on_delete=models.PROTECT, related_name='delivery')
address = models.CharField(max_length=120)
latitude = models.FloatField(blank=False, null=False)
longitude = models.FloatField(blank=False, null=False)
status = models.CharField(max_length=10, blank=False, null=False, choices=(
('searching', 'Searching'),
('in-process', 'In-process'),
('delivering', 'Delivering'),
('delivered', 'Delivered'),
('canceled', 'Canceled')
), default='searching')
amount = models.FloatField(max_length=6)
courier = models.ForeignKey(Courier, on_delete=models.SET_NULL, null=True)
started_at = models.DateTimeField(auto_now_add=True)
completed_at = models.DateTimeField(null=True, blank=True)
def __str__(self):
return f'{self.order_id} - {self.status}'
def save(self, *args, **kwargs):
from .kafka.sender import send_delivery_to_tg
super().save(*args, **kwargs)
send_delivery_to_tg(self)
Can some1 explain me why edit page of this model in django admin panel loading for 10 secs??
Include autocomplete_fields in Admin for related models.
Victor
https://docs.djangoproject.com/en/5.0/ref/contrib/admin/#django.contrib.admin.ModelAdmin.autocomplete_fields
Alex
i have this try catch block but valueError is giving me -- ContentNotRenderedError at /api/edda/status/
The response content must be rendered before it can be iterated over.
Alex
try:
date = parse_date(date_param)
if date:
return queryset.filter(created_at__gte=date)
except ValueError:
return Response(
{'error': _(
'Invalid date format. Please provide the date in YYYY-MM-DD format.')},
status=status.HTTP_400_BAD_REQUEST
)
Alex
I am getting ContentNotRenderedError
Alex
the issue is at except ValueError is there another way of printing it? I have tried JsonResponse it's still giving an error , i want it when it reaches this stage give a response that says invalid date format
shameer
Alex