diff --git a/FrontEnd/src/components/ProfileDetail/BannerImage.module.css b/FrontEnd/src/components/ProfileDetail/BannerImage.module.css index ad7821671..784747652 100644 --- a/FrontEnd/src/components/ProfileDetail/BannerImage.module.css +++ b/FrontEnd/src/components/ProfileDetail/BannerImage.module.css @@ -12,4 +12,4 @@ height: 200px; flex-shrink: 0; background: var(--main-grey-20, #DEE1E8); -} \ No newline at end of file +} diff --git a/FrontEnd/src/components/ProfileDetail/DetailedInfo/Company.module.css b/FrontEnd/src/components/ProfileDetail/DetailedInfo/Company.module.css index 1ad854c85..022817303 100644 --- a/FrontEnd/src/components/ProfileDetail/DetailedInfo/Company.module.css +++ b/FrontEnd/src/components/ProfileDetail/DetailedInfo/Company.module.css @@ -100,4 +100,4 @@ font-weight: 600; line-height: 20px; letter-spacing: -0.16px; -} \ No newline at end of file +} diff --git a/FrontEnd/src/components/ProfileDetail/DetailedInfo/CompanyDescription.module.css b/FrontEnd/src/components/ProfileDetail/DetailedInfo/CompanyDescription.module.css index 533023a58..e06f6ead2 100644 --- a/FrontEnd/src/components/ProfileDetail/DetailedInfo/CompanyDescription.module.css +++ b/FrontEnd/src/components/ProfileDetail/DetailedInfo/CompanyDescription.module.css @@ -4,4 +4,4 @@ align-items: flex-start; gap: 16px; min-width: 800px; -} \ No newline at end of file +} diff --git a/FrontEnd/src/components/ProfileDetail/DetailedInfo/Cooperation.module.css b/FrontEnd/src/components/ProfileDetail/DetailedInfo/Cooperation.module.css index c209d3c46..da8f2f351 100644 --- a/FrontEnd/src/components/ProfileDetail/DetailedInfo/Cooperation.module.css +++ b/FrontEnd/src/components/ProfileDetail/DetailedInfo/Cooperation.module.css @@ -61,4 +61,4 @@ font-weight: 400; line-height: 22px; letter-spacing: -0.14px; -} \ No newline at end of file +} diff --git a/FrontEnd/src/components/ProfileDetail/DetailedInfo/DataContacts.module.css b/FrontEnd/src/components/ProfileDetail/DetailedInfo/DataContacts.module.css index 3b3704405..fb352a84f 100644 --- a/FrontEnd/src/components/ProfileDetail/DetailedInfo/DataContacts.module.css +++ b/FrontEnd/src/components/ProfileDetail/DetailedInfo/DataContacts.module.css @@ -76,4 +76,4 @@ display: flex; align-items: flex-start; gap: 8px; -} \ No newline at end of file +} diff --git a/FrontEnd/src/components/ProfileDetail/DetailedInfo/DetailedInfoSection.module.css b/FrontEnd/src/components/ProfileDetail/DetailedInfo/DetailedInfoSection.module.css index f81a80b15..bf89c99f8 100644 --- a/FrontEnd/src/components/ProfileDetail/DetailedInfo/DetailedInfoSection.module.css +++ b/FrontEnd/src/components/ProfileDetail/DetailedInfo/DetailedInfoSection.module.css @@ -2,4 +2,4 @@ display: flex; align-items: flex-start; gap: 134px; -} \ No newline at end of file +} diff --git a/FrontEnd/src/components/ProfileDetail/DetailedInfo/Logistics.module.css b/FrontEnd/src/components/ProfileDetail/DetailedInfo/Logistics.module.css index 8d4336b27..febce9021 100644 --- a/FrontEnd/src/components/ProfileDetail/DetailedInfo/Logistics.module.css +++ b/FrontEnd/src/components/ProfileDetail/DetailedInfo/Logistics.module.css @@ -61,4 +61,4 @@ font-weight: 400; line-height: 22px; letter-spacing: -0.14px; -} \ No newline at end of file +} diff --git a/FrontEnd/src/components/ProfileDetail/DetailedInfo/PhoneEmail.module.css b/FrontEnd/src/components/ProfileDetail/DetailedInfo/PhoneEmail.module.css index 2be726624..a8945f89e 100644 --- a/FrontEnd/src/components/ProfileDetail/DetailedInfo/PhoneEmail.module.css +++ b/FrontEnd/src/components/ProfileDetail/DetailedInfo/PhoneEmail.module.css @@ -65,4 +65,4 @@ justify-content: space-between; align-items: center; min-width: 100%; -} \ No newline at end of file +} diff --git a/FrontEnd/src/components/ProfileDetail/DetailedInfo/ProductsServices.module.css b/FrontEnd/src/components/ProfileDetail/DetailedInfo/ProductsServices.module.css index 35bf7a6f9..348edee1f 100644 --- a/FrontEnd/src/components/ProfileDetail/DetailedInfo/ProductsServices.module.css +++ b/FrontEnd/src/components/ProfileDetail/DetailedInfo/ProductsServices.module.css @@ -75,4 +75,4 @@ font-weight: 400; line-height: 22px; letter-spacing: -0.14px; -} \ No newline at end of file +} diff --git a/FrontEnd/src/components/ProfileDetail/DetailedInfo/ReadMore.jsx b/FrontEnd/src/components/ProfileDetail/DetailedInfo/ReadMore.jsx index 769ca8847..84928bcc1 100644 --- a/FrontEnd/src/components/ProfileDetail/DetailedInfo/ReadMore.jsx +++ b/FrontEnd/src/components/ProfileDetail/DetailedInfo/ReadMore.jsx @@ -35,9 +35,7 @@ const ReadMore = ({ children }) => { : false } > -

- {text} -

+ {text} ); }; diff --git a/FrontEnd/src/components/ProfileDetail/DetailedInfo/ReadMore.module.css b/FrontEnd/src/components/ProfileDetail/DetailedInfo/ReadMore.module.css index 4028103b3..214038b8d 100644 --- a/FrontEnd/src/components/ProfileDetail/DetailedInfo/ReadMore.module.css +++ b/FrontEnd/src/components/ProfileDetail/DetailedInfo/ReadMore.module.css @@ -10,7 +10,6 @@ cursor: pointer; } -.read-more__text, .read-more { font-family: var(--font-main); color: var(--main-grey-90, #25292C); @@ -21,4 +20,4 @@ font-weight: 400; line-height: 22px; letter-spacing: -0.14px; -} \ No newline at end of file +} diff --git a/FrontEnd/src/components/ProfileDetail/DetailedInfo/Startup.module.css b/FrontEnd/src/components/ProfileDetail/DetailedInfo/Startup.module.css index 13d783e98..cbd4bac14 100644 --- a/FrontEnd/src/components/ProfileDetail/DetailedInfo/Startup.module.css +++ b/FrontEnd/src/components/ProfileDetail/DetailedInfo/Startup.module.css @@ -76,4 +76,4 @@ font-weight: 400; line-height: 22px; letter-spacing: -0.14px; -} \ No newline at end of file +} diff --git a/FrontEnd/src/components/ProfileDetail/EmptyData.module.css b/FrontEnd/src/components/ProfileDetail/EmptyData.module.css index 9611f3b4c..5803123a1 100644 --- a/FrontEnd/src/components/ProfileDetail/EmptyData.module.css +++ b/FrontEnd/src/components/ProfileDetail/EmptyData.module.css @@ -17,4 +17,4 @@ font-weight: 400; line-height: 22px; letter-spacing: -0.14px; -} \ No newline at end of file +} diff --git a/FrontEnd/src/components/ProfileDetail/MainInfo/DefaultLogo.module.css b/FrontEnd/src/components/ProfileDetail/MainInfo/DefaultLogo.module.css index d01b9b9df..ae44225c9 100644 --- a/FrontEnd/src/components/ProfileDetail/MainInfo/DefaultLogo.module.css +++ b/FrontEnd/src/components/ProfileDetail/MainInfo/DefaultLogo.module.css @@ -12,4 +12,4 @@ position: absolute; top: 3px; left: 3px; -} \ No newline at end of file +} diff --git a/FrontEnd/src/components/ProfileDetail/MainInfo/MainInfoSection.module.css b/FrontEnd/src/components/ProfileDetail/MainInfo/MainInfoSection.module.css index 6416e59c4..2e4524823 100644 --- a/FrontEnd/src/components/ProfileDetail/MainInfo/MainInfoSection.module.css +++ b/FrontEnd/src/components/ProfileDetail/MainInfo/MainInfoSection.module.css @@ -2,4 +2,4 @@ display: flex; flex-direction: column; align-items: flex-start; -} \ No newline at end of file +} diff --git a/FrontEnd/src/components/ProfileDetail/MainInfo/ProfileDetailNavBar.module.css b/FrontEnd/src/components/ProfileDetail/MainInfo/ProfileDetailNavBar.module.css index bebc80864..e568f729b 100644 --- a/FrontEnd/src/components/ProfileDetail/MainInfo/ProfileDetailNavBar.module.css +++ b/FrontEnd/src/components/ProfileDetail/MainInfo/ProfileDetailNavBar.module.css @@ -60,4 +60,4 @@ height: 1px; align-self: stretch; background: var(--primary-green-80, #1F9A7C); -} \ No newline at end of file +} diff --git a/FrontEnd/src/components/ProfileDetail/ProfileDetailPage.module.css b/FrontEnd/src/components/ProfileDetail/ProfileDetailPage.module.css index 36503f700..18141f1d7 100644 --- a/FrontEnd/src/components/ProfileDetail/ProfileDetailPage.module.css +++ b/FrontEnd/src/components/ProfileDetail/ProfileDetailPage.module.css @@ -11,4 +11,4 @@ gap: 16px; margin-left: 104px; margin-right: 104px; -} \ No newline at end of file +} diff --git a/README.md b/README.md index 054885e1d..86587d6fc 100644 --- a/README.md +++ b/README.md @@ -174,6 +174,7 @@ DEBUG=True or False ENGINE= # docker-compose.dev.yml POSTGRES_DB= sample filling => forum # docker-compose ALLOWED_ENV_HOST=sample filling => "http://localhost:8080" # docker-compose and settings.py +REDIS_URL= sample filling => redis://localhost:6379/0 #local ``` - User, run the local server on port localhost:8000 ``` shell @@ -181,6 +182,31 @@ $ python manage.py makemigrations $ python manage.py migrate $ python manage.py runserver ``` +### Celery and Redis +Correct application operation (in terms of moderation autoapprove functionality, to be precise) requires a running Celery worker and a Redis server. The simplest way to start Redis is: + +`docker run --rm -p 6379:6379 redis:7` + +Docker will automatically download the image and run the Redis server with the ports exposed. Redis will be available at 127.0.0.1:6379. You should place this host and port in the environment variable REDIS_URL, which Celery uses through Django's settings.py. + +Don't forget to install Celery via pip. +```instal +pip install -r requirements.txt +``` +Add in BackEnd .env +```.env +REDIS_URL= redis://localhost:6379/0 +``` + +The Celery worker itself needs to be started in a separate terminal (in the directory where manage.py is located) with the command: + +`celery -A forum worker --loglevel=info` + +On some Windows machines, there might be issues, in that case try: + +`celery -A forum worker --loglevel=info -P eventlet` + + ### Node JS frontend server - Setup frontend .env > Setup frontend .env diff --git a/sample.env b/sample.env index af49faa91..386cec112 100644 --- a/sample.env +++ b/sample.env @@ -26,3 +26,5 @@ ENGINE= POSTGRES_DB= EMAIL_USE_TLS= + +REDIS_URL= redis://localhost:6379/0