Re: Django microservice authentication problem.

2023-02-02 Thread Mohammad Anarul
Thanks, guys The Django user group is very helpful.

On Sun, Jan 29, 2023 at 12:54 PM Lauro Cesar de Oliveira (olarva) <
ola...@gmail.com> wrote:

> Hello there.
>
> First thing: show us the error.
>
> Getting status code 400?
>
> Probably a wrong setting of one of those (or maybe all):
>
> ALLOWED_HOSTS
> CORS_ALLOWED_ORIGINS
> CSRF_TRUSTED_ORIGINS
> CSRF_USE_SESSIONS
> MIDDLEWARE
>
>
> When working with  microservice make sure the reverse-proxy/loadbalance
> is setting the right headers...
>
>
> As example, my Nginx reverse proxy setup always set the follows headers:
>
> proxy_set_header Host localhost;
> proxy_set_header ServerName localhost;
> proxy_set_header Origin http://localhost;
>
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> proxy_set_header X-Forwarded-Host $server_name;
> proxy_set_header X-Forwarded-HostName $host;
>
>
>
>
>
>
> On Saturday, January 28, 2023 at 3:53:12 AM UTC-3 mdanar...@gmail.com
> wrote:
>
>> How to communicate and authenticate with multiple Django servers. Is it
>> possible?
>>
>> If possible you can help me, I am trying more than 15 days in this
>> section but not getting any solution.
>>
>> Please share with me any requirements like books, videos, blogs, or code
>> examples.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4fd67d8d-3b48-4852-abe6-d97a8bd94c2bn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE59x8cbRkr-Qn2jJ%3Dt-Fx_%3D17cFZoU%2BROrodE3ypb32MiRosg%40mail.gmail.com.


Django microservice authentication problem.

2023-01-27 Thread Mohammad Anarul
How to communicate and authenticate with multiple Django servers. Is it
possible?

If possible you can help me, I am trying more than 15 days in this section
but not getting any solution.

Please share with me any requirements like books, videos, blogs, or code
examples.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE59x8exYGzVcTgCiuxyVhKthSGf4j%2Bg3cTC0HicnC9xssZjpw%40mail.gmail.com.


Re: How do django Field type hints work?

2022-09-23 Thread Mohammad Anarul
You can following the article


https://www.geeksforgeeks.org/decimalfield-django-models/amp/

On Sat, Sep 24, 2022, 5:09 AM Justin Black  wrote:

> Hello there,
>
> If I have a model:
>
> class Money(models.Model):
> price = models.DecimalField()
>
> m = Money(...)
> pycharm knows that m.price is of type Decimal but when I read through the
> django code base, I don't see DecimalField or Field subclassing
> decimal.Decimal
> And I don't see any registration code that registers DecimalField as type
> Decimal
>
> How does django do this?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/2b1d5103-7aa4-4882-b1a8-f88ec43293d2n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE59x8e_8AJsuM%3D4PYNvJecb-hy2wAXvV7N0%2BkjewqJxPw_LNQ%40mail.gmail.com.


Re: help on how to deploy django app on railway "

2022-09-15 Thread Mohammad Anarul
You can follow the github repo
https://github.com/mohammadanarul/railway-action.git

On Fri, Sep 16, 2022, 2:32 AM ola neat  wrote:

> hallo guys,
> so i'm having issue deploying my django on railway but once the deployment
> is complete the app crash with this err
>
>
> raise ImproperlyConfigured("settings.DATABASES is improperly configured. "
> django.core.exceptions.ImproperlyConfigured: settings.DATABASES is
> improperly configured. Please supply the ENGINE value. Check settings
> documentation for more details.
>
>
> and below is my django settings and railway setting
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.postgresql',
> 'HOST': os.environ.get('PGHOST'),
> 'NAME': os.environ.get('PGDATABASE'),
> 'USERNAME': os.environ.get('PGUSER'),
> 'PASSWORD': os.environ.get('PGPASSWORD'),
> 'PORT':os.environ.get('PGPORT')
> }
> }
>
>
> [image: image.png]
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHLKn72hHAj7Dfhf%2BPiYsd1Lkv0XRsMcJC%3DRbHBbWq7ackmuTw%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE59x8fecMFmdb6qzReK77fUkEnE9eDk0cTxvZO%3DZypicFksJA%40mail.gmail.com.


Re: SMTP Authentification error

2022-05-01 Thread Mohammad Anarul
EMAIL_HOST = smtp.gmail.com
EMAIL_HOST_USER = your-email
EMAIL_HOST_PASSWORD = your-email-password
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_BACKEND = django.core.mail.backends.smtp.EmailBackend
DEFAULT_FROM_EMAIL = your-email

On Mon, May 2, 2022 at 10:33 AM 'Delvin Alexander' via Django users <
django-users@googlegroups.com> wrote:

