Re: Unpaid Internship

2023-04-26 Thread justice abekah
OK , I will get back to you soon


On Tue, Apr 25, 2023 at 10:50 PM kelvin Ace  wrote:

>
> mailto:p...@scom.ca
>
>
>> Pls contact me directly at pa...@scom.ca please have an idea
>>
>>
>> thanks - paul
>>
>> Paul Kudla
>>
>>
>> SCOM.CA Internet Services Inc.
>> 004-1009 Byron Street South
>> Whitby, Ontario - Canada
>> L1N 4S3
>>
>> Toronto 416.642.7266
>> Main 1.866.411.7266
>> Fax 1.888.892.7266
>>
>>
>> On Apr 24, 2023 at 10:26:17 EDT, John Diginee 
>> wrote:
>>
>> Dear Sir/Ma'am,
>>
>> I hope this message finds you well. I am a full-stack software
>> engineering student at Holberton School, a Silicon Valley-based software
>> engineering institution. I am reaching out to express my interest in an
>> unpaid backend intern or junior role at your esteemed company.
>>
>> My primary goal is to learn from your inspiring and experienced
>> developers and gain practical, real-world experience. I am not particularly
>> concerned about financial compensation at this time.
>>
>> I understand that my request may seem unconventional, but I would be
>> grateful for any opportunity to work with your company. I am a hardworking,
>> persistent, determined, resilient, and fast-learning individual, and I am
>> confident that I can contribute positively to your team.
>>
>> Here's my LinkedIn and GitHub profile for your review:
>> https://www.linkedin.com/in/johndiginee/
>> https://github.com/johndiginee
>>
>>  Thank you for your precious time and consideration. I look forward to
>> hearing from 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...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/d0247416-15e7-42c2-bf56-54ef95bb6733n%40googlegroups.com
>> 
>> .
>>
>> --
>> This message has been scanned for viruses and
>> dangerous content by*MailScanner* , and is
>> believed to be clean.
>>
>> --
>> 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/58b231ed-9511-4395-ae26-252e558870een%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/CANsgcKBu%2BEdt49hs9_wDb%2Bvx2wd%3DX7HyU12%3DLTtigq%3DwcMV2sA%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/CAEeswnwbAfvPWb-LrPhwGJ%3DcpBQUCqJqJiNC6ZXwQ%3Di%2BO1zjHg%40mail.gmail.com.


Re: Unpaid Internship

2023-04-26 Thread Julius Chesoni
I’m interested in a paid internship so that I could be motivated to work
hard. I am from Nairobi in East Africa and I don’t have any job because of
poverty and massive unemployment in sub Saharan Africa.

Thanks.

On Mon, Apr 24, 2023 at 6:57 PM Paul Kudla ( SCOM )  wrote:

> Pls contact me directly at p...@scom.ca please have an idea
>
>
> thanks - paul
>
> Paul Kudla
>
>
> SCOM.CA Internet Services Inc.
> 004-1009 Byron Street South
> Whitby, Ontario - Canada
> L1N 4S3
>
> Toronto 416.642.7266
> Main 1.866.411.7266
> Fax 1.888.892.7266
>
>
> On Apr 24, 2023 at 10:26:17 EDT, John Diginee <
> django-users@googlegroups.com> wrote:
>
> Dear Sir/Ma'am,
>
> I hope this message finds you well. I am a full-stack software engineering
> student at Holberton School, a Silicon Valley-based software engineering
> institution. I am reaching out to express my interest in an unpaid backend
> intern or junior role at your esteemed company.
>
> My primary goal is to learn from your inspiring and experienced developers
> and gain practical, real-world experience. I am not particularly concerned
> about financial compensation at this time.
>
> I understand that my request may seem unconventional, but I would be
> grateful for any opportunity to work with your company. I am a hardworking,
> persistent, determined, resilient, and fast-learning individual, and I am
> confident that I can contribute positively to your team.
>
> Here's my LinkedIn and GitHub profile for your review:
> https://www.linkedin.com/in/johndiginee/
> https://github.com/johndiginee
>
>  Thank you for your precious time and consideration. I look forward to
> hearing from 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/d0247416-15e7-42c2-bf56-54ef95bb6733n%40googlegroups.com
> 
> .
>
> --
> This message has been scanned for viruses and
> dangerous content by*MailScanner* , and is
> believed to be clean.
>
> --
> 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/94938A57-A4DB-4AF7-9C36-C59A2A3C8ED5.goodhumans%40scom.ca
> 
> .
>

