Leo
Patience
Patience
Is anyone please who can share with me how he made Django Celery or working documentation he used?
Because I tried for more than 2 weeks on celery till now not working.
flusq
How to send file to user in Django?
.
Anonymous
someone can help to me for rest api
Anonymous
i have a model and in model i have ForeignKey but when i post in postman klient shows null
Anonymous
how can i solve this
Anonymous
can anyone please suggest me how to use proper decorator,
Anonymous
everytime i used it shows 'next' keywords in url
Mahendar
I have a flask application and need to create API endpoints and also could you let me know how restore data into mongodb
Tukhtamurod
Mahendar
Jai
Zey
How can we change password without using django authentication ?
ABC
(534, b'5.7.9 Application-specific password required. Learn more at\n5.7.9 https://support.google.com/mail/?p=InvalidSecondFactor l16sm8847170qkg.91 - gsmtp')
ABC
how to solve this error ?
Patience
Patience
Patience
Please remember, don't expect to be help without help others.
Try to help others what you know.
Bral Bral
Is the correct approach to access another view in within another view? In DRF
Patience
Johny
I am new to django.. learning django 3 from youtube right now. I am interested in doing eCommerce or equivalent type of project to have great hands-on. Please guide.
Demon
Kk sorry
Abhishek
Patience
Is any alternative library for celery for task scheduling please?
Patience
Anonymous
Shay
Hi, does anyone has website with django which is contain registration and chat?
Shay
I have one i made by myself but i dont know how to connect between db and the site
So if one of you can help me it will be very good also
Enigma
Enigma
for example if you want to make a registration system
Shay
I have user class and i want to create user object for every one who sign up
Enigma
Shay
No
Shay
Canyou help me with doing this?
Enigma
No
so it's lot to say I'll try to say it in brief in some little examples
Shay
Ok thanks
Dmitry
Enigma
Ok thanks
for example you want users email to submit it into db
you had to create a forms.py file in your app's directory.
inside of the forms.py you can have a class form like "class RegisterForm(forms.Form):"
Enigma
and inside of this RegisterForm class
for email
email = forms.EmailField()
Enigma
after this in your views.py you had to check if the form's request is POST or not
you can do this like this:
register_form = RegisterForm(request.POST or None)
Shay
from django.db import models
from django.utils import timezone
# Create your models here.
class User(models.Model):
user_name = models.CharField(max_length=12, primary_key=True)
password = models.CharField(max_length=16)
email = models.CharField(max_length=30)
Shay
this is from models
Enigma
then check if the regster_form is valid or not
do this with this line:
if register_form.is_valid():
Shay
where should i write it
Pratik
Hey tell me how to dockerize django application
Pratik
On Mac OS
Shay
im on windows
Anonymous
Page not found (404)
Request Method: GET
Request URL: http://127.0.0.1:8000/about.html
Using the URLconf defined in DJ.urls, Django tried these URL patterns, in this order:
The current path, about.html, 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.
how can I solve this
~~~
how to design the default django ModelForm (.as_p)??
Zey
I am getting this error don't know why
File "C:\Project\eshop\home\urls.py", line 2, in <module>
from . import views
File "C:\Project\eshop\home\views.py", line 5, in <module>
from .forms import RegisterForm,VendorForm,LoginForm,Profile,AddressForm
File "C:\Project\eshop\home\forms.py", line 34
'state':forms.Select(attrs={'class':'form-control form-control-sm'}),
^
SyntaxError: invalid syntax
Enigma
I am getting this error don't know why
File "C:\Project\eshop\home\urls.py", line 2, in <module>
from . import views
File "C:\Project\eshop\home\views.py", line 5, in <module>
from .forms import RegisterForm,VendorForm,LoginForm,Profile,AddressForm
File "C:\Project\eshop\home\forms.py", line 34
'state':forms.Select(attrs={'class':'form-control form-control-sm'}),
^
SyntaxError: invalid syntax
'form-control form-control-sm' is not valid
try
'form-control-sm'
or just
'form-control'
Zey
Enigma
Zey
class SellerRegisterForm(forms.ModelForm):
class Meta:
model=SellerRegister
fields=['name','mobile','email','password','retype_password','state','city','pincode','pickup_address']
labels={'retype_password':'Password(again)'}
help_text={'first_name':'Enter Your Name'}
widgets={'name':forms.TextInput(attrs={'class':'form-control form-control-sm',
'placeholder':'Enter Full Name'}),
'mobile':forms.TextInput(attrs={'class':'form-control form-control-sm',
'placeholder':'Mobile No'}),
'email':forms.EmailInput(attrs={'class':'form-control','placeholder':'Enter Your Email'}),
'password':forms.PasswordInput(attrs={'class':'form-control form-control-sm',
'placeholder':'Enter Your Password'}),
'retype_password':forms.PasswordInput(attrs={'class':'form-control form-control-sm',
'placeholder':'Enter Your Password again'})
'state':forms.Select(attrs={'class':'form-control form-control-sm'}),
'city':forms.TextInput(attrs={'class':'form-control form-control-sm',
'placeholder':'City'}),
'pincode':forms.NumberInput(attrs={'class':'form-control form-control-sm',
'placeholder':'Pincode'}),
'pickup_address':forms.TextInput(attrs={'class':'form-control form-control-sm',
'placeholder':'Address'}),
}
def clean(self):
cleaned_data=super().clean()
val1=self.cleaned_data['password']
val2=self.cleaned_data['retype_password']
if val1!=val2:
raise forms.ValidationError('Password not matched')
Umar
class SellerRegisterForm(forms.ModelForm):
class Meta:
model=SellerRegister
fields=['name','mobile','email','password','retype_password','state','city','pincode','pickup_address']
labels={'retype_password':'Password(again)'}
help_text={'first_name':'Enter Your Name'}
widgets={'name':forms.TextInput(attrs={'class':'form-control form-control-sm',
'placeholder':'Enter Full Name'}),
'mobile':forms.TextInput(attrs={'class':'form-control form-control-sm',
'placeholder':'Mobile No'}),
'email':forms.EmailInput(attrs={'class':'form-control','placeholder':'Enter Your Email'}),
'password':forms.PasswordInput(attrs={'class':'form-control form-control-sm',
'placeholder':'Enter Your Password'}),
'retype_password':forms.PasswordInput(attrs={'class':'form-control form-control-sm',
'placeholder':'Enter Your Password again'})
'state':forms.Select(attrs={'class':'form-control form-control-sm'}),
'city':forms.TextInput(attrs={'class':'form-control form-control-sm',
'placeholder':'City'}),
'pincode':forms.NumberInput(attrs={'class':'form-control form-control-sm',
'placeholder':'Pincode'}),
'pickup_address':forms.TextInput(attrs={'class':'form-control form-control-sm',
'placeholder':'Address'}),
}
def clean(self):
cleaned_data=super().clean()
val1=self.cleaned_data['password']
val2=self.cleaned_data['retype_password']
if val1!=val2:
raise forms.ValidationError('Password not matched')
I think you are missing comma (,) somewhere
Zey
Umar
Enigma
Enigma
Yes
after 'Enter Your Password again'})
Zey
Umar
Ok let me know
Enigma
you missed a ,
Enigma
class SellerRegisterForm(forms.ModelForm):
class Meta:
model=SellerRegister
fields=['name','mobile','email','password','retype_password','state','city','pincode','pickup_address']
labels={'retype_password':'Password(again)'}
help_text={'first_name':'Enter Your Name'}
widgets={'name':forms.TextInput(attrs={'class':'form-control form-control-sm',
'placeholder':'Enter Full Name'}),
'mobile':forms.TextInput(attrs={'class':'form-control form-control-sm',
'placeholder':'Mobile No'}),
'email':forms.EmailInput(attrs={'class':'form-control','placeholder':'Enter Your Email'}),
'password':forms.PasswordInput(attrs={'class':'form-control form-control-sm',
'placeholder':'Enter Your Password'}),
'retype_password':forms.PasswordInput(attrs={'class':'form-control form-control-sm',
'placeholder':'Enter Your Password again'}),
'state':forms.Select(attrs={'class':'form-control form-control-sm'}),
'city':forms.TextInput(attrs={'class':'form-control form-control-sm',
'placeholder':'City'}),
'pincode':forms.NumberInput(attrs={'class':'form-control form-control-sm',
'placeholder':'Pincode'}),
'pickup_address':forms.TextInput(attrs={'class':'form-control form-control-sm',
'placeholder':'Address'}),
}
def clean(self):
cleaned_data=super().clean()
val1=self.cleaned_data['password']
val2=self.cleaned_data['retype_password']
if val1!=val2:
raise forms.ValidationError('Password not matched')
Zey
Thanks man,itis solved now
Pratik
Looking for django react native Dev python dev to develop admin panel website and app etc
This is an internship program plz contact @8884708110
Umar
Salima
Hi...im trying to implement the facebook login to django rest framework..
Salima
from allauth.socialaccount.providers.facebook.views import FacebookOAuth2Adapter
from rest_auth.registration.views import SocialLoginView
class FacebookLogin(SocialLoginView):
adapter_class = FacebookOAuth2Adapter
Salima
Salima
{
"non_field_errors": [
"View is not defined, pass it as a context variable"
]
}
Salima
Can someone help?
Akhil
Module 'django.db.models' has no attribute 'RESTRICT'
Akhil
Can anyone tell me what's wrong in this
Akhil
??