Anonymous
How do i enable Blog titles in the home page to redirect to the blog details page when a user clicks a Blog title.
Anonymous
How to style django forms .. LIke User Registration, Login etc ?
Anonymous
i.e CSS
Bheeshma
They have already told in documentation
Bheeshma
Go check that out
Anonymous
Thats fine . Everything works with debug = True
i still don't know why the 500 error disappears when adding a slash to the beginning of your static files's url, but i think the problem might be is that you didn't run collectstatic or it's disabled try running it manually in heroku bash and remove the slash at the beginning of you urls
~~~
How to add the css the default usercreation form...like how i can make the facebook login page form...?
Jun
What to do if we don't need some static html part in our detail pages that are inherited from the base class.
Mike
hello how i can to find list of import class like django.contrib... auth, login and e.g.. list for this
Anonymous
I am trying to resolve DNS and using nginx on my server, so can someone tell me how to resolve dns, the site works fine on IP but not on the domain name, my server config looks like this https://pastebin.com/ssLnjHyB can someone tell me what may be wrong, I have also pointed my cloudflare to this IP?
Idk
while doing "manage.py migrate" I getn an error saying. settings.DATABASES is improperly configured. Please supply the NAME value. PS - I just cloned the project on my pc. Is it because my database is not setup properly
Idk
DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql_psycopg2", "NAME": os.environ.get("DB_NAME", ""), "USER": os.environ.get("DB_USER", ""), "PASSWORD": os.environ.get("DB_PASSWORD", ""), "HOST": os.environ.get("DB_HOST", ""), "PORT": os.environ.get("DB_PORT", ""), } } This is the snipet
Idk
@FutureDreams can I dm ?
Future
django.db.utils.OperationalError:FATAL: password authentication failed for user "postgre"
your password doesn't match (apparently). try to remember old password or reset it
Rangubha
Because here I can't send picture
Future
Anonymous
Hello everyone
Anonymous
Somebody know how to fix date input problems in form
Anonymous
I tried many ways but still stuck in it
Anonymous
this is my forms.py
Anonymous
from datetime import date from django.forms import ModelForm, DateInput, TimeInput, TextInput, IntegerField from django import forms from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User from django.core.exceptions import ValidationError from .models import Appointment class CreateUserForm(UserCreationForm): class Meta: model = User fields = ['username', 'email', 'password1', 'password2'] class AppointmentForm(ModelForm): class Meta: model = Appointment fields = 'all' widgets = { 'date': DateInput(attrs={"type": "date"}), 'start': TimeInput(attrs={"type": "time"}), 'duration': TextInput(attrs={"type": "number", "min": "1", "max": "4"}) } def clean_date(self): d = self.cleaned_data.get("date") if d < date.today(): raise ValidationError("Meetings cannot be in the past") return d
Anonymous
how to add search functionality in page using ajax and jquery in django
Ghorz
how to add search functionality in page using ajax and jquery in django
Run Ajax or fetch with post, get the value in python run search and return value
Anonymous
hello guys anyone try Dynamically Add or Remove input fields in django with Jquery ??
Ghorz
hello guys anyone try Dynamically Add or Remove input fields in django with Jquery ??
Yes, it's better off with with Jquery or vallina js than using Django forms
Anonymous
hmm mate ın understand ı need to use valllina js ??
Ariel
how to prevent the rollback at the end of database testing?
Bheeshma
how to prevent the rollback at the end of database testing?
Just delete all migrations file except init.py and your db file
Bheeshma
Simple
Ariel
I want to run tests that use save() to the real datebase, and not the temp one. Is what you've said will do that?
Bheeshma
Wait delete all migrations file in the sense above the point you want to go back
Ariel
i want to prevent it from rolloing back. I want the new data to be saved at the real datebase
Bheeshma
It will sabe, you just have to use DBname.create for creating new entry
Meera
Hello, I have a single model I use CRUD operations on this model using Django's Admin I want a basic functionality here Only Superuser can see all the model data, users, can see theirs data only, they can't see all data or any other users data. That's it
Meera
Make groups and give permission from admin panel
so, I thought, without groups, Using users section I can achieve this
Meera
by user, I mean, Staff member
Bheeshma
Yes you can make groups
Bheeshma
For that
Bheeshma
Otherwise you have to make your own dashboard
Meera
Otherwise you have to make your own dashboard
can't I create users, with only staff status. and adding a user_id field in my model ?
Bheeshma
That's what I am saying, if you want your own thing you have to design your own dashboard or you have to rewrite Django admin panel
Bheeshma
Accordingly and that will be too complicated
Meera
Ok, I created a group with Add, Edit, View rights for my model
Rσуαℓ geeк
But How can I set, Only that user can see his own created data
you still want to use the admin login section or what?
Meera
Currently Django admin is enough Only this functionality I want
Rσуαℓ geeк
Currently Django admin is enough Only this functionality I want
i think you would need to create a dashboard of your own to login other users cause the Django admin was created specifically for the administrator
Meera
Actually, I know, how can I write my own code, with separate dashboard setting foreign key in my table Auth User may have multiple posts (for Post Model) but was checking, if django admin itself can do this
Meera
Django admin is for the super user only unless newer changes are made
https://docs.djangoproject.com/en/3.0/ref/contrib/admin/#django.contrib.admin.ModelAdmin.get_queryset
Meera
I think this should work What you say
Meera
showing entries to their author only
Rσуαℓ geeк
Tejesh
Also has anybody used Django's TimeFramedModel ¿
Anonymous
Pls How do I download django with support for vscode
Anonymous
Anonymous
Anonymous
How do I import a model to another model
Anonymous
How do I import a model to another model
I need Post from home.model in comment.model
Vaibhav
Lookin for some project ideas in django any suggestions