-- 
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/CANOu6a8BJ6CRowhRLnwY-0rzm_nnjX%3Dvtq%2BchCcNUwpTO2P0%3DA%40mail.gmail.com.


Re: python manage.py commonds: AttributeError: 'PosixPath' object has no attribute 'startswith'

2023-04-26 Thread Julius Chesoni
You must be a very good Django programmer.

Thank you on behalf of Django community, for such a great answer that even
novices like me are able to understand.

 I had no idea that there were other non default configurations of the
variable BASE_DIR.


Julius.

On Wed, Apr 26, 2023 at 1:15 AM David Nugent  wrote:

> This error is being triggered by an outdated and badly behaved module
> that contains the run_cmdb_worker management command.
>
> Anything that relies on the presence of BASE_DIR in settings is bad
> behaviour. This is an entirely arbitrary variable name that might not even
> be present in a non-default configuration, and it effectively a "private"
> variable.
>
> There are better ways to determine the Django base directory (although
> reliance on same is also questionable as it probably assumes a specific
> Django layout, which is also poor behaviour).
>
> If you insist on using it, then simply wrap BASE_DIR def with a str()
> cast, or use .as_posix() member, i.e.
>
> BASE_DIR = str(Path(__file__).resolve().parent.parent)
>
> This may invalidate other uses in your settings module though, for example:
>
> BASE_DIR / 'someothervalue'
>
> If your change does not trigger an error otherwise, then you are probably
> fine.
>
> Regards,
> David
>
>
> On Mon, Apr 24, 2023 at 2:21 AM DL  wrote:
>
>> Django 4.2
>> Python 3.10.10
>>
>> # python manage.py run_cmdb_worker
>> Traceback (most recent call last):
>>   File "/usr/local/python/lib/python3.10/pkgutil.py", line 417, in
>> get_importer
>> importer = sys.path_importer_cache[path_item]
>> KeyError: PosixPath('/www/cloudadmin')
>>
>> During handling of the above exception, another exception occurred:
>>
>> Traceback (most recent call last):
>>   File "/www/cloudadmin/manage.py", line 22, in 
>> main()
>>   File "/www/cloudadmin/manage.py", line 18, in main
>> execute_from_command_line(sys.argv)
>>   File
>> "/opt/.pyvenv/lib/python3.10/site-packages/django/core/management/__init__.py",
>> line 442, in execute_from_command_line
>> utility.execute()
>>   File
>> "/opt/.pyvenv/lib/python3.10/site-packages/django/core/management/__init__.py",
>> line 436, in execute
>> self.fetch_command(subcommand).run_from_argv(self.argv)
>>   File
>> "/opt/.pyvenv/lib/python3.10/site-packages/django/core/management/__init__.py",
>> line 275, in fetch_command
>> klass = load_command_class(app_name, subcommand)
>>   File
>> "/opt/.pyvenv/lib/python3.10/site-packages/django/core/management/__init__.py",
>> line 48, in load_command_class
>> module = import_module("%s.management.commands.%s" % (app_name, name))
>>   File "/usr/local/python/lib/python3.10/importlib/__init__.py", line
>> 126, in import_module
>> return _bootstrap._gcd_import(name[level:], package, level)
>>   File "", line 1050, in _gcd_import
>>   File "", line 1027, in _find_and_load
>>   File "", line 1006, in
>> _find_and_load_unlocked
>>   File "", line 688, in _load_unlocked
>>   File "", line 883, in exec_module
>>   File "", line 241, in
>> _call_with_frames_removed
>>   File
>> "/www/cloudadmin/apps/cmdb/management/commands/run_cmdb_worker.py", line 2,
>> in 
>> from cmdb.scheduler import Scheduler
>>   File "/www/cloudadmin/apps/cmdb/scheduler.py", line 3, in 
>> from apscheduler.schedulers.background import BackgroundScheduler
>>   File
>> "/opt/.pyvenv/lib/python3.10/site-packages/apscheduler/__init__.py", line
>> 1, in 
>> from pkg_resources import get_distribution, DistributionNotFound
>>   File
>> "/opt/.pyvenv/lib/python3.10/site-packages/pkg_resources/__init__.py", line
>> 3260, in 
>> def _initialize_master_working_set():
>>   File
>> "/opt/.pyvenv/lib/python3.10/site-packages/pkg_resources/__init__.py", line
>> 3234, in _call_aside
>> f(*args, **kwargs)
>>   File
>> "/opt/.pyvenv/lib/python3.10/site-packages/pkg_resources/__init__.py", line
>> 3272, in _initialize_master_working_set
>> working_set = WorkingSet._build_master()
>>   File
>> "/opt/.pyvenv/lib/python3.10/site-packages/pkg_resources/__init__.py", line
>> 572, in _build_master
>> ws = cls()
>>   File
>> "/opt/.pyvenv/lib/python3.10/site-packages/pkg_resources/__init__.py", line
>> 565, in __init__
>> self.add_entry(entry)
>>   File
>> "/opt/.pyvenv/lib/python3.10/site-packages/pkg_resources/__init__.py", line
>> 621, in add_entry
>> for dist in find_distributions(entry, True):
>>   File
>> "/opt/.pyvenv/lib/python3.10/site-packages/pkg_resources/__init__.py", line
>> 1988, in find_distributions
>> importer = get_importer(path_item)
>>   File "/usr/local/python/lib/python3.10/pkgutil.py", line 421, in
>> get_importer
>> importer = path_hook(path_item)
>>   File "", line 1632, in
>> path_hook_for_FileFinder
>>   File "", line 1504, in __init__
>>   File "", line 182, in _path_isabs
>> AttributeError: 'PosixPath' object has no attribute 'startswith'
>>
>> I must midify settings.py, change BASE_DIR, it can run
>> # BASE_DIR = Path(__file__).resolve().parent.par

