Sunday, September 1, 2024

Re: topics to master

Not sure what you mean but if you've already gone through the first steps in Django here:  Django documentation | Django documentation | Django (djangoproject.com)

Then you should be able to start building your own django project. 

On Monday 2 September 2024 at 04:23:22 UTC+8 Dhakshna moorthy Dhandauthapani wrote:
Hey all i'm currently pursuing my btech i have started django last 2 weeks back i have learnt page redirecting models , models, and save some information from browser to my db and currently i don't know which topic to learn , guys suggest me some topics to learn in detail to ace django 

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a474a723-8ec9-4a46-a996-a2aeae5e5235n%40googlegroups.com.

Re: topics to master


On Sun, 1 Sept 2024 at 23:23, Dhakshna moorthy Dhandauthapani <dhakshna021204@gmail.com> wrote:
Hey all i'm currently pursuing my btech i have started django last 2 weeks back i have learnt page redirecting models , models, and save some information from browser to my db and currently i don't know which topic to learn , guys suggest me some topics to learn in detail to ace django 

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5bfc1353-4029-46e7-8142-3d61b4ca8a28n%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAADw1syx25YzPN1w%3DYQoxEJ49TeK5xsfM48t_%3DwCLhKvvBgrJg%40mail.gmail.com.

Saturday, August 31, 2024

Re: issue with static files deployement in Prod envirenment (new issu)

Hi Emmanuel
i tried the solution you provided , but sadly it doesn't work too- i add the my user and www.data user to the same group (i tried this with sudo in venv and outside venv) igave the permissions required to deal with the files - but no way. its still not working- . i am sure that's a permissions issue but what a kinf of issue is ? any other suggestion

Le dimanche 25 août 2024 à 18:27:56 UTC+1, Abulbanat Mosta (Abulila) a écrit :
Thank you a lot  EMMANUEL  for this hint- i'll try and return back to you with insghts

Le dimanche 25 août 2024 à 15:39:54 UTC+1, ASAMOAH EMMANUEL a écrit :
I understand how frustrating this can be. I also faced this same issue for months and this was how I solved it.

  sudo usermod -a -G your_user www-data

  sudo chown -R :www-data /path/to/your/static/folder


Let me know if it is still not solved and I will help you.
Swimmingly,
Simple_genius

On Sun, Aug 25, 2024 at 2:16 PM Abulbanat Mosta (Abulila) <dr.moste...@gmail.com> wrote:
Im getting crazy and very  frustrated about deploying static files of my django app since 1 month- all things are ok except static and media files  which cannot be served by the web server ( i tried apache and nginx)
Firstable- in dev mode my app is ok and the static file are correctly loaded.
switching to prod Env - all my attempts to get over  the issue are unsuccessful.
im using 
 - ubuntu Ubuntu 22.04.4 LTS  
 - Django==3.2.9  
 - gunicorn  (version 22.0.0) as app server  
 - nginx 1.18.0  as reverse proxy -  

 i set up the setting.py and nginx conf with the correct path to static folder as following 


STATICFILES_FINDERS = [
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
]

STATICFILES_DIRS = []

STATIC_URL = '/static/'
STATIC_ROOT = '/var/www/html/bweb/staticfiles'

MEDIA_URL = '/media/'
MEDIA_ROOT = '/var/www/html/bweb/media'


