Anonymous
Saikiran you are right! But you know any good website, or udemy, book, or youtube channel that can help
Anonymous
Also I have countered _squlite3 import error when I run the server for first time..
Shubham
You can get free books from genesis library
Pankaj
Pankaj
serializers.CharField accepting integer values in drf. how this happening? Can anyone help me with this.
Salisu
Hello guys, pls how can I calculate renumeration for each staff according to their rank from a course they attended. Course and Staff are model classes in my django project
Anonymous
Armstrong
Please how can I make an API request from pixabay...I want to allow user to be able to search images from pixabay via their api ...how I'm going to integrate the function in my views.py I've my API_KEY from pixabay... anyone please I need this urgently
Uday
I've created a model form and it does not show on the page
models.py
class Newsletter(models.Model):
email = models.EmailField(max_length=254)
name = models.CharField(max_length=50)
timestamp = models.DateTimeField(auto_now_add=True)
def __str__(self):
return self.email
forms.py
class NewsletterForm(forms.ModelForm):
class Meta:
model = Newsletter
fields = ['name', 'email']
views.py
class HomeNewsletterFormView(FormView):
template_name = 'home/base.html'
form_class = NewsletterForm
base.html
<form method="POST" action=''>
{% csrf_token %}
{{ form.as_p }}
<input type="submit">
R.U.S.H.A.B.H
R.U.S.H.A.B.H
Uday
R.U.S.H.A.B.H
C/p code in the pastebin 👆
Mite
What the error exactly says??
Mite
Send us the URls.py code
Uday
https://pastebin.com/VP2TzznH
Uday
Send us the URls.py code
from django.urls import path
from . import views
urlpatterns = [
path('', views.home, name='home')
]
this is it in urls.py
Uday
Mite
Path('home' ,views.HomeNewsletterFormView.as_view(),name='home') try this url pattern
Uday
The form is not particularly only on home template
Uday
It's in the footer
Anonymous
Hi, I am a beginner in django. So, i was trying to show static files in a web page. In settings.py, STATIC_URL is set to '/static/' . I have an app named blog. so, i put a image named main.jpg inside blog/static/blog/main.jpg. But, when i load the page, i see the following error . "GET /static/blog/main.jpg HTTP/1.1" 200 93415"
Anonymous
Based on documentation, it should also look into static folders inside the app's right?
Anonymous
Is there anything i am missing ?
Anonymous
I just restarted the app.. and its working.. weird!
Sai
Sai
Sai
Anonymous
Okay..thank you
Surendar
I am trying to use local SQL Server database as a default database in django application. I have declared database in setting.py file as below:
DATABASES = {
'default': {
'ENGINE': 'sql_server.pyodbc',
'NAME': 'Hospital',
'USER': 'root',
'PASSWORD': 'upload',
'HOST': '127.0.0.1',
'PORT': '',
'OPTIONS': {
'driver': 'ODBC Driver 13 for SQL Server',
'host_is_server': True
},
},
}
While running the server I am getting below error:
conn = Database.connect(connstr,
django.db.utils.OperationalError: ('08001', '[08001] [Microsoft][ODBC Driver 13 for SQL Server]Named Pipes Provider: Could not open a connection to SQL Server [2]. (2) (SQLDriverConnect); [08001] [Microsoft][ODBC Driver 13 for SQL Server]Login timeout expired (0); [08001] [Microsoft][ODBC Driver 13 for SQL Server]Invalid connection string attribute (0); [08001] [Microsoft][ODBC Driver 13 for SQL Server]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. (2)')
pls help me to solve this issue.
Pankaj
serializers.CharField accepting integer values in drf. I have fields like first name and last name. And passing integer 1 to it is saving as "1". how this happening? Can anyone help me with this.
Anonymous
I have small doubt
Anonymous
Am dng a project
Anonymous
I want give total access to security admin
Anonymous
lil meow meow
Hello everyone. I cannot import simple app in my project. I am on Windows OS. And when I'm clicking on install package app_name it gives me an error. Have anyone struggled with this problem?
محمد دلشاد
Cleo
Hello everyone. I have a question: how could I import CSS to my page.
I was trying put some tags like { static }but doesn't works
محمد دلشاد
Harsh
محمد دلشاد
Bunty chhatri wala..
محمد دلشاد
Anonymous
Anonymous
agz
Please how do you handle more than one form in one view
R.U.S.H.A.B.H
R.U.S.H.A.B.H
It'll be easy
agz
Change your naming conventions
I mean handling more than one form class in a Django form. The documentation only explains handling one form class in a view
R.U.S.H.A.B.H
R.U.S.H.A.B.H
Just keep name different
agz
I already did that
Pankaj
محمد دلشاد
Anonymous
How to integrate emails notifications in Django?
For a specific view?
Akhil
Can we make a website appliancation for android using django??
Anonymous
Anyone who uses django at backend in react. Can you tell me is it a good idea or not. Can I use django.auth in that?
محمد دلشاد
Mirco
محمد دلشاد
Mirco
Anonymous
Anonymous
Application*
Anonymous
Anonymous
Akhil
Akhil
I just used python manage.py runserver
Akhil
Then I tried on my google chrome but it's only work in http
Akhil
Not in https why .?
Akhil
Can I not use in https ??