IRC log of #novawebdev for Saturday, 2025-12-20

anthony_p has quit (Ping timeout: 480 seconds)10:21
thomasboimahYesterday, I was reading the Django documentation and also preparing myself for my work session with Zonny today. No blockers.12:00
thomasboimahACTION DONE12:00
zOnnyGood morning Thomas12:02
thomasboimahGood morning zOnny 12:02
zOnnyLast weekend, Thomas and I successfully launched Secosol's blog feature! Today, I'm excited to update the database through Mayfirst. No Blockers.12:02
zOnnyACTION done12:02
thomasboimahYesterday, I was reading the Django documentation and also preparing myself for my work session with Zonny today. No blockers.12:02
thomasboimahACTION done12:02
zOnny has quit (None)12:03
zOnnyNice12:03
zOnnyLearning more about Django?12:04
thomasboimah+112:05
zOnnySorry about my late connection. I was making my coffee :)12:05
thomasboimahnp12:05
zOnnyIt is just you and me today?12:05
thomasboimahYep12:06
thomasboimahthe others are on Christmas break12:06
zOnny has quit (Remote host closed the connection)12:06
zOnnyThomas are you here12:09
zOnnyI t seems like my irc isn't sync12:09
thomasboimahyes12:10
zOnnyI had to go to the logs and see if you have replied12:10
zOnnyGot it, It seems that it works now12:11
zOnnyAh Christmas 12:11
zOnnyit's all good12:12
thomasboimahYep but you and I need to keep things going12:12
zOnnyI was reading the logs and saw you all have moved to the new office12:12
thomasboimahYep12:12
zOnnyHow it feels?12:13
thomasboimahGreat!12:13
zOnnyWorking together from the same place12:13
thomasboimahsuper!12:13
thomasboimahIt is great when working together as a team, it help motivate each other12:14
zOnnyI'm happy for you all, I hope it helps you to plan things better and work as a team\12:14
thomasboimahsure12:14
zOnnySo let's start12:15
zOnnyNot sure if you noticed12:15
zOnnybut I have changed the Secosol DB to postgrest12:15
zOnnyHowever12:16
zOnnyI didn't spend much time with it12:16
zOnnyIn my perspective12:16
zOnnyIt is still using the Mysql12:16
zOnnycan you login to the DB with your credentials12:17
zOnnyI meant12:17
zOnnyto the secosol's website12:17
zOnnyIt is still working, yes?12:17
thomasboimah+112:18
zOnnyBut the server, it did ask me to migrate all the apps again12:18
zOnnyonce it was changed12:18
zOnnyDo you understand why we need to change to postgres?12:24
thomasboimahNo12:25
zOnnythey are built with fundamentally different designs and priorities, leading to mismatches in data types12:27
zOnnyCan you go to the blog12:28
zOnnyin the secosol website12:28
thomasboimahyes12:28
zOnnyand click on the card view button12:29
thomasboimahThat give an error message12:29
zOnnyright12:31
zOnnyDo you understand the error?12:31
thomasboimahI yes12:32
thomasboimahi think so12:32
thomasboimahThe Django code is trying to use a database column (thumbnail) that doesn't exist in the actual database table.12:33
zOnnyright12:34
zOnnyIt means that it is still using mysql12:37
zOnnybecause if you run it locally12:39
zOnnythe error never happens, yes12:39
zOnnyAre you checking the seeting.py?12:46
thomasboimah+112:46
thomasboimahzOnny, this is what i am think i don't know if i am right12:47
zOnnyI also notice that os.getenv12:47
zOnnynot working12:47
zOnnysure, what are you thoughts12:47
thomasboimahin production we are you core/setting or theme/setting i want to confirm something12:48
thomasboimah?12:48
thomasboimah*using*12:48
zOnnygood question12:48
zOnnywait what?12:50
zOnnywhat is going on on the prod theme settings12:50
zOnnyI didn't notice 12:50
zOnnythat it is also trying to override core setttings12:50
zOnnyit shouldn't override the core settings12:51
zOnnygive once sec12:51
thomasboimahThat is what i am trying to understand12:51
zOnnyWe shouldn't have any DB in theme settings12:51
zOnnythe theme settings should only host the extra apps 12:52
zOnnythat is the goal12:52
zOnnyIt shouldn't override the core settings12:52
zOnnyTheme settings should not exists12:53
zOnnybut for custom features, we realized that it is needed 12:53
zOnnyThat is why it is still there12:54
zOnnyWe need to update the settings from the secosol_home13:00
zOnnyWe shouldn't update it in prod13:00
zOnnywe need to update it locally then push and pull13:00
zOnnyWant to do it?13:00
zOnnyOr should I do it very quick13:01
thomasboimahzOnny, one more suggestion13:01
zOnnysure13:01
thomasboimahDon't you think we need to remove from core.settings import * from theme/settings.py because it creating a circular import13:01
thomasboimah?13:02
zOnnyIs it there?13:02
thomasboimahyes13:02
zOnnyYes remove that13:02
zOnnyDo you want me to do it?13:02
zOnnyor you want to do it?13:02
thomasboimahanyone zOnny 13:02
zOnnyWait I think we need that one13:03
zOnnythe import13:03
zOnnyso the theme loads the core default settings13:04
zOnnyLet me update it13:04
zOnnyone sec13:04
zOnnyDo you know why we need that import?13:09
thomasboimahso that the theme can get all the core setting13:10
zOnnywe need it because it will load the core first then the themes and add the INSTALLED_APPS += ['apps.blog'] to the core settings13:10
thomasboimahbut here: if os.path.exists(os.path.join(BASE_DIR, "theme")):13:13
thomasboimah    from theme.settings import *  I see that Core Already Imports Theme13:13
zOnnydone13:21
zOnnyI see13:23
zOnnyhttps://gitlab.com/novawebdevelopment/libreorganize/libreorganize/-/blob/master/libreorganize/core/settings.py?ref_type=heads#L27813:23
zOnnyyou mean this line?13:23
thomasboimahyes13:24
zOnnyThey need each other13:39
zOnnySorry I did step away13:40
thomasboimahnp13:40
zOnnyDo you understand why we need that line in core settings13:44
thomasboimah+113:44
zOnnyThe The if stament avoids import errors on deployments without a theme directory.13:45
zOnny*Statement*13:45
zOnnyThe import pulls in overrides like WEBSITE_NAME and adds theme apps (see libreorganize/theme/settings.py), letting the theme extend INSTALLED_APPS, on top of core defaults.13:45
zOnnyWithout this import, the theme-specific templates would never load, leaving the site with only the base/core configuration.13:47
zOnnySame goes in the theme seetings13:47
zOnnybut the theme settings is secondary13:48
zOnnybecause the LO can still work without the theme dir13:48
zOnnyThat is why that circular pattern13:49
zOnnyunless we find a better way in the future :)13:49
thomasboimahokay13:49
zOnnyalright 13:50
zOnnydid you pull it13:50
thomasboimah+113:50
zOnnythe secosol_home13:50
zOnnycool13:50
zOnnycan you go to the wensite13:55
thomasboimahhave you pull the change to the server now?13:56
zOnnyDo you know why it isn't loading the os.getenv() ?13:56
zOnnyyes, I did13:56
zOnnythe secosol_home?13:56
zOnnyI did pull 13:56
thomasboimahyou restart the server?13:59
thomasboimahbecause i am still getting the databass error14:00
zOnnyI did restart it14:05
zOnnyhowever, that doesn't fix the problem14:05
zOnnyI thing the error is coming from the os.getenv()14:05
zOnny*think*14:05
thomasboimahI'm get this when i go to secosol.us on my browser are you getting the samething? Internal Server Error14:06
zOnnyOops14:06
zOnnyI se14:06
zOnnyThat means it finally isn't reading mysql14:07
thomasboimahsomething like that14:08
zOnnyright14:08
zOnnyI'm trying to make it work with the environmental variables14:08
zOnnybut mayfirst has a different configuration14:08
thomasboimahcheck the PostgreSQL database and user on the cp14:10
zOnnyI have them already set14:10
zOnnyHold on give me 5 min14:11
zOnnyThomas are you here14:41
thomasboimahyes14:41
zOnnyalmost there14:46
thomasboimahokay14:47
zOnnyEverything in the django is working properly15:04
zOnnyhowever15:04
zOnnyit seems Apache is denying the access15:05
zOnnyAccording to the error.log15:05
zOnnyI'm trying to understand why15:06
zOnnyIt is the way mayfirst works is very tedious 15:06
zOnnyI see15:26
zOnnyI think we need to contact mayfirst15:27
zOnnyI cannot find a way to restart Apaache :(15:27
zOnnyThis is what I got when I did my research about it15:29
zOnnyNo—you can’t restart Apache yourself on May First shared hosting. Apache is managed by MF; your .htaccess changes take effect immediately, but full Apache reloads/restarts require May First staff.15:29
zOnnyThomas are you here15:30
thomasboimahyes15:30
zOnnyAre you familiar with this error? 15:35
thomasboimahno15:35
zOnnyWell, it is a very common error15:35
zOnnyIs also know as 500 Error15:36
zOnnyIt is mostly Know as the Web Hosting Error when Apache denies access15:39
zOnnyIf you tail -n 100 ~/logs/error.log15:41
zOnnyIt will tell you why the error is15:41
zOnnyAlright thomas16:04
zOnnyIt seems this will take me a time to finish this issue16:05
zOnnyI have tried so many ways to get it running16:05
thomasboimahI am also investigating it16:05
thomasboimahBut i think the best way is to email mayfirst and hear from them16:06
thomasboimahmaybe they might give some important info16:07
zOnnyyes16:08
zOnnyWe need to have it clear so we don't run into this issue again16:09
zOnnymayfirst is giving a very difficult time :)16:54
zOnnyNow we are getting a different error?17:14
thomasboimahI just change this from the cp /media/data0102/sites/346107/include/libreorganize/venv/bin/python \17:17
thomasboimah-b :24680 core.wsgi17:17
thomasboimah because it was invoking python AND gunicorn together17:17
thomasboimah-b :24680 core.wsgi17:17
thomasboimah-b :24680 core.wsgi17:17
thomasboimah-b :24680 core.wsgi17:18
thomasboimahi replace it with this: /media/data0102/sites/346107/include/libreorganize/venv/bin/gunicorn \17:18
thomasboimah-b 127.0.0.1:24680 core.wsgi17:18
thomasboimahNow we are getting 503 error17:21
thomasboimahThis great because i have see this before17:21
thomasboimahwe now need to run gnuicorn17:21
thomasboimahand it might likely be fix17:22
zOnnyNice :D17:23
zOnnyquick question17:51
zOnnycan you create a file in this directory?17:51
zOnny~/.config/systemd/user$17:51
thomasboimah=117:59
zOnny?18:00
thomasboimah-118:02
thomasboimahnow it work18:07
thomasboimahwe need to collect the static file18:07
thomasboimahto get the css work18:07
thomasboimah*working18:07
zOnnycool18:08
zOnny has quit (Quit: Page closed)18:10
zOnnyIt seems you got it, yes?18:11
thomasboimah+118:13
thomasboimahhow is the site look on your side?18:14
zOnnyhtml18:16
zOnnyno css yet18:16
zOnny has quit (Remote host closed the connection)18:33
zOnnyAccording to the error.log18:41
zOnnyAlias wouldn't work with Apache18:44
thomasboimahit now work!18:55
thomasboimaheverything is now good!18:55
thomasboimahwait18:55
thomasboimahthe content18:55
thomasboimahlet me fix that18:55
zOnnyok18:56
thomasboimahwe also have issue with the blog now18:57
zOnny?18:58
thomasboimahand also the other nav18:58
thomasboimahdem18:58
zOnnyAny progress?19:29
thomasboimahstill debugging19:32
zOnnygot you19:37
thomasboimahzOnny, all is good now20:11
zOnny:O20:12
zOnnyWhat did you change?20:12
thomasboimahthis is what was give me the problem #STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'20:13
thomasboimahso i have to get rid on it and make the site use this static files: /home/sites/346107/web/static/20:14
thomasboimahWait20:14
thomasboimahAre you asking about the database issue or the css issue?20:15
zOnnyin general20:15
zOnnyalso it is down again20:15
thomasboimahyes i stop gunicon20:16
zOnnyit is working again20:18
zOnnyI'm referring to what di you do to address the issue?20:19
thomasboimahOkay The 500 error was coming from the server, not Django itself. In our case, Apache (managed by May First) was denying access or unable to properly read environment variables (os.getenv()), which Django uses to connect to the PostgreSQL database.20:24
zOnnyyes20:26
thomasboimahI verified that the PostgreSQL database and user exist are correctly set.T20:27
zOnnyDo you mean that os.getenv() should work now?20:27
zOnnyI did hard coded in the settings20:28
zOnnyDue that Apache cannot reach it20:28
zOnnyif you say that it can retrieve the .env so I will restore the os.getenv20:29
thomasboimahFor now, os.getenv() won’t work because Apache can’t read the environment. Hard-coding the values in settings is the only way it works until May First configures the environment variables.20:30
zOnnyI see20:31
zOnnyI think the mayfirst customer service can help us out to get Apache work with os.getenv()20:32
zOnnybut for now it is ok20:32
zOnnyhard-coding is not a big deal20:33
thomasboimahokay20:33
thomasboimahare the content displaying on you side on the site20:33
thomasboimah*your20:33
zOnnyNo 20:34
thomasboimahcan you load the data from you side20:34
zOnnyit is the data.json?20:34
zOnnyor the live_Secosol?20:35
thomasboimahdata.json20:35
zOnnyon it20:35
zOnnyI see :)20:36
zOnnyI did load it20:44
zOnnyYou sure it was data.json?20:44
thomasboimah+120:45
zOnny has quit (Remote host closed the connection)20:45
zOnnyit is there20:46
zOnnyIt took awhile20:47
zOnnyThomas are you here20:55
thomasboimahyes20:56
zOnnyThe site is down again20:58
thomasboimahyeah20:59
thomasboimahI stop gunicorn to check something20:59
thomasboimahI run it back it a bit please20:59
thomasboimah*will*20:59
zOnnyno worries21:00
zOnnyDo you mind if we continue tomorrow?21:00
thomasboimahokay21:00
thomasboimahzOnny, when will be start on nova website21:00
zOnnyI need a better picture of mayfirst21:01
thomasboimah*we*21:01
zOnnyTomorrow21:01
thomasboimahOkay21:01
zOnnyNovawebdev is hosted in mayfirst as well?21:01
zOnnyI noticed that we cannot log in21:07
zOnnyI think it is the ALLOWED_HOSTS21:09
thomasboimah has quit (Remote host closed the connection)21:16
zOnnyThomas are you here?>21:24
thomasboimahyes21:24
zOnnyThe css issue21:24
thomasboimahdid you change something?21:24
zOnnyYes, I did add the CSRF_TRUSTED_ORIGINS in settings21:25
zOnnyto make sure that log in works21:26
zOnnyBut I have commeted it out21:26
zOnnyI got to go21:30
zOnnyI will figure it out once I get back if you cannot fix it21:30
zOnnyis that ok with you?21:30
thomasboimahokay21:31
zOnnyACTION signning off for an 1hr21:31
zOnny has quit (Quit: Page closed)21:31
anthony_p has quit (Quit: anthony_p)22:03
thomasboimaheveything now work22:49
thomasboimahACTION signing off22:49
thomasboimah has quit (Quit: Leaving)22:52

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!