Is programming in Django intellectually satisfactory

2023-04-26 Thread Julius Chesoni
 Hi guys, I find programming in the abstract very interesting and full of
intellectual benefits similar to those acquired from Mathematics. However,
when it comes to programming languages I find the practice of programming
very tiresome since there are very many functions in the documentations. I
am not able to enjoy reading the documentations even though I am eager to
know how to master the particular language. How do you guys manage to be
masters in languages like Django since I see some great people contributing
to every question. This amazes me.

Kind regards
Julius

-- 
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/CANOu6a8axU1sL6GXveq7CufyTm1JWX-6aZ7FU4fJVqLq9M0GAQ%40mail.gmail.com.


Django CORS Headers

2023-04-26 Thread Salman Butt
Hello i am using drf to create api for viewing User profile and relevant 
information, during Sign up and log in there were no issues as it didn’t 
required any headers but now since user is logged in i have created a JWT 
token for authentication and i am using that token to verify the user, my 
backend is in DRF while front end is on React, i have configured my 
settings in order to allow access to all origins but this issue is still 
there and i have tried so many different work arounds but to not affect. 
This is the error:
Access to XMLHttpRequest has been blocked by CORS policy: No 
‘Access-Control-Allow-Origin’ header is present on the requested resource.
Although i have configured it

-- 
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/8b1fc55c-b206-4fbc-9533-4ff5b521e9e5n%40googlegroups.com.


Re: Django CORS Headers

2023-04-26 Thread Reddy Tintaya
https://pypi.org/project/django-cors-headers/
django-cors-headers
pypi.org

This package does the magic for you :) 

