Daro
It's by default
well then is on
Daro
i do not override it
Mirco
So this why you see that errors if you leave the fields blank
Daro
Yes
sorry my stupidity
Daro
how to change that
Daro
just like blank=False? on the field model
Daro
i try that and nothing change
Daro
not even migrations
Mirco
blank equal to True if you don't wanna those fields required
Daro
ok
Daro
ok it
Daro
worked
Daro
thanks
Daro
but i feel thats a temporary solution
Daro
anyways thanks a lot
Mirco
It depends on your needs, these are the basics of Django
Mirco
but i feel thats a temporary solution
It's not a temporary solution
Muflone
What about functions with class
Also functions and classes are basic python concepts
Ghorz
Especially django-q
👍 Perfecto
Ghorz
What about functions with class
No function and classes, no programming
Mirco
Mahima
Hey can anybody please help me out with this??
Mahima
I am using PostgreSQL database and whenever I am doing migrations and run the command python manage.py migrate then it's running successfully but even then On pgadmin I am not getting any table like this?
Mahima
Yes
Mahima
I did
AM
I am using PostgreSQL database and whenever I am doing migrations and run the command python manage.py migrate then it's running successfully but even then On pgadmin I am not getting any table like this?
1st you have to create a database after you have to put that name into settings.py file, then to get a table you have to create model inside the models.py file which is inside your app, then run the command “ python manage. py makemigrations” then “ python manage. py migrate
Mahima
Yeah I followed all the steps
Mahima
And the migrate command also ran successfully
AM
Can u share a picture of ur setting. Py file
AM
Db portion
Mirco
Not allowed
AM
Okk
Mahima
No pictures are allowed in this group
Mirco
We have rules
Mirco
! rules
Doragonsureiyā
Read the rules before any activity: @PythonRules
AM
Then check the database name properly
AM
And port, pass
Mahima
When I didn't gave its name property then it throwed an error so yeah now I corrected that
Mahima
Yeah I checked that too and when it ran successfully then I run command of migrate
Bradypodion
Yes.
What version of pycharm are you using?
Bradypodion
Are you having this problem with django? If yes you should configure the git hooks in the settings.py
Sencer
What version of pycharm are you using?
Latest stable, 2020.3.4 if I remember correctly.
Anonymous
What is the best way to add internationalization (Portuguese and English) using wagtail as headless CMS? I saw some packages, but I don't know how it works. The only thing I understood is that you have to duplicate the fields, containing the content for each language [20:39] flakesrc: internationalization = text|richtext translation [20:40] flakesrc: i think that create one model for each language is more easy. I just need add the content for the different languages, and set endpoint for each one
Anonymous
Hello all I am facing problem during submit the form. When I press submit button the data is not stored in database
Anonymous
Because u r not saving it
@shihasz I added save() method
Shihasz
Doragonsureiyā
@shihasz I added save() method
To share code or error tracebacks please use an online pasting service, here is a list of suggested sites: - https://del.dog - https://dpaste.org - https://linkode.org - https://hastebin.com - https://bin.kv2.dev
Anonymous
This is my link :https://dpaste.org/5zAi
Be sure 1. In ur html u specify name for input . 2. Be sure all required fields I'd filled out . 3. Share ur model please 4. Come back
Anonymous
This is my link :https://dpaste.org/5zAi
And in index why u r extracting title , name and others is it wrong bcos u filter all object and yet u r treating like one object may be that is the problem if u want name and other do for loop like For entry in entries: print (entry.name)
Nitish
how to use token for auth post request
Anonymous
This is url for models.py https://dpaste.org/V8A6
Ok it seem ok I think the problem is with ur index () Try running this https://dpaste.org/CcBF
Anonymous
Anonymous
??
Anonymous
but now How I show all entries in my home page one by one
U can just use unordered or ordered list in https://dpaste.org/t69m
Anonymous
<like/> mistake by autocomplete correct it by </li>
Anonymous
U can just use unordered or ordered list in https://dpaste.org/t69m
I used boostrap card to show. In that I have title,text and name
Anonymous
Nayan
Hi guys can someone help me with authorization ? I have create 2 groups , one for read only and other one read write How can i restrict this in views? I have adding/ editing form, read only user should not able to do this and redirect to some page and say you are not authorized for this . Your help will be helpful thank you. 😀
Cesar
if yes, you could check if the user has a permission with request.user.has_perm('MODEL_HERE.PERMISION_NAME_HERE')
Nayan
Are you usung default django groups?
Groups was created through admin page
Nayan
Django groups
Nayan
I am new to django and trying to figure it out how to do this
Cesar
How to use this ? Do you have any example ?
in your form view, right in the first line you write something like: if not request.user.has_perm('Appname.change_modelname'):
Dhruva
I am not able to create super user extending the custom user whenever I try it says Please enter the correct email address and password for a staff account. Note that both fields may be case-sensitive