Anonymous
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.
Nagadeep Sharma
Nagadeep Sharma
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
Shubham
Shubham
~~~
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.
Jun
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?
Anonymous
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
Future
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
have you got DB_NAME as env value?
Idk
@FutureDreams can I dm ?
Future
Rangubha
Future
Rangubha
Rangubha
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
Anonymous
hello guys anyone try Dynamically Add or Remove input fields in django with Jquery ??
Ghorz
Anonymous
hmm mate ın understand ı need to use valllina js ??
Ariel
how to prevent the rollback at the end of database testing?
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
Bheeshma
Bheeshma
Ariel
i want to prevent it from rolloing back. I want the new data to be saved at the real datebase
Tejesh
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
Bheeshma
Bheeshma
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
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
Meera
Rσуαℓ geeк
Meera
Meera
Currently
Django admin is enough
Only this functionality I want
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
Rσуαℓ geeк
Meera
Meera
I think this should work
What you say
Meera
showing entries to their author only
Rσуαℓ geeк
Tejesh
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
Vaibhav
Lookin for some project ideas in django any suggestions