> On 26 Apr 2023, at 07:14, Salman Butt  wrote:
> 
> Hello i am using drf to create api for viewing User profile and relevant 
> information, during Sign up and log in there were no issues as it didn’t 
> required any headers but now since user is logged in i have created a JWT 
> token for authentication and i am using that token to verify the user, my 
> backend is in DRF while front end is on React, i have configured my settings 
> in order to allow access to all origins but this issue is still there and i 
> have tried so many different work arounds but to not affect. This is the 
> error:
> Access to XMLHttpRequest has been blocked by CORS policy: No 
> ‘Access-Control-Allow-Origin’ header is present on the requested resource.
> Although i have configured it
> 
> -- 
> 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/8b1fc55c-b206-4fbc-9533-4ff5b521e9e5n%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/2815830C-4A65-4F67-B810-81A3A1B99A02%40momnt.com.


Serving static files in production

2023-04-26 Thread Brian Odhiambo
Hello everyone,
I am deploying a django project to a dedicated server.
I have set nginx to find static files in this file "staticfiles".

This is the setting in settings.py file:

STATIC_ROOT = BASE_DIR / 'staticfiles'
STATIC_URL = 'static/'

After running collectstatic command, my project can't still load the static 
files.
Could I get a general way of going about this, without having to rely on a 
third party library like whitenoise?

My appreciation 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/eefed174-efad-4101-80c1-b0a589c64507n%40googlegroups.com.


Re: Is programming in Django intellectually satisfactory

2023-04-26 Thread Khalifa Abdurahman
Practice practice practice

On Wed, Apr 26, 2023 at 4:58 PM Julius Chesoni 
wrote:

>  Hi guys, I find programming in the abstract very interesting and full of
> intellectual benefits similar to those acquired from Mathematics. However,
> when it comes to programming languages I find the practice of programming
> very tiresome since there are very many functions in the documentations. I
> am not able to enjoy reading the documentations even though I am eager to
> know how to master the particular language. How do you guys manage to be
> masters in languages like Django since I see some great people contributing
> to every question. This amazes me.
>
> Kind regards
> Julius
>
> --
> 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/CANOu6a8axU1sL6GXveq7CufyTm1JWX-6aZ7FU4fJVqLq9M0GAQ%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/CALs%3DmE237kDM82T6-xOtN8ybfkfPKt0J9amzmULBpNXOfFG%3D6Q%40mail.gmail.com.


Re: Is programming in Django intellectually satisfactory

2023-04-26 Thread Brian Carey
If you want intellectual stimulation start with vanilla python or js. If you 
want to learn a framework. This is purely subjective. Either way I don't know 
how you'd do it without reading or a full-time tutor. If you find it too 
tiresome then maybe a little introspection is in order.

⁣Get BlueMail for Android ​

On Apr 26, 2023, 07:57, at 07:57, Julius Chesoni  
wrote:
>Hi guys, I find programming in the abstract very interesting and full
>of
>intellectual benefits similar to those acquired from Mathematics.
>However,
>when it comes to programming languages I find the practice of
>programming
>very tiresome since there are very many functions in the
>documentations. I
>am not able to enjoy reading the documentations even though I am eager
>to
>know how to master the particular language. How do you guys manage to
>be
>masters in languages like Django since I see some great people
>contributing
>to every question. This amazes me.
>
>Kind regards
>Julius
>
>-- 
>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/CANOu6a8axU1sL6GXveq7CufyTm1JWX-6aZ7FU4fJVqLq9M0GAQ%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/c73d6eef-862e-4557-91c3-caa79b267edf%40gmail.com.


Saving data from a post request using nested DRF serializers

2023-04-26 Thread Kimanxo
Here is my problem im gelreat details :
https://stackoverflow.com/questions/76112118/django-rest-frameworks-nested-serializers-post-request-foreignkey-error

-- 
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/d7f8a1bc-437d-4e53-a6e0-0e85009478ean%40googlegroups.com.


Re: Serving static files in production

2023-04-26 Thread David Nugent
Ensure that nginx is correctly configured, since from what you have
provided the django configuration looks correct (although I generally use
/static/ as STATIC_URL - with the leading / but should work as you have
it). Check the nginx error log to try to discover the cause of the 404s. I
suspect that the location blocks are defined in the wrong order or the
directory pointing to the incorrect location.

In any case, whitenoise is not a bad solution tbh, and very flexible
besides. I would solve the above - which should work - before investigating
that further.

Regards,
David

On Thu, Apr 27, 2023 at 1:01 AM Brian Odhiambo 
wrote:

