Re: problem when i perform " python3 manage.py makemigrations"

2024-04-17 Thread ASAMOAH EMMANUEL
jango/core/management/__init__.py",
> line 436, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/core/management/base.py",
> line 412, in run_from_argv
> self.execute(*args, **cmd_options)
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/core/management/base.py",
> line 453, in execute
> self.check()
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/core/management/base.py",
> line 485, in check
> all_issues = checks.run_checks(
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/core/checks/registry.py",
> line 88, in run_checks
> new_errors = check(app_configs=app_configs, databases=databases)
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/core/checks/urls.py",
> line 14, in check_url_config
> return check_resolver(resolver)
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/core/checks/urls.py",
> line 24, in check_resolver
> return check_method()
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/urls/resolvers.py",
> line 494, in check
> for pattern in self.url_patterns:
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/utils/functional.py",
> line 57, in __get__
> res = instance.__dict__[self.name] = self.func(instance)
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/urls/resolvers.py",
> line 715, in url_patterns
> patterns = getattr(self.urlconf_module, "urlpatterns",
> self.urlconf_module)
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/utils/functional.py",
> line 57, in __get__
> res = instance.__dict__[self.name] = self.func(instance)
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/urls/resolvers.py",
> line 708, in urlconf_module
> return import_module(self.urlconf_name)
>   File "/usr/lib/python3.8/importlib/__init__.py", line 127, in
> import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 1014, in _gcd_import
>   File "", line 991, in _find_and_load
>   File "", line 975, in
> _find_and_load_unlocked
>   File "", line 671, in _load_unlocked
>   File "", line 843, in exec_module
>   File "", line 219, in
> _call_with_frames_removed
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoproj/urls.py",
> line 24, in 
> path('djangoapp/', include('djangoapp.urls')),
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/urls/conf.py",
> line 38, in include
> urlconf_module = import_module(urlconf_module)
>   File "/usr/lib/python3.8/importlib/__init__.py", line 127, in
> import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 1014, in _gcd_import
>   File "", line 991, in _find_and_load
>   File "", line 975, in
> _find_and_load_unlocked
>   File "", line 671, in _load_unlocked
>   File "", line 839, in exec_module
>   File "", line 976, in get_code
>   File "", line 906, in
> source_to_code
>   File "", line 219, in
> _call_with_frames_removed
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoapp/urls.py",
> line 27
> logger = logging.getLogger(__name__)
>^
> SyntaxError: invalid syntax
> El miércoles, 17 de abril de 2024 a la(s) 10:56:01 a.m. UTC-6, ASAMOAH
> EMMANUEL escribió:
>
>> check your urls.py file to make sure you haven't imported circularly. or
>> better still, paste your urls.py here
>>
>> On Wed, Apr 17, 2024 at 4:47 PM Ana Jiménez  wrote:
>>
>>> hi guys, so i'm doing a project and there's a part that says i need to
>>> do the migrations but when i do that i get this error
>>> "Traceback (most recent call last):
>>>   File
>>> "/home/project/xrwvm

Re: problem when i perform " python3 manage.py makemigrations"

2024-04-17 Thread ASAMOAH EMMANUEL
check your urls.py file to make sure you haven't imported circularly. or
better still, paste your urls.py here

On Wed, Apr 17, 2024 at 4:47 PM Ana Jiménez  wrote:

> hi guys, so i'm doing a project and there's a part that says i need to do
> the migrations but when i do that i get this error
> "Traceback (most recent call last):
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/urls/resolvers.py",
> line 717, in url_patterns
> iter(patterns)
> TypeError: 'module' object is not iterable
>
> The above exception was the direct cause of the following exception:
>
> Traceback (most recent call last):
>   File "manage.py", line 22, in 
> main()
>   File "manage.py", line 18, in main
> execute_from_command_line(sys.argv)
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/core/management/__init__.py",
> line 442, in execute_from_command_line
> utility.execute()
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/core/management/__init__.py",
> line 436, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/core/management/base.py",
> line 412, in run_from_argv
> self.execute(*args, **cmd_options)
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/core/management/base.py",
> line 453, in execute
> self.check()
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/core/management/base.py",
> line 485, in check
> all_issues = checks.run_checks(
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/core/checks/registry.py",
> line 88, in run_checks
> new_errors = check(app_configs=app_configs, databases=databases)
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/core/checks/urls.py",
> line 14, in check_url_config
> return check_resolver(resolver)
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/core/checks/urls.py",
> line 24, in check_resolver
> return check_method()
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/urls/resolvers.py",
> line 495, in check
> messages.extend(check_resolver(pattern))
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/core/checks/urls.py",
> line 24, in check_resolver
> return check_method()
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/urls/resolvers.py",
> line 494, in check
> for pattern in self.url_patterns:
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/utils/functional.py",
> line 57, in __get__
> res = instance.__dict__[self.name] = self.func(instance)
>   File
> "/home/project/xrwvm-fullstack_developer_capstone/server/djangoenv/lib/python3.8/site-packages/django/urls/resolvers.py",
> line 725, in url_patterns
> raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e
> django.core.exceptions.ImproperlyConfigured: The included URLconf ' 'djangoapp.urls' from
> '/home/project/xrwvm-fullstack_developer_capstone/server/djangoapp/urls.py'>'
> does not appear to have any patterns in it. If you see the 'urlpatterns'
> variable with valid patterns in the file then the issue is probably caused
> by a circular import. "
>
> and i don't know how to solve it :( i'm a beginner in django i need helppp
>
> --
> 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/f0b7aa30-2094-47ba-a93f-ed49b506e2ccn%40googlegroups.com
> 
> .
>


-- 
I don't stop when I'm tired, I only stop when the job is done.

-- 
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/CABFHQYzEBjdmvmrePg2YYuT%2BfJdYtXrxm6qhrpebH8CP4_z3_Q%40mail.gmail.com.


Re: Why would a deployed site shows up with distorted layout

2024-02-29 Thread ASAMOAH EMMANUEL
I faced this issue before and I know how frustrating it can be. after
sifting through several results, this worked. sudo usermod -aG username
www-data
sudo chown -R :www-data /home/username/projects/personal

On Thu, Feb 29, 2024 at 6:37 PM ASAMOAH EMMANUEL <
emmanuelasamoah...@gmail.com> wrote:

> Replace your username with this and run this code: sudo usermod -aG
> username www-data
> sudo chown -R :www-data /home/username/projects/personal
>
> On Thu, Feb 29, 2024 at 2:15 PM Amitesh Tripathi 
> wrote:
>
>> Your website is in debug mode??
>>
>> On Thu, 29 Feb 2024, 11:54 Ram,  wrote:
>>
>>> Hi,
>>>
>>> We are able to deploy our pre-production site successfully using jenkins
>>> deployment and as part of the deployment we do the following:
>>>
>>> 1. Django application with runserver
>>> 2. Gunicorn restart
>>> 3. Nginx restart
>>>
>>> But our web application loads with distorted layout and we have this
>>> setting for staticfiles
>>>
>>> STATIC_URL = '/static/'
>>> STATIC_ROOT = os.path.join(BASE_DIR, 'static')
>>>
>>> We are wondering what is missing?
>>>
>>> Best Regards,
>>> ~Ram
>>>
>>> --
>>> 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/CA%2BOi5F2xrz-hiJphYeuGX56hU26wWJGduUZHNibTUXVs-KtjeA%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CA%2BOi5F2xrz-hiJphYeuGX56hU26wWJGduUZHNibTUXVs-KtjeA%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
>> 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/CAFJ1wEUvJK_Ur_6JpLeMVMXK4TMH_ryUy7gLWqjXG8a0%2B_o2VA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAFJ1wEUvJK_Ur_6JpLeMVMXK4TMH_ryUy7gLWqjXG8a0%2B_o2VA%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
>
>
> --
> I don't stop when I'm tired, I only stop when the job is done.
>


-- 
I don't stop when I'm tired, I only stop when the job is done.

-- 
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/CABFHQYx%3DsSpZZo3gbXctqFC9Nrdyb49WvbxL6CYo%3DiZ%2B_dqOVQ%40mail.gmail.com.


Re: Why would a deployed site shows up with distorted layout

2024-02-29 Thread ASAMOAH EMMANUEL
Replace your username with this and run this code: sudo usermod -aG
username www-data
sudo chown -R :www-data /home/username/projects/personal

On Thu, Feb 29, 2024 at 2:15 PM Amitesh Tripathi 
wrote:

> Your website is in debug mode??
>
> On Thu, 29 Feb 2024, 11:54 Ram,  wrote:
>
>> Hi,
>>
>> We are able to deploy our pre-production site successfully using jenkins
>> deployment and as part of the deployment we do the following:
>>
>> 1. Django application with runserver
>> 2. Gunicorn restart
>> 3. Nginx restart
>>
>> But our web application loads with distorted layout and we have this
>> setting for staticfiles
>>
>> STATIC_URL = '/static/'
>> STATIC_ROOT = os.path.join(BASE_DIR, 'static')
>>
>> We are wondering what is missing?
>>
>> Best Regards,
>> ~Ram
>>
>> --
>> 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/CA%2BOi5F2xrz-hiJphYeuGX56hU26wWJGduUZHNibTUXVs-KtjeA%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/CAFJ1wEUvJK_Ur_6JpLeMVMXK4TMH_ryUy7gLWqjXG8a0%2B_o2VA%40mail.gmail.com
> 
> .
>


-- 
I don't stop when I'm tired, I only stop when the job is done.

-- 
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/CABFHQYw5diiQKiH%2B%2BVSePAnbcX42QSemvLUGxvZxG3EzuiOA8g%40mail.gmail.com.


Re: Exciting Opportunity: Join Our Django WhatsApp Bulk Messaging Project!

2024-02-18 Thread ASAMOAH EMMANUEL
add my number +34642063760

On Sun, Feb 18, 2024 at 4:54 PM muhammed yayi 
wrote:

> I will love to join the djano group
> --
> *From:* django-users@googlegroups.com  on
> behalf of SURAJ TIWARI 
> *Sent:* Sunday, February 18, 2024 1:04 PM
> *To:* Django users 
> *Subject:* Exciting Opportunity: Join Our Django WhatsApp Bulk Messaging
> Project!
>
>
>  Join Our Django WhatsApp Bulk Messaging Project!
>
>  Hello everyone,
>
> Are you looking for an exciting opportunity to gain hands-on experience in
> Django development? Do you want to work on a meaningful project that
> leverages WhatsApp for bulk messaging? We're thrilled to invite you to join
> our dynamic team!
>
>  Benefits:
>
>- Get hands-on experience working on a real-world Django project.
>- Learn how to leverage WhatsApp for bulk messaging, a valuable skill
>in today's digital landscape.
>- Opportunities for hybrid work, allowing flexibility in your schedule.
>- Collaborate with experienced developers and gain valuable mentorship.
>- Access to cutting-edge tools and technologies.
>
>  Opportunities Available:
>
>- Django developers
>- Frontend developers
>- UI/UX designers
>- Quality assurance testers
>
> 欄 How to Join: Simply reply to this message expressing your interest,
> and we'll provide you with all the necessary details to get started on our
> project.
>
> Let's work together to create something amazing and gain valuable
> experience along the way! ✨
>
> Best regards,
>
> Suraj Tiwari
>
>
> --
> 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/e8a705fd-10d9-4c1a-b4ba-0a7b896dbfean%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/AS8PR08MB84175F74EFFB27119C0774BBA0522%40AS8PR08MB8417.eurprd08.prod.outlook.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/CABFHQYwD7JSVoa4ePPM2Z1Mu6EcBg0eMWZN1qiHi_N9SdRc_qQ%40mail.gmail.com.


Re: Get experience letter and job opportunities

2024-02-06 Thread ASAMOAH EMMANUEL
What's your django project about?

On Tue, Feb 6, 2024 at 8:03 AM machine learning 
wrote:

> anyone here to help me in our django project and in return we will give
> you access to software that will apply 100s of job for you and also hand on
> work experience.
>
> --
> 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/CAKKYCB4FFeSCpDQEoYDDwO2Yz%2B93F7DL_LhcgBxiPe4Lzd0scQ%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/CABFHQYy29uyG7uyNcr9_Za5yUpWRCaG0KdtARcJcwKGRd8SDfg%40mail.gmail.com.


Re: reg: Django custom middleware

2024-01-24 Thread ASAMOAH EMMANUEL
class RetryCal:
def __init__(self, get_response):
self.get_response = get_response

def __call__(self, request):
try:
session = Session()
retries = Retry(total=5, backoff_factor=2,
status_forcelist=[500, 502, 503, 504])
session.mount('https://', HTTPAdapter(max_retries=retries))
request.retry_session = session
except Exception as e:
raise e

response = self.get_response(request)

try:
if isinstance(response, HttpResponseServerError):
# Handle your custom response here if needed
pass
except (ProtocolError, OSError) as err:
raise ConnectionError(err, request)

return response

On Wed, Jan 24, 2024 at 12:29 PM 'Amitesh Sahay' via Django users <
django-users@googlegroups.com> wrote:

> Hi All,
>
> I have written a *custom Django middleware* to do* retries and catch
> exception* if there is *any connection related issues* between two
> servers. *Below is the code snippet.*
>
> from requests.adapters import Retry, RetryError, HTTPAdapter,
> MaxRetryError, ConnectTimeoutError, ProtocolError, ResponseError
> from requests.sessions import Session
> from django.http import HttpResponseServerError
>
>
> class RetryCal:
> def __init__(self, get_response):
> self.get_response = get_response
>
> @staticmethod
> def process_request(request):
> try:
> session = Session()
> retries = Retry(total=5, backoff_factor=2,
> status_forcelist=[500, 502, 503, 504])
> session.mount('https://', HTTPAdapter(max_retries=retries))
> request.retry_session = session
>
> except Exception as e:
> raise e
>
> def __call__(self, request):
> RetryCal.process_request(request)
> try:
> response = self.get_response(request)
> return response
>
> except (ProtocolError, OSError) as err:
> raise ConnectionError(err, request)
>
> except MaxRetryError as e:
> if isinstance(e.reson, ConnectTimeoutError):
> return HttpResponseServerError("Connection timeout
> error...")
> if isinstance(e.reson, ResponseError):
> raise RetryError(e, request=request)
>
> raise ConnectionError(e, request)
>
>
> *Below is the placement of the custom middleware*
>
> *'django.middleware.security.SecurityMiddleware',*
> *'django.contrib.sessions.middleware.SessionMiddleware',*
>
> *# custom retry middleware.*
> *'integ.api_retry_custom_middleware.RetryCal',*
>
> below this custom middleware I do have other default one's as well.
>
> The problem is I am not sure if this is working. I have an access token,
> In that I added some garbage characters and tried to hit my endpoint. *I
> did see an exception as seen below*
>
> *Internal Server Error: /api/acct/*
> *[24/Jan/2024 14:23:39] "GET /api/acct/ HTTP/1.1" 500 5348*
>
> But I can see this error even if I comment out my custom middleware. My
> purpose is to create the custom middleware and if there is any API request
> from any Django App the request should go first through the custom
> middleware. That is my thought. But I am not sure if the middleware is
> working. Or maybe the placement if the custom middleware is not proper. I
> have been working with Django for a while now but written the custom
> middleware for the first time.
>
> Please suggest.
>
>
>
> Regards,
> Amitesh
>
> --
> 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/304829749.259529.1706099335383%40mail.yahoo.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/CABFHQYwxHDssVBfngscG7sG9zN%2Bde69Bfd9PjhUHFSAF5ZuQEg%40mail.gmail.com.


Static assets receives 403 on digital ocean.

2024-01-03 Thread ASAMOAH EMMANUEL
Hi, please help. I have been trying to deploy my App to digital ocean but
after deploying, my static assets do not show. I have set file and
directory permissions but still in vain. this is what outputs when
inspecting the browser console. help would be highly appreciated: Error
logo.png:1 Request unavailable in the network panel, try reloading the
inspected pageRequest unavailable in the network panel, try reloading the
inspected page Failed to load resource: the server responded with a status
of 403 (Forbidden)
6
Unchecked runtime.lastError: The message port closed before a response was
received.
Error
styles.css:1 Request unavailable in the network panel, try reloading the
inspected pageRequest unavailable in the network panel, try reloading the
inspected page Failed to load resource: the server responded with a status
of 403 (Forbidden)
Error
index.css:1 Request unavailable in the network panel, try reloading the
inspected pageRequest unavailable in the network panel, try reloading the
inspected page Failed to load resource: the server responded with a status
of 403 (Forbidden)
Error
main.js:1 Request unavailable in the network panel, try reloading the
inspected pageRequest unavailable in the network panel, try reloading the
inspected page Failed to load resource: the server responded with a status
of 403 (Forbidden)
Error
reload-listener.js:1 Request unavailable in the network panel, try
reloading the inspected pageRequest unavailable in the network panel, try
reloading the inspected page Failed to load resource: the server responded
with a status of 403 (Forbidden)
Error
/static/sound/click.wav:1 Request unavailable in the network panel, try
reloading the inspected pageRequest unavailable in the network panel, try
reloading the inspected page Failed to load resource: the server responded
with a status of 403 (Forbidden)

-- 
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/CABFHQYxzk7bg2cM8TaqAAtDZeQhkjGUmhjiKTEmjL%2BF7Dk-y-A%40mail.gmail.com.


Re: Postgres connection error

2023-10-10 Thread ASAMOAH EMMANUEL
I often come across this issue, run this code but before you do, log in
into the postgres shell with a database with all privileges, let's say
postgre user and switch with your new database created and run: GRANT
CREATE ON SCHEMA public TO your_user;

On Tue, Oct 10, 2023 at 3:47 PM Joyce Mumbi 
wrote:

> Hello i have problem in deploying my back-end work could you kindly help
> me out Thank you
>
>
>
> [image: Mailtrack]
> 
>  Sender
> notified by
> Mailtrack
> 
>  10/10/23,
> 06:45:45 PM
>
> On Mon, 9 Oct 2023 at 17:15, Nana Bright Atsiatorme <
> nanabrightatsiato...@gmail.com> wrote:
>
>> ENGINE': 'django.db.backends.postgresql_psycopg2',
>> 'NAME': 'knapds',
>> 'USER': 'system',
>> 'PASSWORD': 'password',
>> 'HOST': 'localhost',
>> 'PORT': 5432,
>>
>>
>> Install pgadmin and run with the  setup with the credentials above
>> Make sure the it running the apply the migrations
>> The error is from the port number
>>
>>
>>
>>
>> --
>> 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/CAEdj-JFtG3Yx4D0TvjTGjMTJJeZ-pquJ9CF5D0EHoMdjgULkhQ%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/CAPTUz5ngaXhZzQ9cFNxEFAU4kPKtZpGQ%2Bjkhk2Sh2wiAYp_ukg%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/CABFHQYxF8oa9wOZvsXGqCdeL_WKip%2B9dHCRaw458Vh7K9d6j%3Dw%40mail.gmail.com.


Re: help me

2023-09-23 Thread ASAMOAH EMMANUEL
Try fly.io

On Sat, Sep 23, 2023 at 7:17 PM ALINDA Fortunate 
wrote:

> You can as well try render
>
> +256774339676
>
>  "If you want to live a happy life, tie it to a goal, not to people or
> things."
>
> A graduate of Bachelors Degree of Science in Computer Science of Gulu
> University.
>
> @FortunateAlinda
> Passionate about Python Development
> And Computer related Dynamics
>
> On Sat, Sep 23, 2023, 21:44 Akoo Rahimi  wrote:
>
>> Hello friends
>>
>> Can you introduce me some sites similar to Heroku?
>>
>> I just started Django and I want to test my projects on the global server.
>>
>> --
>> 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/dccab8c0-8d51-4338-a085-300fdfc0eeadn%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/CAPifpCt4TpYpHY%2B2uV5yV2bEpUYrn6q5wYWftg6PG9AdOD5e6w%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/CABFHQYz4Z5uS1R%2BpzmyE_vQVv%2Bezv264f8drZi9s2xCXAgG0qQ%40mail.gmail.com.


Re: Road Map for a newbie

2023-08-18 Thread ASAMOAH EMMANUEL
do lots of projects and refer to the documentation when you need to
understand concepts in detail. Here is my private channel where I upload
django premium resources with ton of projects. here is the invite link if
you want to avoid the frustration of finding organized tutorials and hands
on to try. https://t.me/+VXTu7RXQ47VlM2Q0

On Fri, Aug 18, 2023 at 3:00 AM Sebastian Jung 
wrote:

> Hello,
>
> At the beginning i read much tutorials about function based django. It is
> on beginning a little bit easier because you understand how a list-,
> create-/update- and deleteview works. For little project this approach is
> fine. I waste with function based aproach too much time because i extend my
> own project after and after and then when for example i find a mistake in
> one listview most other listviewa from another models i must fix. So it is
> hugh amount of bugfixes.
>
> Then i learn class based approach this i a little bit harder because you
> don't know which classes exists and what of this classes what makes. It
> exists in Internet one website where you find perfectly what classes exists
> and much classes have comments what class does. Since i use class based
> views i am very happy.
>
> On beginning i have for every listview and for every form a own template.
> Also i find same problem like in function based approach... Often i want to
> extend all of listview Templates with same feature and then i fix muuuch
> templates. Then i build me self for list-, create-, updateview one template
> where i can insert every model. Since that i am very happy.
>
> I learn how i can make own widgets.
>
> I learn how i can makes my own filter/tags for templates.
>
> I disagree mike with his tip to take django documentation because this
> manual is very nice when you search for a specific thing. But for learning
> as beginner this is not right approach.
>
> I give you know my tip: learn short how you writes function based
> listview/deleteview/createview and updateview then when you know how it
> works don't waste time to go deeper in function based. Learn instant usage
> of classes based which class, method exists and what it makes and how you
> override this methods... there exists in internet much tutorials also in
> class based views
>
> When you know this writes me then i give you more tipps
>
> Last thing there exists a Webpage for django simple is better then
> complex. There you find much good tutorials veeery good describe and very
> usefull for example django and Ajax...
>
> Begin with your own project and extend it after and after and if yoz have
> questions then writes me...
>
> Good luck
>
> Mike Dewhirst  schrieb am Fr., 18. Aug. 2023,
> 02:24:
>
>> On 17/08/2023 7:24 pm, Tesfaye Yimam wrote:
>>
>> Hello all,
>>
>> This is my second day of learning Django. I am comfortable with python
>> (the basics and the OOP).
>> I wanted to have some guidance from this community to learn Djanog by
>> taking small steps in a consistent way.
>> Any one who has a road-map, especially if you tried it and worked for
>> you,  that will greatly help me in the learning process of Django. So,
>> please drop me a message here.
>> I'm happy to be here.
>>
>>
>> Welcome!
>>
>> There would be no better way to start than working through the tutorial
>> in the docs, step by step ...
>>
>> https://docs.djangoproject.com/en/4.2/
>>
>> Afterwards, you should decide/specify your own project and when the spec
>> is more or less settled you should set it up as a fresh project and make it
>> happen.
>>
>> The critical part of learning Django is the specification of what you
>> want. Personally, I keep the (excellent) docs permanently open in my
>> browser so I can research how to achieve what I want to happen.
>>
>> You will discover that Django takes a couple of different paths and you
>> need to choose. Both are valid but I chose functional views rather than
>> class-based views.
>>
>> My reasons were that functional views seem simpler and allowed me
>> absolute flexibility. I felt that class-based views while brilliant were
>> more difficult for me. YMMV.
>>
>> Also, Django now allows async programming. That's a bit too advanced for
>> me - at least until it becomes necessary.
>>
>> Good luck
>>
>>
>> --
>> 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/e9724d36-e07b-42b2-8902-6a8294c695b5n%40googlegroups.com
>> 
>> .
>>
>>
>>
>> --
>> Signed email is an absolute defence against phishing. This email has
>> been signed with my private key. If you import my public key you can
>> automatically decrypt my signature and be sure it 

Re: i learnt django basics but i want to learn django for become a master in django where can i get resourse

2023-08-11 Thread ASAMOAH EMMANUEL
Here are premium resources for you: https://t.me/+VXTu7RXQ47VlM2Q0

On Thu, Aug 10, 2023 at 8:36 PM Chisom Iheanacho 
wrote:

> hello chief..  I have Django 3 by example, can I follow the projects in it
> too?
> pls can I get your WhatsApp number too?
>
> On Thu, Aug 10, 2023, 6:05 PM Peter Benjamin Ani <
> benjaminpari...@gmail.com> wrote:
>
>> Try getting the ebook (Django 4 by example) and build projects in it,
>> from there u are good to go
>>
>> On Thu, 10 Aug 2023 at 18:01, Basith  wrote:
>>
>>> Any sample projects? any free resources?
>>>
>>> On Thursday, 10 August 2023 at 22:25:30 UTC+5:30 John Ayodele wrote:
>>>
 Build a good portfolio and push them to GitHub

 On Thu, 10 Aug 2023 14:23 Peram Ashokkumar, 
 wrote:

> i have been  learning python fullstack since in the 3 months  in our
> institute that mentor tought only basic  but i want to get job as
> experience candidate because i have three years of gap please  any respond
> to 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...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/3d1a0e32-5417-42c9-a2ec-c3caee1e24f7n%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/ddfe7754-9b56-4664-9154-84d26a51fc53n%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/CAPxt_2XZnUk4cjnS%2BgdxAT6%3DuPsDb3qZqozCYx022ANA7uVpEw%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/CAFX7pJ0zACL%3Dpv9ENfBcGpGDA2UpneP1rMZBRt43mOzHxVHAYA%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/CABFHQYwQjUOT8C0jad7m9c7vsqH48mXnVzXBdT0W%2BUOSAMZyqg%40mail.gmail.com.


Re: Advice for a beginer(I am new)

2023-07-13 Thread ASAMOAH EMMANUEL
Here are list of curated resources to get you from beginner to pro. It's a
telegram private channel. https://t.me/+VXTu7RXQ47VlM2Q0

On Wed, Jul 5, 2023 at 2:36 AM Vairamuthu Puvanachandran <
vai.pu...@gmail.com> wrote:

> I followed the django tutorials by Telusko.
> Very useful.
>
> Vai Puvan
>
> On Tue, Jul 4, 2023, 10:37 AM yusuf Abdul kabir <
> yusufabdulkab...@gmail.com> wrote:
>
>> Hi guys i am a new django developer tho i am not new in the Dev world i
>> will like you guys to advice me on what i should know to excel on this new
>> path i have embarked on i will be grateful for the advice you guys give,
>> Thanks
>>
>> --
>> 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/e48b209a-afbd-4a3c-bc59-a192ee08bb95n%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/CAAJ%2B9rEYNmCLe_rdqLYobB9eooGy94DSQXd%3DRmDjUio5uojqvg%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/CABFHQYw4ABzW_1HJ%2B7WP4tfsmKNjyoBVj%3DuSibi32weXJX3Nsg%40mail.gmail.com.


Re: Runtime decision on language support

2023-04-24 Thread ASAMOAH EMMANUEL
>
>
> To achieve this, you can create a custom middleware that inherits from
> `LocaleMiddleware`. In your custom middleware, you can override the
> `process_request` method to check for the tenant's allowed languages and
> set the request's language accordingly.
>
> 1. Create a new model field for the Tenant model that stores the allowed
> languages as a list. This can be a JSON field or a ManyToMany field linked
> to a Language model.
>
> # models.py
> from django.contrib.postgres.fields import ArrayField
> from django.db import models
>
> class Tenant(models.Model):
> ...
> allowed_languages = ArrayField(models.CharField(max_length=10))
>
>
> 2. Create a custom middleware that inherits from
> `django.middleware.locale.LocaleMiddleware`:
> # custom_middleware.py
> from django.middleware.locale import LocaleMiddleware
> from django.utils import translation
>
> class CustomLocaleMiddleware(LocaleMiddleware):
> def process_request(self, request):
> # Get the current tenant
> current_tenant = request.tenant
>
> # Get the user's preferred language from the request
> language = translation.get_language_from_request(request,
> check_path=True)
>
> # Check if the preferred language is in the tenant's
> allowed_languages list
> if language not in current_tenant.allowed_languages:
> # If not, set the default language for the tenant
> language = current_tenant.default_language
>
> # Activate the chosen language
> translation.activate(language)
> request.LANGUAGE_CODE = translation.get_language()
> 3. Replace `LocaleMiddleware` with your custom middleware in your
> `MIDDLEWARE` settings:
>
> # settings.py
> MIDDLEWARE = [
> ...
> # 'django.middleware.locale.LocaleMiddleware',
> 'your_app.custom_middleware.CustomLocaleMiddleware'.
> Now, when a user requests a page, the custom middleware checks if the
> requested language is in the tenant's `allowed_languages` list. If it is
> not, the tenant's default language will be used. This ensures that the UI
> and the data are shown in a consistent language.
>

-- 
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/CABFHQYzdc29n%2BBA3DfVo7HSh3%2B1XPQCSM%3DsXrwHPTVzVw%2B8-sA%40mail.gmail.com.


Re: Multitenant app // Validation / constraints for related fields

2023-01-19 Thread ASAMOAH EMMANUEL
One other approach you could consider is using Django's built-in form and
model validation. You could create a custom form class that inherits from
the built-in Django `ModelForm` and override the `clean` method to perform
your tenant check.
For example:

class BlogPostForm(forms.ModelForm):
def clean(self):
cleaned_data = super().clean()
if cleaned_data.get('organization') !=
cleaned_data.get('lead_author').organization:
raise forms.ValidationError("Organization of the post and lead
author must match.")
return cleaned_data


You could then use this form in your views to handle the validation before
saving the model to the database.
Another approach could be to use Django's `clean_fields()` method to
validate that the fields you want to check match. for example:

class BlogPost(models.Model):
organization = models.ForeignKey(to=Organization,
on_delete=models.CASCADE)
lead_author = models.ForeignKey(to=Author, on_delete=models.CASCADE)
slug = models.SlugField(max_length=64)

def clean_fields(self, exclude=None):
super().clean_fields(exclude=exclude)
if self.organization != self.lead_author.organization:
raise ValidationError("Organization of the post and lead author
must match.")

It's worth noting that this approach will run the validation method on each
save, so it may cause a performance hit if you are saving large number of
records.
In any case, it is essential to test the different options and measure
their performance to decide which one is better for your use case.

On Thu, Jan 19, 2023 at 1:21 PM Abeed Visram  wrote:

> Hi there,
>
> Long-time lurker / Django user; first-time poster.
>
> Ask: Any other ideas for ensuring that ForeignKey relationships are valid?
>
> Context / background: I'm working on a multitenant app, and looking at
> ways of ensuring the integrity of the data in the system. Specifically, I
> want to ensure that for a "tenant'ed" model that contains ForeignKey
> fields, those FK relations match the same tenant.
>
> Unfortunately CHECK constraints aren't suitable, as these are limited to
> just the row being inserted/updated, so nested SELECTs or similar at the
> database level aren't possible. It seems as if a TRIGGER could do the job,
> but I'm wary of going down this path if there are other solutions that I've
> missed.
>
> At present I've implemented something along the following simplified lines
> within the application.
>
> All ideas greatly appreciated. Thanks in advance :)
>
> # models.py
> class BaseModel(models.Model):
> match_fields: List[List[str]] = []
>
> class Meta:
> abstract = True
>
> def clean(self):
> self.validate_matching_fields()
> return super().clean()
>
> def validate_matching_fields(self) -> None:
> for field_names in self.match_fields:
> field_values: Dict[str, Any] = dict()
> for field_name in field_names:
> value = self
> for field in field_name.split("."):
> value = getattr(value, field)
> field_values[field_name] = value
> _values = list(field_values.values())
> assert len(_values) > 1
> values_equal = all([V == _values[0] for V in _values])
> if not values_equal:  # pragma: no branch
> msg = f"One or more required fields not matching:
> {field_values}."
> raise ValidationError(msg)
> return
>
> # Tenant model
> class Organization(models.Model):
> name = models.CharField(max_length=64)
>
> class Author(models.Model):
> organization = models.ForeignKey(to=Organization,
> on_delete=models.CASCADE)
> name = models.CharField(max_length=64)
>
> # Target model
> # I want to ensure that BlogPost.organization ==
> BlogPost.lead_author.organization
> class BlogPost(BaseModel):
> match_fields = [["organization.id", "lead_author.organization.id"]]
>
> organization = models.ForeignKey(to=Organization,
> on_delete=models.CASCADE)
> lead_author = models.ForeignKey(to=Author, on_delete=models.CASCADE)
> slug = models.SlugField(max_length=64)
>
> --
> 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/18fe8095-3f46-44e6-b418-49e6a411667cn%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 

Re: Upgrading Django from 3.2.16 to 4.1.x

2023-01-16 Thread ASAMOAH EMMANUEL
Yes, you should be able to upgrade from Django 3.2.16 to 4.1.x by simply
installing the Django 4.1.x software and running the makemigrations command.
It's always a good practice to make a backup of your database and
application before upgrading, just in case any errors occur during the
upgrade process. Additionally, you should make sure to read up on any
breaking changes introduced in Django 4.1.x so that you understand how they
affect your application and / or database. Finally, make sure to thoroughly
test your upgraded application before going live.

On Tue, Jan 17, 2023 at 5:18 AM 'Ellinghaus, Lance J' via Django users <
django-users@googlegroups.com> wrote:

> I will be upgrading from Django 3.2.16 to 4.1.x and wanted to know if
> anyone has any suggestions. I am using oracle as the backend.
>
> The release notes do not go into much detail.
>
> Do I just need to install the Django 4.1.x software and run the
> makemigrations to do the upgrade?
>
>
>
> Thank you,
>
> *Lance Ellinghausen*
>
>
>
> --
> 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/63c62f61.050a0220.cc9c2.6fc3SMTPIN_ADDED_MISSING%40gmr-mx.google.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/CABFHQYzPaFNZGgp1yDAk6pK9%2BbZaM-EDCdEvn167fNunPK4NrQ%40mail.gmail.com.


Re: If Statement django template

2023-01-12 Thread ASAMOAH EMMANUEL
You can't compare the `contract.supplier` attribute directly to a string
like 'IBM', because it is a foreign key to a `Supplier` model instance.
Instead, you need to access the related `Supplier` model's attributes to
compare them. For example, if the `Supplier` model has a `name` attribute,
you can use:

{% if contract.supplier.name == 'IBM' %}
Alternatively, you could also use a `filter()` method on your `QuerySet` to
filter the contracts by their supplier name before passing them to the
template.

contracts = Contract.objects.filter(supplier__name='IBM')
Then you don't need to use the if statement in the template.

{% for contract in contracts %}

On Thu, Jan 12, 2023 at 2:52 PM Namanya Daniel 
wrote:

>
> Replace supplier with related_name
>
> On Thu, 12 Jan 2023 at 16:13, 'dtdave' via Django users <
> django-users@googlegroups.com> wrote:
>
>> I have the following relationship in a model
>>
>> class Contract(models.Model):
>> supplier = models.ForeignKey(
>> Supplier,
>> on_delete=models.CASCADE,
>> verbose_name="Supplier Name",
>> related_name="contract_suppliers",
>> )
>>
>> I am trying to include an if statement in my template but the following
>> does not work:
>> {% if contract.supplier == 'IBM' %}
>>
>> If I replace this with a non-foreign key item then it works fine.
>>
>> Any help would be appreciated.
>>
>>
>>
>> --
>> 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/4343a170-b193-4c91-aac4-8d773404353dn%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/CAP4VW2V7HfijNHaCX5G_6ACmkQwLvHVXK%2BfgVdMEjTUOF8jYKA%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/CABFHQYw8jQObsCMUX4poRMRTtb0g0ph2f%2BjNrrdvnbfNu2Eq5Q%40mail.gmail.com.


Re: any solutions guys on the ERROR admin E108 on list_display[2] attributes not callable

2023-01-10 Thread ASAMOAH EMMANUEL
The problem here is that list_display[2] is referring to an attribute or
method that does not exist. You will need to either add the attribute or
method to the Product class, or remove the item from list_display. If you
are looking to display the stock of a product, you could add a method to the
Product class to return the stock, then add it to list_display.

On Tue, Jan 10, 2023 at 9:23 PM David Nugent  wrote:

> This is due to an error in your admin class (ProductAdmin in this case)
>
> The error message points directly where and what you need to check
> (spoiler: list_display item, 3rd field “stock”, which is incorrect).
>
>
>
> -- Original Message --
> From "E Mollz" 
> To "Django users" 
> Date 1/10/2023 10:53:37 PM
> Subject any solutions guys on the ERROR admin E108 on list_display[2]
> attributes not callable
>
> : (admin.E108) The value of
> 'list_display[2]' refers to 'stock', which is not a callable, an attribute
> of 'ProductAdmin', or an attribute or method on 'products.Product'.
>
> --
> 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/em7ab82c5a-9ea2-4ec1-93a9-422b04204273%40a52b871d.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/CABFHQYx0Pe7%2BVYq5WZ6gbZXQMOHMAmR25UXM_B4txaxso%3D5gWQ%40mail.gmail.com.


Re: Combining django apps

2022-10-20 Thread ASAMOAH EMMANUEL
Register all your apps in the settings.py file and ensure the namespace is
set to the app name in the urls.py in the project directory

On Tue, Oct 18, 2022 at 10:01 AM Jun Tanaka  wrote:

>
> mysite/
>
> manage.py
>
> config/
>
> __init__.py
>
> settings.py
>
> urls.py
>
> wsgi.py
>
> app1/
>
> app1a/
>
> app1b/
>
> app2/
>
> app3/
>
> I would like to know how to combine  apps together just like above.  Each
> app itself  works fine when runserver. I followed some websites talking
> about this but I always get some error like ‘app1a' is not a registered
> namespace. I'm not very familiar with combining apps. I hope someone can
> tell me the simplest way to do that.
>
> Thank you.
>
> --
> 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/f4a91be8-c4a3-4fa1-9a73-bd202f1f6716n%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/CABFHQYwkxYCV-H4g0y3ujdgWY4CgHu0ezivht_V%2BNgkbnErJVA%40mail.gmail.com.


Re: error extending base template

2022-10-10 Thread ASAMOAH EMMANUEL
Make sure the template directory is located in the app directory or if it
is in a different directory, ensure the location is specified at the
template section  in the settings.py file

On Mon, Oct 10, 2022 at 3:11 PM Namanya Daniel 
wrote:

> hello, someone help me out. am new to django and i face an issue with
> templates extending base.html
>
> i have created a base.html template which is basically a skeleton for
> other templates, they are all in templates/another directory but when i use
> {%extends 'base.html'%}  I get this error... thanks in advance
>
>
> Request Method:
> GET
> Request URL:
> http://127.0.0.1:8000/
> Django Version:
> 4.1.2
> Exception Type:
> TemplateDoesNotExist
> Exception Value:
> base.html
>
> --
> 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/b46cebb4-fca2-49b8-a836-309a2c4a4024n%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/CABFHQYwKkXHT%3DjLQYshKCV3q913_Q8dqWmFXi4477eDXLz0zmg%40mail.gmail.com.


Re: tech newbie

2022-09-28 Thread ASAMOAH EMMANUEL
Ok, I'll help you. Email me privately.

On Tue, Sep 27, 2022 at 2:40 PM Edward Deus Misogoro 
wrote:

> Ok, your welcome.
>
> On Mon, 26 Sept 2022, 23:43 Jay Jay,  wrote:
>
>> Hello bro, I hope you’re doing well? I’m a Jerry, a newbie in software
>> development, I have basic knowledge in HTML, CSS, JavaScript and python and
>> I really need a mentor who can help me through, so I can be very skill at
>> it. I’ll love if you can be my mentor, I would really appreciate it. Thank
>> you.
>>
>> On Mon, Sep 26, 2022 at 12:53 PM Abdulfarid Olakunle <
>> faridosk...@gmail.com> wrote:
>>
>>> Hello fellow developers, I will be creating a WhatsApp group chat later
>>> in the day, So I will like my fellow Python Django Developers to join the
>>> group. It will be much easier to discuss there and I will sacrifice myself
>>> out for anyone who need my service.
>>>
>>> God bless you all
>>> Enjoy your day
>>> Biliaminu
>>>
>>> --
>>> 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/CA%2BccuR0goa8Mu9MqNLyZtCAJedHKpVZ6pFfrpXKFJdjaRrgttQ%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/CAK4FT-qJQ6G7vtF-d9ViCP-VR9%2BnFJRycERJzMvcENq01XDgog%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/CAESqNWiA%2B5OoYo%2BinUUyfoduzVcjkqOJuUkX%3DU4nH6NkhpCypg%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/CABFHQYyJcb_ghduZbk_dYSy7cuMQ6s%3D2BBztj0r%2Bpvo0dz0x5A%40mail.gmail.com.


Re: Help

2022-09-28 Thread ASAMOAH EMMANUEL
Hi! I'm willing to help you. Message me privately for the resources.

On Wed, Sep 28, 2022 at 1:02 AM Abdul Qoyyuum Haji Abdul Kadir <
abdul.qoyy...@gmail.com> wrote:

> That Udemy link is no longer valid.
>
> The Django official docs has a tutorial and is more relevant to the latest
> version versus older YouTube videos.
>
> https://docs.djangoproject.com/en/4.1/
>
> Abdul Qoyyuum Bin Haji Abdul Kadir
> HP: +673 720 8043
> about.me/qoyyuum
>
> On Tue, Sep 27, 2022, 10:41 PM peteru mimo  wrote:
>
>> Good morning
>>
>> Check the
>> https://www.udemy.com/course/draft/3427466/learn/lecture/21717840?start=15#overview
>> is free on udemy
>>
>> Regard
>>
>> On Mon, Sep 26, 2022 at 9:11 PM Balogun Awwal 
>> wrote:
>>
>>> Hello I just learnt python I’m looking to learn django can you recommend
>>> some tutorials and it will also be very helpful if I can get a mentor also
>>> please
>>>
>>> Sent from awwal
>>>
>>> --
>>> 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/CD4750AF-8818-422E-A96C-E193D6E5944A%40gmail.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/CAJBAA1%2Bcfj0vQGxX%2BKYpnnoKpFxmUQ6oW6d2WBsr-d15_Nu4PA%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/CANVqoJ9FKrtxDu3ViH11OGnfrFX%3Dq953UiONjTLZxAMvPJzc1g%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/CABFHQYxE8hGcQV7OB6UvW57bpnknyQ0O8x30aqcEWF6pqzmB7g%40mail.gmail.com.


Re: Need Work

2022-07-16 Thread ASAMOAH EMMANUEL
Hi lightning emperor! I am glad to see you post this message. I am also a
backend django developer and I belong to a startup company. I think that it
would be a perfect idea to connect and work together since even the basics
you know about django, restful services and frontend technologies would
prove astronomically useful. Reach up to me when you are interested in
joining us. Kind regards


On Sat, Jul 16, 2022 at 9:09 PM lightning emperor <
thelesserlovedem...@gmail.com> wrote:

> Hi, everyone
>
> I am new to Django
> I have made multiple small sized projects (here
> )
> I know CRUD functionality with Class based views
> some basic knowledge of Django Restful API
> some basic use of Swagger and setup works
>
> I am looking for a internship from where I can learn to use Django in real
> world situations.
> If anyone here can help me with any opportunity then please do reply
>
> Thank-You
>
> --
> 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/ca16dbbc-a971-4db7-a71f-5d3071f5aeean%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/CABFHQYxLE25phR15T_vtVBupet4RngTjgoBEgdb_QOfR7hWmjg%40mail.gmail.com.