> Improvements! i fixed my settings.py file and now i do not get the error.
> The only problem is that for my email, i do not get the email notification
> to reset my password. Any clues to this?
>
> On Sunday, May 1, 2022 at 4:08:46 AM UTC-7 Mahendra Yadav wrote:
>
>> I Know this solution charges are applicable if you want?
>>
>> Mahendra Yadav
>>
>> On Wed, 27 Apr 2022, 11:08 am 'Delvin Alexander' via Django users, <
>> django...@googlegroups.com> wrote:
>>
>>> Hello everyone,
>>>
>>> May you please assist in informing me on what i need to do to resolve
>>> this issue.
>>>
>>> - *SMTPAuthenticationError at /password-reset/*
>>> *- (535, b'5.7.8 Username and Password not accepted. Learn more
>>> at\n5.7.8 https://support.google.com/mail/?p=BadCredentials
>>> 
>>> j64-20020a62c54300b0050d260c0ea8sm13366402pfg.110 - gsmtp')*
>>>
>>>
>>> I included the 16 character code to my environment variable and called
>>> it in my settings.pymfile,  but still the error occurs. Also here is my
>>> settings.py file:
>>>
>>> - *EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'*
>>> *EMAIL_HOST = 'smtp.gmail.com '*
>>> *EMAIL_PORT = 587*
>>> *EMAIL_USE_TLS = True*
>>> *EMAIL_HOST_USER = os.environ.get('DB_USER')*
>>> *EMAIL_HOST_PASSWORD = os.environ.get('DB_PASSWORD')*
>>>
>>> --
>>>
>> You received this message because you are subscribed to the Google Groups
>>> "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/c18935a8-43bf-4a15-a5ba-95209009498dn%40googlegroups.com
>>> 
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/a87e4b6a-6c5d-49ea-b308-2121936054fdn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE59x8cNPnS%3D6H0xuFhr6%2Bn%3Drtvdv0QUcorzSdR4JG6rO6SGCg%40mail.gmail.com.


Re: hello dear sir i have one dout

2021-04-28 Thread Mohammad Anarul
kindly inbox me.
https://www.facebook.com/mohammadanarul24/


On Wed, Apr 28, 2021 at 7:33 PM TOURIST PALACE 
wrote:

> i have one dout how use slug per post i didnot understood
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/9c1158be-c973-4f2f-840a-3bfb46db40e8n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE59x8cWyZ9ZomQZ-06M8ee2jis2qJ2n8dBajTA7%3DZaL84yAMw%40mail.gmail.com.


Re: Assistance for deploying django app to heroku

2021-04-23 Thread Mohammad Anarul
kindly shere your code

On Fri, Apr 23, 2021 at 5:56 PM ejike@gmail.com 
wrote:

> Good day All,
>
> I am trying to deploy my django app to heroku but i keep getting this
> error in the screenshot attached.
>
> Please can anyone assist in me in finding a solution to this and where the
> issue could be coming from.
>
> Looking forward to your replies.
>
> Thanks and BR,
>
> Ejike
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/7c7fd9ab-20a6-43f3-9793-06ea0f4220c6n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE59x8dUHT263JBeJhyqR7ZtHA9FRpvfT98H73Vquo9qhP3QWw%40mail.gmail.com.


Re: NameError at /account/signup/

2021-03-13 Thread Mohammad Anarul
You did not import the signup form. So showing errors

On Sat, Mar 13, 2021 at 5:48 AM Eduardo Agreda López <
eduardoagred...@gmail.com> wrote:

> Do you have create the SingUpForm. If you use Django auth model, can you
> create the forms.py file and  import this path:
>
> from django.contrib.auth.forms import UserCreationForm
> from django.contrib.auth.models import User
>
> inside of the forms.py file create the SingUpForm class and extends of the
> UserCreationForm module, example:
>
> class SignUpForm(UserCreationForm):
>   class Meta:
>   model = User
>   fields = ('username', 'first_name', 'last_name', 'email',
> 'password1', 'password2', )
>
> Before, in your sign_up view, import you SingUpForm.
>
> El viernes, 12 de marzo de 2021 a las 16:41:40 UTC-6, noyonba...@gmail.com
> escribió:
>
>> I can't fix it, anyone please suggest to me.
>> Thanks in advance
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/422bb634-0371-43a0-8f8a-2f5dcfdf93a9n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE59x8eg_AqAM6FduwTaGhHU2b4gc%2BtFSRprm5XeSbL%2B62cP0g%40mail.gmail.com.


Re: A very easy problem that I couldn't figure it out! PLEASE HELP^^

2021-03-05 Thread Mohammad Anarul
[image: Screenshot_7.png]

On Fri, Mar 5, 2021 at 9:36 PM Kasper Laudrup  wrote:

> If you want someone to help you, please do take the time to write a
> proper question.
>
> Just posting an error message and screaming for help will most likely
> not get you a lot of help.
>
> Learning how to communicate with other people is an important part of
> being a developer.
>
> Kind regards,
>
> Kasper Laudrup
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/0eefd4d6-2d23-ce61-f694-f07b30c9a4ed%40stacktrace.dk
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE59x8d6ob666k13D_V05LkSwbXNjsvyp4xqjZeVgh9h_a%3D7qg%40mail.gmail.com.


Re: 'MySQLdb.constants.FIELD_TYPE' has no attribute 'JSON'

2021-02-17 Thread Mohammad Anarul
You can run it

pip install mysqlclient==2.0.1


On Wed, Feb 17, 2021 at 8:53 PM Brijesh Soni  wrote:

> Hello All,
>
>
> I have Install the Python 3.6 32Bit with My SQL 32bit and Install the
> mysqlclient==1.3.11
>
> but when I am starting the Django with the
>
> runserver command, I am getting below Error
>
> Thanks in Advance.
>
> ===
> Error occurred while reading WSGI handler: Traceback (most recent call
> last): File "d:\StockMarketPy\venv36\Lib\site-packages\wfastcgi.py", line
> 791, in main env, handler = read_wsgi_handler(response.physical_path) File
> "d:\StockMarketPy\venv36\Lib\site-packages\wfastcgi.py", line 633, in
> read_wsgi_handler handler = get_wsgi_handler(os.getenv("WSGI_HANDLER"))
> File "d:\StockMarketPy\venv36\Lib\site-packages\wfastcgi.py", line 600, in
> get_wsgi_handler handler = __import__(module_name,
> fromlist=[name_list[0][0]]) File "D:\StockMarketPy\src\root\wsgi.py", line
> 16, in  application = get_wsgi_application() File
> "d:\StockMarketPy\venv36\lib\site-packages\django\core\wsgi.py", line 12,
> in get_wsgi_application django.setup(set_prefix=False) File
> "d:\StockMarketPy\venv36\lib\site-packages\django\__init__.py", line 24, in
> setup apps.populate(settings.INSTALLED_APPS) File
> "d:\StockMarketPy\venv36\lib\site-packages\django\apps\registry.py", line
> 114, in populate app_config.import_models() File
> "d:\StockMarketPy\venv36\lib\site-packages\django\apps\config.py", line
> 211, in import_models self.models_module =
> import_module(models_module_name) File
> "c:\python36-32\lib\importlib\__init__.py", line 126, in import_module
> return _bootstrap._gcd_import(name[level:], package, level) File
> "D:\StockMarketPy\src\common\models.py", line 4, in  from
> django.contrib.auth.models import AbstractBaseUser, PermissionsMixin,
> UserManager File
> "d:\StockMarketPy\venv36\lib\site-packages\django\contrib\auth\models.py",
> line 2, in  from django.contrib.auth.base_user import
> AbstractBaseUser, BaseUserManager File
> "d:\StockMarketPy\venv36\lib\site-packages\django\contrib\auth\base_user.py",
> line 48, in  class AbstractBaseUser(models.Model): File
> "d:\StockMarketPy\venv36\lib\site-packages\django\db\models\base.py", line
> 122, in __new__ new_class.add_to_class('_meta', Options(meta, app_label))
> File "d:\StockMarketPy\venv36\lib\site-packages\django\db\models\base.py",
> line 326, in add_to_class value.contribute_to_class(cls, name) File
> "d:\StockMarketPy\venv36\lib\site-packages\django\db\models\options.py",
> line 206, in contribute_to_class self.db_table =
> truncate_name(self.db_table, connection.ops.max_name_length()) File
> "d:\StockMarketPy\venv36\lib\site-packages\django\db\__init__.py", line 28,
> in __getattr__ return getattr(connections[DEFAULT_DB_ALIAS], item) File
> "d:\StockMarketPy\venv36\lib\site-packages\django\db\utils.py", line 214,
> in __getitem__ backend = load_backend(db['ENGINE']) File
> "d:\StockMarketPy\venv36\lib\site-packages\django\db\utils.py", line 111,
> in load_backend return import_module('%s.base' % backend_name) File
> "c:\python36-32\lib\importlib\__init__.py", line 126, in import_module
> return _bootstrap._gcd_import(name[level:], package, level) File
> "d:\StockMarketPy\venv36\lib\site-packages\django\db\backends\mysql\base.py",
> line 29, in  from .introspection import DatabaseIntrospection #
> isort:skip File
> "d:\StockMarketPy\venv36\lib\site-packages\django\db\backends\mysql\introspection.py",
> line 16, in  class
> DatabaseIntrospection(BaseDatabaseIntrospection): File
> "d:\StockMarketPy\venv36\lib\site-packages\django\db\backends\mysql\introspection.py",
> line 27, in DatabaseIntrospection FIELD_TYPE.JSON: 'JSONField',
> AttributeError: module 'MySQLdb.constants.FIELD_TYPE' has no attribute
> 'JSON' StdOut: StdErr:
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/323d7da8-a17d-4e8e-b6a9-84adc0499f89n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE59x8eh%3D0Ef7B2bvF8WKAjAMTWrRe2DNQEekfdO7MTMORJtPA%40mail.gmail.com.