> Hello everyone,
> I am deploying a django project to a dedicated server.
> I have set nginx to find static files in this file "staticfiles".
>
> This is the setting in settings.py file:
>
> STATIC_ROOT = BASE_DIR / 'staticfiles'
> STATIC_URL = 'static/'
>
> After running collectstatic command, my project can't still load the
> static files.
> Could I get a general way of going about this, without having to rely on a
> third party library like whitenoise?
>
> My appreciation 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/eefed174-efad-4101-80c1-b0a589c64507n%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/CAE5VhgWQ%3D589ZJwwycoO3g0%3DXh6x%2Bqjhu9---iUtV6nRQE4jhw%40mail.gmail.com.


Re: Is programming in Django intellectually satisfactory

2023-04-26 Thread Mike Dewhirst

On 26/04/2023 10:18 am, Julius Chesoni wrote:
 Hi guys, I find programming in the abstract very interesting and full 
of intellectual benefits similar to those acquired from Mathematics. 
However, when it comes to programming languages I find the practice of 
programming very tiresome since there are very many functions in the 
documentations. I am not able to enjoy reading the documentations even 
though I am eager to know how to master the particular language. How 
do you guys manage to be masters in languages like Django since I see 
some great people contributing to every question. This amazes me.


Django could be thought of as a language. In fact it is a "framework" - 
a jargon word which probably needs decoding but I don't have time.


Django is written in Python. Python started as a teaching language for 
primary school kids but it has sufficient sophistication for masters of 
Python to build almost anything.


The two main benefits of Python are:

 * ease of learning for beginners and
 *  powerful enough for complex projects to be built faster than most 
other languages.


Python was chosen by Django's original authors for a web project and 
they built libraries of useful routines which they eventually 
open-sourced as Django to make website development much more satisfying 
for other developers.


The intellectual satisfaction - and therefore main attraction of Django 
- comes from being able to do anything. There are plenty of guidelines 
and "best practices" but absolutely no frustrating restrictions. If you 
find a web problem you want to solve, I would be very surprised if it 
couldn't be solved with Django.


Many would argue front-end problems cannot be solved with a back-end 
server architecture like Django but nowadays, with htmx, that argument 
is lost.


So, to answer your question in the abstract, Django is used as the 
interface "language" between a database and the user with a web browser. 
It contains an "Object Relational Mapper" (ORM). The mathematics of 
relational database management systems (RDBMS) should pique your 
interest. The language of RDBMS is Structured Query Language (SQL) but 
because Django has its ORM you no longer need to learn SQL. The Django 
library of queries comes to the rescue.


Django, HTML+htmx and CSS therefore is all you really need to build a 
completely fuctional and intellectually satisfying website.


My advice to you is to find a small project you really want to do and 
get started one step at a time.


Someone else said practice practice practice. That is completely 
correct. You need to start somewhere if you are really interested.


With practice you can tackle ever more interesting projects.

Good luck.



Kind regards
Julius
--
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/CANOu6a8axU1sL6GXveq7CufyTm1JWX-6aZ7FU4fJVqLq9M0GAQ%40mail.gmail.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 came from me. Your
email software can handle signing.

--
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/17f6b06b-546f-069b-4487-d740b5bd7267%40dewhirst.com.au.


OpenPGP_signature
Description: OpenPGP digital signature


Re: Is programming in Django intellectually satisfactory

2023-04-26 Thread Alec Delaney
I love it

On Wed, Apr 26, 2023, 11:08 PM Mike Dewhirst  wrote:

