Ashish
Actually I want to lock screen so that user cannot access another tab
Ashish
For cheating and something like that
Groot
Actually I want to lock screen so that user cannot access another tab
😅sorry i don't read well that time I don't have any idea But its good to add in my project thanx😃
Ashish
No problem
Groot
$(window).blur(function() { alert('You are not allowed to leave page blah blah'); //do something else });
Groot
Found that one by js it notice when user mouse focus out of your page
Groot
Than he will get message but you can also add other function
Groot
Use according to your idea
Conditional elector of HRE
Try writing form.as_p in if block just after is_valid
So: <form class = "create_trailer_form" enctype = "multipart / form-data" method = "post"> {% csrf_token%} {% if form.is_valid%} {{form.as_p}} <h1> Form is valid </h1> {% else%} {{form.errors}} {% endif%} {{form.as_p}} <input type = "submit" value = "Create article"> </form> ?
Anonymous
Yes
Anonymous
Checked?
Anonymous
Instance of trailor is creating in database right?
Conditional elector of HRE
Checked?
No working
Anonymous
If you are getting values here or not
Abdalwhab
hi , i need help in django dashboard
Abdalwhab
like this dashboard : https://django-material-dashboard.appseed-srv1.com/login/?next=/
Yogi
Hiii i need help in django framework
Doragonsureiyā
Hiii i need help in django framework
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z!" Just ask directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
John
Can anyone help me how to show a foreign key model fields in admin panel
John
Please
John
In admin.py ??
Daler
Can anyone help me how to show a foreign key model fields in admin panel
https://docs.djangoproject.com/en/3.2/ref/contrib/admin/#inlinemodeladmin-objects
Crack
Tyeerror at /gettoken/ Unsupported operand type(s) for + : 'datetime.datetime' and 'bool'
Son
hi...! who knows how to creat USSD application using python
Crack
How to solve this error
Help me guys plz
Anonymous
Help me guys plz
How two different data type objects can be added?
Anonymous
What you want to do, show code
Anmol
what about atom , is there any major difference between atom and vscode ?
Ramana
We have open positions for full stack developers with 3 to 4 years experience in Django+React. Please send your resume to recruitmentindia@itcrats.com
Doragonsureiyā
We have open positions for full stack developers with 3 to 4 years experience in Django+React. Please send your resume to recruitmentindia@itcrats.com
Rule 🔟: Job-related offers are only allowed in the offtopic group. To not be considered spam, Job offers must include: • Skillset/techstack • Contact information • Brief job description • Pay figure • And can only be posted in @PythonOfftopic.
Mirco
what about atom , is there any major difference between atom and vscode ?
VSCode is currently much much better especially with the latest release of Pylance
Anmol
okay 👍🏻
Tanu
How do I start django from basic
Tanu
Plzz tell me
Aman Jain
How do I start django from basic
First learn how django works thens learn basic concept
Nikkey
How do I start django from basic
start from youtube django tutorials then projects
Aman Jain
Then follow very academy in YouTube clear concept
Aman Jain
Make projects solve problems
Piyush
How do I start django from basic
Best way to learn basic thing is Django Documentation https://docs.djangoproject.com/en/3.2/
Tanu
Thanks 😊
Piyush
Thanks 😊
Go here to learn Django with a small project https://youtube.com/playlist?list=PL6gx4Cwl9DGBlmzzFcLgDhKTTfNLfX1IK
Crack
What you want to do, show code
Token and refresh token
Arslan
Token and refresh token
You can use this https://django-rest-framework-simplejwt.readthedocs.io/en/latest/
Conditional elector of HRE
Hello! Why isn't the post method? Here is the views.py code: def registration (request): if request.method == 'POST': form = TrailerForm (request.POST) if form.is_valid (): name_user = form.cleaned_data ['username'] email_user = form.cleaned_data ['email'] password = form.cleaned_data ['password1'] password2 = form.cleaned_data ['password2'] user = User.objects.create_user (name_user, email_user, password) user.save () return HttpResponse ("You can now sign in to your account!") else: form = TrailerForm () return render (request, 'polls / registration.html', {"form": form}) Here is the forms.py code: class UserForm (UserCreationForm): username = forms.CharField (widget = forms.TextInput (attrs = {'id': 'user_username', 'placeholder': 'Your nickname'})) email = forms.CharField (widget = forms.EmailInput (attrs = {'id': 'user_email', 'placeholder': 'Your mail'})) password1 = forms.CharField (label = 'Password', widget = forms.PasswordInput (attrs = {'id': 'user_pass', 'placeholder': 'Your password'})) password2 = forms.CharField (label = 'Password repeat', widget = forms.PasswordInput (attrs = {'id': 'user_pass', 'placeholder': 'Please rewrite your password'})) Here is the registration.html code: <div class = "registration_form"> <h1> Registration </h1> <form method = "post"> {% csrf_token%} {{form.username}} {{form.email}} {{form.password1}} {{form.password2}} <input type="submit" id="user_submit" value="Register"> </form> </div>
Anonymous
Hello! Why isn't the post method? Here is the views.py code: def registration (request): if request.method == 'POST': form = TrailerForm (request.POST) if form.is_valid (): name_user = form.cleaned_data ['username'] email_user = form.cleaned_data ['email'] password = form.cleaned_data ['password1'] password2 = form.cleaned_data ['password2'] user = User.objects.create_user (name_user, email_user, password) user.save () return HttpResponse ("You can now sign in to your account!") else: form = TrailerForm () return render (request, 'polls / registration.html', {"form": form}) Here is the forms.py code: class UserForm (UserCreationForm): username = forms.CharField (widget = forms.TextInput (attrs = {'id': 'user_username', 'placeholder': 'Your nickname'})) email = forms.CharField (widget = forms.EmailInput (attrs = {'id': 'user_email', 'placeholder': 'Your mail'})) password1 = forms.CharField (label = 'Password', widget = forms.PasswordInput (attrs = {'id': 'user_pass', 'placeholder': 'Your password'})) password2 = forms.CharField (label = 'Password repeat', widget = forms.PasswordInput (attrs = {'id': 'user_pass', 'placeholder': 'Please rewrite your password'})) Here is the registration.html code: <div class = "registration_form"> <h1> Registration </h1> <form method = "post"> {% csrf_token%} {{form.username}} {{form.email}} {{form.password1}} {{form.password2}} <input type="submit" id="user_submit" value="Register"> </form> </div>
In views.py, instead of TrailerForm, you should have your own form you created, i.e.. UserForm
ann
Hello everyone. My app needs to upload images to two different folders within an image folder Here is my folder tree: MYPROJECTFOLDER |—my project/ |—my app/ |—images | |------folder_user1 | |———folder(dynamic) | |———image.ext | |------folder_user2 | |------ image.ext
Amir
is django rest ? error code?
No. Just django 3.2
Amir
is django rest ? error code?
I wrote that in question
Amir
change media root
What has that got to do with it?
coder
What has that got to do with it?
https://docs.djangoproject.com/en/3.2/howto/static-files/
ann
change media root
MEDIA_URL = os.path.join('images') can be specified but how to add images to two folders within image
Raghav
changing templates code doesnt reflect on website
Raghav
what to do
Raghav
This happened after i changed my device
Amir
https://docs.djangoproject.com/en/3.2/howto/static-files/
I know static files but i can't understand that relationship with the error
ann
show me a code
class Employee(models.Model): image = models.ImageField(upload_to=“images”)
Ashkan
MEDIA_URL = "/media/" MEDIA_ROOT = BASE_DIR / "media"
Amir
do u have 2 profile in this group?
I created 3 users with different permissions to work with some features in django