dคv¡d
someone help me out
Have you try leave it blank?
Breeze
i just customized the django model to fit some new feilds
Breeze
This is my models .py https://hastebin.com/kocodezofi.py
dคv¡d
what exactly?
I mean just dont input email and enter... But i dont expert on custom user model.. sorry
Vaibhav
???
objects = MyUserManager() This should be in your myUser model
Breeze
objects = MyUserManager() This should be in your myUser model
should i migrate database after this correction?
Vaibhav
Django creates migration when we change manager but i haven't seen any difference even if you don't migrate
λ701
How to pass an object to a model field?
Breeze
Vaibhav
i just migrated and tried again but got this error https://dpaste.org/SqNE
Can you check the definition of create super user in base manager?
Breeze
Can you check the definition of create super user in base manager?
def create_superuser(self, first_name, last_name, phone, email, password): user=self.create_user( first_name=first_name, last_name=last_name, phone=phone, email=self.normalize_email(email), password=password ) user.is_admin=True user.is_staff=True user.is_superuser=True user.save(using=self._db) return user
Vaibhav
my own code
You have overrided django create super user right, have you checked it's definition?
Breeze
how am i to do tha?
Vaibhav
😅 depends on your editor ...
Maxim
Visual studio
i don't think that was a question i think it was a joke about you having to use the editor
Breeze
Well, i have resolved the issue. The answer has been there all these while. This is the side effect of coding all through the night😂
Amin
do Anyone know ? Is djangobootstrap Library useful or not
Mercy
do Anyone know ? Is djangobootstrap Library useful or not
Please tell us what you need in advance. Don't ask meta-questions
Anonymous
Hi!! Does someone have problems with "./manage.py runserver ". No changes was applied after create and save new object or register new class in admin dashboard it never start to be available from this dash if I'm don't reload the server manualy Will be very thankful if some one give me the start-info about the way to solve this problem
Amin
Please tell us what you need in advance. Don't ask meta-questions
I wanna run a Django bootstrap site so I wanna know is that library useful or not
Azamat
Im using bootstrap4, it is good thing
Azamat
But better connect it with link instead of download it.
NerdDude
Hi, guys! I'm trying to make a blog in Django, never programmed in it. For some reason, data from the database is not displayed. Apparently I'm a tired and therefore I don't see a problem. Can anyone help me? Here is the code on pastebin https://pastebin.com/spEkEfBf
Mirco
And you need to loop over it as you are using the filter and not the get() Or use first()
NerdDude
!yw
thanks :))
Alexander
Hello! My task is to make an openid connect (oidc) - provider and client using Django. Everything that I found I could not start ( 1. I found only two clients - https://docs.authlib.org/en/stable/client/django.html and https://mozilla-django-oidc.readthedocs.io/en/stable/index.html 2. I tried these providers https://github.com/juanifioren/django-oidc-provider - looks abandoned, https://django-oauth-toolkit.readthedocs.io/en/latest/index.html - here I came across the fact that I need to implement the validate_silent_login method myself - I have little expertise in this and did not find any ready-made solutions https://docs.authlib.org/en/latest/django/index.html - I didn't have time to parse it yet, but got stuck on his client. I couldn't find any simple instructions. Maybe someone knows and uses a simple and working solution? Thank you in advance)
Abdalwhab
Hi What is pest way to Create an invoice.
A
Can anyone tell me how to apply update/modify operation in django sqlite3 database in a project
Anonymous
Django redirect after successful login is not working in production with Nginx
Doragonsureiyā
Django redirect after successful login is not working in production with Nginx
Read this please: http://catb.org/~esr/faqs/smart-questions.html#intro
Arav
While adding a new app in my project and I tried to do make migrations and there is an error ''ModuleNotFoundError:No module named cutomer.urls''
Anonymous
While adding a new app in my project and I tried to do make migrations and there is an error ''ModuleNotFoundError:No module named cutomer.urls''
This error is clear. You somehow pointed Django to look for urls in the urls.py module of your customer app but it's unfortunate that module does not exist
Kevin
Can i deploy using dbsql lite, its a very tiny webapp?
Dmitry
Hey there! I'm learning how permissions work and trying to give permission to my custom user model, but has_perm check is always False. I didn't override has_perm method, it was inherit from PermissionsMixin. Here's my shell >>> u.user_permissions.all() <QuerySet [<Permission: records | record | Can view record>]> >>> u.user_permissions.last().codename 'view_record' >>> u.has_perm('records.view_record') False does anyone know what could be wrong?
Dmitry
I restarted shell and now it works 👍
Complex_101
I'm trying to find how to connect Facebook API to python which allows multiple users to sign in through their email and password and then the api can access their profile content and ol. How yo do that? Can anyone suggest any tutorials?
Mirco
Yes
Then uso something like django-allauth to login / sign-up via Facebook
Complex_101
Then uso something like django-allauth to login / sign-up via Facebook
I saw some tutorials but everyone is using the access key and ol that are for one user only. Can you provide some video or help tutorial?
Jugurtha
I found this in the code source : Cache middleware. If enabled, each Django-powered page will be cached based onURL. The canonical way to enable cache middleware is to set``UpdateCacheMiddleware`` as your first piece of middleware, and``FetchFromCacheMiddleware`` as the last:: MIDDLEWARE = [ 'django.middleware.cache.UpdateCacheMiddleware', ... 'django.middleware.cache.FetchFromCacheMiddleware' ]This is counter-intuitive, but correct: ``UpdateCacheMiddleware`` needs to runlast during the response phase, which processes middleware bottom-up;``FetchFromCacheMiddleware`` needs to run last during the request phase, whichprocesses middleware top-down.
♈
Hello guys today's Django 4.0 new version release😊😊
Anonymous
hi i do dockerize a django project with module psycopg2 finally the sizes going to 370~380 MB its normal ? its possible to reduce the sizes ?
ᴀмɪʀ ♛
hi guys, im trying to use rest framework in django, I installed it also add to installed app then migrate manage dot py file, but now when i want to import rest_framework and run app the error say: no module is there with this name!
Anonymous
im sure about that
so check your ide or editor use the same interpreter
Bobosher
hi i do dockerize a django project with module psycopg2 finally the sizes going to 370~380 MB its normal ? its possible to reduce the sizes ?
For the whole image, it's quite normal. Because, now your image contains core parts of some linux distribution apart from your project.
Anonymous
For the whole image, it's quite normal. Because, now your image contains core parts of some linux distribution apart from your project.
thanks , i know that but the size increases from 58MB to 370MB only because needs to install postgresql-dev for psycopg2,so I asked for that,any solution for install psycopg2 without postgresql-dev
Anonymous
psycopg2-binary
i try it not working
Anonymous
Hey i m getting error table shop_blog has no column named name in Django can anyone help me When I checked migrations column name is present but still it is showing error
Роман
Good afternoon. I have django 1.11 and local postgres. I want to write tests for which I need to use models. Tell me, what good practices are there to fill the test database with my postgres data?
Anonymous
Showing the same error
Abdulloh
Hi everyone! I have a problem with russian words in API if I use postman it's ok but when I use browser it's returning encoded version of russian words