> On 26/04/2023 10:18 am, Julius Chesoni wrote:
>
>  Hi guys, I find programming in the abstract very interesting and full of
> intellectual benefits similar to those acquired from Mathematics. However,
> when it comes to programming languages I find the practice of programming
> very tiresome since there are very many functions in the documentations. I
> am not able to enjoy reading the documentations even though I am eager to
> know how to master the particular language. How do you guys manage to be
> masters in languages like Django since I see some great people contributing
> to every question. This amazes me.
>
>
> Django could be thought of as a language. In fact it is a "framework" - a
> jargon word which probably needs decoding but I don't have time.
>
> Django is written in Python. Python started as a teaching language for
> primary school kids but it has sufficient sophistication for masters of
> Python to build almost anything.
>
> The two main benefits of Python are:
>
>  * ease of learning for beginners and
>  *  powerful enough for complex projects to be built faster than most
> other languages.
>
> Python was chosen by Django's original authors for a web project and they
> built libraries of useful routines which they eventually open-sourced as
> Django to make website development much more satisfying for other
> developers.
>
> The intellectual satisfaction - and therefore main attraction of Django -
> comes from being able to do anything. There are plenty of guidelines and
> "best practices" but absolutely no frustrating restrictions. If you find a
> web problem you want to solve, I would be very surprised if it couldn't be
> solved with Django.
>
> Many would argue front-end problems cannot be solved with a back-end
> server architecture like Django but nowadays, with htmx, that argument is
> lost.
>
> So, to answer your question in the abstract, Django is used as the
> interface "language" between a database and the user with a web browser. It
> contains an "Object Relational Mapper" (ORM). The mathematics of relational
> database management systems (RDBMS) should pique your interest. The
> language of RDBMS is Structured Query Language (SQL) but because Django has
> its ORM you no longer need to learn SQL. The Django library of queries
> comes to the rescue.
>
> Django, HTML+htmx and CSS therefore is all you really need to build a
> completely fuctional and intellectually satisfying website.
>
> My advice to you is to find a small project you really want to do and get
> started one step at a time.
>
> Someone else said practice practice practice. That is completely correct.
> You need to start somewhere if you are really interested.
>
> With practice you can tackle ever more interesting projects.
>
> Good luck.
>
>
> Kind regards
> Julius
> --
> 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/CANOu6a8axU1sL6GXveq7CufyTm1JWX-6aZ7FU4fJVqLq9M0GAQ%40mail.gmail.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 came from me. Your
> email software can handle signing.
>
> --
> 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/17f6b06b-546f-069b-4487-d740b5bd7267%40dewhirst.com.au
> 
> .
>

-- 
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/CAFGN%3DGhuquB47d%3DgJUPUh%2BZAk5mPBCuXUz_FLBQ89AvW0O9-iw%40mail.gmail.com.


Re: Serving static files in production

2023-04-26 Thread Prosper Lekia
Is whitenoise installed and added to MiddleWare?

On Thu, Apr 27, 2023, 00:37 David Nugent  wrote:

> Ensure that nginx is correctly configured, since from what you have
> provided the django configuration looks correct (although I generally use
> /static/ as STATIC_URL - with the leading / but should work as you have
> it). Check the nginx error log to try to discover the cause of the 404s. I
> suspect that the location blocks are defined in the wrong order or the
> directory pointing to the incorrect location.
>
> In any case, whitenoise is not a bad solution tbh, and very flexible
> besides. I would solve the above - which should work - before investigating
> that further.
>
> Regards,
> David
>
> On Thu, Apr 27, 2023 at 1:01 AM Brian Odhiambo 
> wrote:
>
>> Hello everyone,
>> I am deploying a django project to a dedicated server.
>> I have set nginx to find static files in this file "staticfiles".
>>
>> This is the setting in settings.py file:
>>
>> STATIC_ROOT = BASE_DIR / 'staticfiles'
>> STATIC_URL = 'static/'
>>
>> After running collectstatic command, my project can't still load the
>> static files.
>> Could I get a general way of going about this, without having to rely on
>> a third party library like whitenoise?
>>
>> My appreciation 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/eefed174-efad-4101-80c1-b0a589c64507n%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/CAE5VhgWQ%3D589ZJwwycoO3g0%3DXh6x%2Bqjhu9---iUtV6nRQE4jhw%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/CALGeGE1oLKr5e2hAz1WLV1k%3DO9JYpNss_1GX1CPRr_r4FuuvEg%40mail.gmail.com.


Re: Serving static files in production

2023-04-26 Thread Brian Odhiambo
Thanks for your response @David.
Here is my nginx configuration.[image:
1c9b64ec-c74f-4004-8b8d-9a6e7a3d8069.png]
Pointed it to staticfiles after running collectstatic files command.