LOCALE_PATHS = (
    os.path.join(BASE_DIR, 'locale'),
    os.path.join(BASE_DIR, 'core', 'locale'),

----------------------

--------------------------
nginx

 location /static/ {
        alias /var/www/html/bweb/staticfiles/;
        access_log /var/log/nginx/static_access.log;
         error_log /var/log/nginx/static_error.log;
        expires 30d;
    }

    location /media/ {
        alias /var/www/html/bweb/media/;
        access_log off;
        expires 30d;
    }

------------------------



- i installed & set gunicorn to serv the app 

- i run the collectstatic command witch copied the files into the path i mentioned in settings.py (several times - django detects each time the presence of the files what means that the conf is ok)
-im using debug = false in prod mod 

=>> whats happening 
my app is running in prod mode (gunicorn seems to do the job) but i'm getting 404 errors for all my static files - 
==> Here what i tried 
- i gave permissions to data-www user  over the folder and all its components which are actually present inside with the folder with the correct permissions
- i run the server in a separate port which is unused in the system - with allowed permissions in firewall
-i cleared the cache and tried out several browsers
- i tried to put manually a test file in the folder  and try to access with curl -
the files still dont want to be served  even the test file.
Log files aren't showing any significant error .

all those attempts were tested with apache web server but  i encounter the same issue

-------

Any one have faced such issue? ubuntu problem ? Django version issue?

I'll be very thankful for help

--
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/450049e4-2fff-4700-a4da-286826bf1d95n%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/dc5aeac5-8b2d-42e1-95d9-a41b6627cd42n%40googlegroups.com.

topics to master

Hey all i'm currently pursuing my btech i have started django last 2 weeks back i have learnt page redirecting models , models, and save some information from browser to my db and currently i don't know which topic to learn , guys suggest me some topics to learn in detail to ace django 

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5bfc1353-4029-46e7-8142-3d61b4ca8a28n%40googlegroups.com.

Thursday, August 29, 2024

Re: Django Static Files Not Loading After EC2 Deployment with Nginx

Did you set up your STATIC_ROOT and do collectstatic?  How to manage static files (e.g. images, JavaScript, CSS) | Django documentation | Django (djangoproject.com)

On Friday 30 August 2024 at 04:06:41 UTC+8 Kiran Barai wrote:

Hello everyone,

  1.  I'm having trouble with my Django project after deploying it on an EC2 instance. The issue is that my static files (CSS, JavaScript) are not loading correctly.
  2. second issues in URL: - 
    issue with a Django project where the URL generated using the {% url %} template tag is not rendering correctly. Instead of getting the proper URL, the rendered URL appears to be incorrectly encoded and includes the literal template tag.           When clicking a button or link that is supposed to navigate to a specific view, the URL appears as follows: 
    https://mydomain/%7B%%20url%20'save-file-history'%20%%7D


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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c3e59ba2-1575-47eb-b9a8-535cd57c7514n%40googlegroups.com.

Re: select widget on forms


Em qui., 29 de ago. de 2024 às 17:15, Eduardo Barbachan <eduardobarbachandb@gmail.com> escreveu:
I would recommend you to read articles in the following links (both from Django documentation):

Em qui., 29 de ago. de 2024 às 17:05, frank dilorenzo <frankdil92@gmail.com> escreveu:
I have a table listing the names of butterflies.  I would like to create a user custom form with a select field populated by the list of butterflies.  I can't find anything on the web to show me the proper syntax.  I would appreciate any help.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b9bfdf53-8050-4bbb-bee8-8aa56a661bdbn%40googlegroups.com.


--

Att.

Eduardo  Barbachan



--

Att.

Eduardo  Barbachan

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGEDDz9jf4Xhz-Hv7RVhyetf%3Deifb3Q-SxQikM2_0ZdTBubkEw%40mail.gmail.com.

Re: select widget on forms

I would recommend you to read articles in the following links (both from Django documentation):

Em qui., 29 de ago. de 2024 às 17:05, frank dilorenzo <frankdil92@gmail.com> escreveu:
I have a table listing the names of butterflies.  I would like to create a user custom form with a select field populated by the list of butterflies.  I can't find anything on the web to show me the proper syntax.  I would appreciate any help.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b9bfdf53-8050-4bbb-bee8-8aa56a661bdbn%40googlegroups.com.


--

Att.

Eduardo  Barbachan

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGEDDz_N5q8LKu8GjaygKerdYqzLkK_OvPfpwDcbCMxb-CxPQw%40mail.gmail.com.