On Thu, Apr 27, 2023 at 8:11 AM Prosper Lekia 
wrote:

> Is whitenoise installed and added to MiddleWare?
>
> On Thu, Apr 27, 2023, 00:37 David Nugent  wrote:
>
>> Ensure that nginx is correctly configured, since from what you have
>> provided the django configuration looks correct (although I generally use
>> /static/ as STATIC_URL - with the leading / but should work as you have
>> it). Check the nginx error log to try to discover the cause of the 404s. I
>> suspect that the location blocks are defined in the wrong order or the
>> directory pointing to the incorrect location.
>>
>> In any case, whitenoise is not a bad solution tbh, and very flexible
>> besides. I would solve the above - which should work - before investigating
>> that further.
>>
>> Regards,
>> David
>>
>> On Thu, Apr 27, 2023 at 1:01 AM Brian Odhiambo <
>> brianodhiambo...@gmail.com> wrote:
>>
>>> Hello everyone,
>>> I am deploying a django project to a dedicated server.
>>> I have set nginx to find static files in this file "staticfiles".
>>>
>>> This is the setting in settings.py file:
>>>
>>> STATIC_ROOT = BASE_DIR / 'staticfiles'
>>> STATIC_URL = 'static/'
>>>
>>> After running collectstatic command, my project can't still load the
>>> static files.
>>> Could I get a general way of going about this, without having to rely on
>>> a third party library like whitenoise?
>>>
>>> My appreciation 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/eefed174-efad-4101-80c1-b0a589c64507n%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/CAE5VhgWQ%3D589ZJwwycoO3g0%3DXh6x%2Bqjhu9---iUtV6nRQE4jhw%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/CALGeGE1oLKr5e2hAz1WLV1k%3DO9JYpNss_1GX1CPRr_r4FuuvEg%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/CAPjQKqZcbd8nPu-2cLAER_nGZnPtm%2BBbEXRDvFTtb-ZG40Bo5w%40mail.gmail.com.


Re: Serving static files in production

2023-04-26 Thread Brian Odhiambo
@Prosper,
I installed whitenoise at some point, but later removed its configuration.

On Thu, Apr 27, 2023 at 8:11 AM Prosper Lekia 
wrote:

> Is whitenoise installed and added to MiddleWare?
>
> On Thu, Apr 27, 2023, 00:37 David Nugent  wrote:
>
>> Ensure that nginx is correctly configured, since from what you have
>> provided the django configuration looks correct (although I generally use
>> /static/ as STATIC_URL - with the leading / but should work as you have
>> it). Check the nginx error log to try to discover the cause of the 404s. I
>> suspect that the location blocks are defined in the wrong order or the
>> directory pointing to the incorrect location.
>>
>> In any case, whitenoise is not a bad solution tbh, and very flexible
>> besides. I would solve the above - which should work - before investigating
>> that further.
>>
>> Regards,
>> David
>>
>> On Thu, Apr 27, 2023 at 1:01 AM Brian Odhiambo <
>> brianodhiambo...@gmail.com> wrote:
>>
>>> Hello everyone,
>>> I am deploying a django project to a dedicated server.
>>> I have set nginx to find static files in this file "staticfiles".
>>>
>>> This is the setting in settings.py file:
>>>
>>> STATIC_ROOT = BASE_DIR / 'staticfiles'
>>> STATIC_URL = 'static/'
>>>
>>> After running collectstatic command, my project can't still load the
>>> static files.
>>> Could I get a general way of going about this, without having to rely on
>>> a third party library like whitenoise?
>>>
>>> My appreciation 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/eefed174-efad-4101-80c1-b0a589c64507n%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/CAE5VhgWQ%3D589ZJwwycoO3g0%3DXh6x%2Bqjhu9---iUtV6nRQE4jhw%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/CALGeGE1oLKr5e2hAz1WLV1k%3DO9JYpNss_1GX1CPRr_r4FuuvEg%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/CAPjQKqaN8dHhw7OoYsBCXxycKo7qgAFkAWHT0o%3DRYMvauPL%3DtA%40mail.gmail.com.