Giter VIP home page Giter VIP logo

django-sozluk's People

Contributors

dependabot[bot] avatar realsuayip avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-sozluk's Issues

django.db.migrations.exceptions.InvalidBasesError in production deployment

I can run the script in my localhost with Docker and there is no problem at all but when try to run it in a server, I get this error:

django.db.migrations.exceptions.InvalidBasesError: Cannot resolve bases for [<ModelState: 'dictionary.MetaFlatPage'>]
This can happen if you are inheriting models from an app with migrations (e.g. contrib.auth)
 in an app with no migrations; see https://docs.djangoproject.com/en/3.2/topics/migrations/#dependencies for more

then a couple of:

django.db.utils.ProgrammingError: relation "dictionary_author" does not exist
LINE 1: SELECT (1) AS "a" FROM "dictionary_author" WHERE "dictionary...
                               ^

This seems the second command in "scripts/setup.sh": python mange.py migrate. I also run makemigrations and migrate in web container, same error. Also, makemigrations returns: "PostgresSQL is up. No changes detected".

Long error message:

Starting initial setup...
No changes detected
Operations to perform:
  Apply all migrations: admin, auth, contenttypes, flatpages, sessions, sites
Traceback (most recent call last):
  File "manage.py", line 15, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 89, in wrapped
    res = handle_func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 202, in handle
    pre_migrate_apps = pre_migrate_state.apps
  File "/usr/local/lib/python3.8/site-packages/django/utils/functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/usr/local/lib/python3.8/site-packages/django/db/migrations/state.py", line 208, in apps
    return StateApps(self.real_apps, self.models)
  File "/usr/local/lib/python3.8/site-packages/django/db/migrations/state.py", line 270, in __init__
    self.render_multiple([*models.values(), *self.real_models])
  File "/usr/local/lib/python3.8/site-packages/django/db/migrations/state.py", line 309, in render_multiple
    raise InvalidBasesError(
django.db.migrations.exceptions.InvalidBasesError: Cannot resolve bases for [<ModelState: 'dictionary.MetaFlatPage'>]
This can happen if you are inheriting models from an app with migrations (e.g. contrib.auth)
 in an app with no migrations; see https://docs.djangoproject.com/en/3.2/topics/migrations/#dependencies for more
...
...
...
django.db.utils.ProgrammingError: relation "dictionary_author" does not exist
LINE 1: SELECT (1) AS "a" FROM "dictionary_author" WHERE "dictionary...

Please note that I did make several small changes to script and I am pretty sure some of those changes (maybe model files) caused this issue but I still don't understand why everything works perfectly in localhost.

Show & Update Entry Votes Dynamically

I have two questions.

  1. Is it possible to show total entry votes value? Is there something like {{entry.total_vote}}? For now, I use entry.vote_rate but I don't think this is the correct way to show the total votes for an entry. Let's say upvote and downvote rates are 1 and if there is 5 upvotes and 2 downvotes for an entry, I would like to show 3 for the entry.

  2. If the answer is yes for the first question, then how can I update this value dynamically without browser refreshing. e.g. when user clicks the upvote or downvote, the entry's total vote value will be updated in the html without any browser refresh.

Mobil uygulama için api

Api desteği şu an kısıtlı görünüyor bunu nasıl daha geliştirebiliriz. Siz yapmak istemezseniz yol haritası çizin isterseniz biz halledelim. Elinize emeğinize sağlık proje için

":=" Hatası ve Bunun Doğurduğu Entry List Hatası

Merhabalar,

Kodu deployladığımda aşağıdaki hatayı alıyordum.
image

Bu hatayı düzeltmek için de, ":=" kullanılan yerlerde örneğin bu görselde de gözüken theme =:request.COOKIES.get("theme","light")) in themes : kısmı hatalı gözüktüğü için bunun yerine ;

theme = = request.COOKIES.get("theme","light") theme in themes: olarak değiştirdim.

Fakat aşağıdaki ekran görüntüsünde görebileceğiniz gibi, aynı başlık içerisine farklı entry girmeye çalıştığımda başka bir url oluşturuluyor. Başlık altında asla yazılar toplanmıyor.

image

Yardımcı olursanız sevinirim 🙏

no configuration file provided: not found sorunu

Merhaba, standart docker metodu ile yükleme yapmaya çalışıyorum. docker-compose exec web sh docker/scripts/setup.sh kodunu girdikten sonra no configuration file provided: not found hatası alıyorum. Nerede yanlış yapıyorum acaba?

sunucu hatası

Merhabalar, projenizi çok beğendik. Elinize sağlık hocam. Ben django.env dosyasında mail ayarı yaptıktan sonra sunucu hatası almaya başladım. Default olanı koyuyorum yine aynı devam ediyor. restart yapıyorum fayda etmiyor. Yardımlarınızı bekliyorum.

sunucu hatası

üzgünüz, talebinizi işlerken beklenmedik bir hata oluştu. bu hata sistem yöneticileri tarafından revize edilmek üzere kenara köşeye kaydedildi. bu arada hiç bir şey olmamış gibi ana sayfaya dönebilirsiniz. eğer bu hatayı sürekli olarak alıyorsanız, lütfen birkaç dakika içinde tekrar deneyin.

Refactor views.json.Vote

views.json.Vote needs to be refactored: it is too complex. To do:

a) Implement m2m_changed signal for EntryFavorites and Author vote m2m's for auto incrementing of vote_rate.
b) Add a setting that will disable/enable anonymous voting.
c) Add different vote multiplier for novice users

Entry & Baslik Gosterimi

Bir suru entry girdim bazilarini admin panelinden olusturdugum channellar'a tasidim ama bir cogunu uncategorized olarak biraktim. Dun uncategorized ve diger chanllera tiklayinca entryleri basliklari gorebiliyordum, bugun baktigimda entryler basliklar uncategorized veya diger kategoriler altinda gosterilmiyor.

Not: Ana sayfada random olarak entryleri gorebiliyorum ve arama yapinca da yine entryler gozukuyor.

Implement category suggestion feature

Allow users with entries > 500 to add categories to topics. To do:

Create a suggestion model to track who suggested what.
Create a JSONView that creates the relation. -> Create a mutation
Add flair 'tasnifçi' in profile for authors with suggestions > 1000.

Contact

Uye giris yapip Contact sayfasindan iletisime gecince bu admin panelinde Reports bolumunde gozukuyor ama uye olmayan birisi Contact sayfasindan iletisime gecerse bu mesaj Reports bolumunde gosterilmiyor.

İstitastik özelliği

Merhaba yazılım çok güzel ve stabil olarak çalışıyor bir kaç sorum olacak

  1. mail ayarı nerden yapılıyor smtp ayarlarının yapılması için nerelere müdahale edebilirim bu konuda bilgilendirirseniz çok sevinirim.
    Bu sitenin belli başlı ayarlarını panelden yapılsa güzel olurdu logo ekleme smtp ayarların yapılması için ayar kısmı olursa güzel olurdu bence.
    Smtp ayarlarını yaptım ancak mail filan gitmiyor.

  2. Yönetim panelinde İstitastik seçeneği olursa güzel olur panelden kaç üye kaç başlık kaç entry var gibi bir seçenek olsa çok güzel olur diye düşünüyorum.
    Şimdiden teşekkür ederim.

  3. Site bazen konu eklerken veya başka bir işlem yaparken sunucu hatası diye bir hata veriyor bunu neden yapar acaba

docker compose has an error

Backend installation have some problems like:
sozluk_dev_celery_worker | [2021-12-28 21:21:24,153: INFO/MainProcess] Connected to redis://redis:6379/1 sozluk_dev_celery_worker | [2021-12-28 21:21:24,169: INFO/MainProcess] mingle: searching for neighbors sozluk_dev_celery_beat | generic_private has been created with the username anonymous and email [email protected]. You can edit the details of this user via admin page if you wish. sozluk_dev_celery_worker | [2021-12-28 21:21:25,205: INFO/MainProcess] mingle: all alone sozluk_dev_celery_worker | [2021-12-28 21:21:25,239: INFO/MainProcess] celery@d656610deeb1 ready. sozluk_dev_celery_beat | CommandError: Error: That e-mail is already taken. sozluk_dev_celery_beat | celery beat v4.4.7 (cliffs) is starting. sozluk_dev_celery_beat | __ - ... __ - _ sozluk_dev_celery_beat | LocalTime -> 2021-12-28 21:21:26 sozluk_dev_celery_beat | Configuration -> sozluk_dev_celery_beat | . broker -> redis://redis:6379/1 sozluk_dev_celery_beat | . loader -> celery.loaders.app.AppLoader sozluk_dev_celery_beat | . scheduler -> celery.beat.PersistentScheduler sozluk_dev_celery_beat | . db -> celerybeat-schedule sozluk_dev_celery_beat | . logfile -> [stderr]@%INFO sozluk_dev_celery_beat | . maxinterval -> 5.00 minutes (300s) sozluk_dev_celery_beat | [2021-12-28 21:21:26,559: INFO/MainProcess] beat: Starting... sozluk_dev_db | 2021-12-28 18:21:27.092 UTC [74] ERROR: duplicate key value violates unique constraint "dictionary_author_username_key" sozluk_dev_db | 2021-12-28 18:21:27.092 UTC [74] DETAIL: Key (username)=(djangosozluk) already exists. sozluk_dev_db | 2021-12-28 18:21:27.092 UTC [74] STATEMENT: INSERT INTO "dictionary_author" ("password", "last_login", "is_superuser", "first_name", "last_name", "is_staff", "date_joined", "username", "slug", "email", "is_active", "is_novice", "application_status", "application_date", "last_activity", "queue_priority", "suspended_until", "is_frozen", "is_private", "allow_uncategorized", "birth_date", "gender", "entries_per_page", "topics_per_page", "message_preference", "pinned_entry_id", "allow_receipts", "allow_site_announcements", "theme", "karma", "announcement_read") VALUES ('pbkdf2_sha256$260000$KBgNo9tjf0HKGSrNsq7TnA$ExW5T4Xhf8+BNdcUesUlt/C+Pz8KaRT+x7NZUUMKC2U=', NULL, false, '', '', false, '2021-12-28T18:21:26.998966+00:00'::timestamptz, 'djangosozluk', 'djangosozluk-1', '[email protected]', true, false, 'AP', NULL, NULL, 0, NULL, false, false, true, NULL, 'NO', 10, 50, 'DS', NULL, true, true, 'light', 0, '2021-12-28T18:21:27.091468+00:00'::timestamptz) RETURNING "dictionary_author"."id" sozluk_dev_backend | Hata: Bu isimle bir kullanıcı zaten oluşturulmuş veya e-posta adresi kullanımda. sozluk_dev_db | 2021-12-28 18:21:29.224 UTC [75] ERROR: duplicate key value violates unique constraint "dictionary_author_username_key" sozluk_dev_db | 2021-12-28 18:21:29.224 UTC [75] DETAIL: Key (username)=(anonymous) already exists. sozluk_dev_db | 2021-12-28 18:21:29.224 UTC [75] STATEMENT: INSERT INTO "dictionary_author" ("password", "last_login", "is_superuser", "first_name", "last_name", "is_staff", "date_joined", "username", "slug", "email", "is_active", "is_novice", "application_status", "application_date", "last_activity", "queue_priority", "suspended_until", "is_frozen", "is_private", "allow_uncategorized", "birth_date", "gender", "entries_per_page", "topics_per_page", "message_preference", "pinned_entry_id", "allow_receipts", "allow_site_announcements", "theme", "karma", "announcement_read") VALUES ('pbkdf2_sha256$260000$GKgMQfqwCgEElegEhAcFRu$SvcXT5zHQVjCsgYKqYhfstVy93vVAJkTV9sNXUIhP5Y=', NULL, false, '', '', false, '2021-12-28T18:21:29.130384+00:00'::timestamptz, 'anonymous', 'anonymous-1', '[email protected]', true, false, 'AP', NULL, NULL, 0, NULL, false, true, true, NULL, 'NO', 10, 50, 'DS', NULL, true, true, 'light', 0, '2021-12-28T18:21:29.224311+00:00'::timestamptz) RETURNING "dictionary_author"."id" sozluk_dev_backend | Hata: Bu isimle bir kullanıcı zaten oluşturulmuş veya e-posta adresi kullanımda.

More comprehensive tests required

I included the first tests of this repository in 2e4151b which are related to Author model (this was actually the first time I wrote tests).

Of course this project needs tons of more tests, so If you have some ideas or in experienced in testing, your help would be appreciated.

Admin paneline girilemiyor

1.1 sürümünde /admin e gidildiğinde log in ekranına yönlendiriyor. Admin hesabıyla giriş yaptıktan sonra da ana ekrana yönlendiriyor. Tekrar admin paneline giriş yapmak istenirse aynı adımlar tekrar ediyor hiçbir şekilde admin paneline erişim sağlanamıyor.

python manage.py migrate betiğinde hata alıyorum

python manage.py migrate komutunu çalıştırdığımda
django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.
hatasını alıyorum. settings.py'den database türünü değiştirdim denedim yine aynı hatayı veriyor. Sebebi nedir?

403 forbidden sorunu

Domainim cloudflare'da barınıyor. Sunucu üzerinde sorunsuz kurulum yaptım. django.env dosyasında CSRF_TRUSTED_ORIGINS satırını da CSRF_TRUSTED_ORIGINS = ['https://*.siteadi.com'] olarak değiştirdim fakat siteye domainden bağlandığımda herhangi bir post işleminde 403 forbidden hatası veriyor, http ile dolaşırken bir sıkıntı yok. Düzeltmek için atladığım bir nokta mı var acaba?

SSL olarak cloudflare'ın ücretsiz olarak sağladığı ssl sertifikasını kullanıyorum.

Implement 'ukte' feature

Implement 'ukte' feature where users can mark topics that they want other users to post entries. To do:

Create a model for uktes (probably m2m through model via Topic).
Create logic in TopicEntryList
Create a new non-db category to list uktes.

Logo değişikliği

Merhaba ustat logoları (dictionary\static\dictionary\img) klasürden bulup değiştirdim ondan sonra

cd /opt/django-sozluk
docker-compose build --no-cache
docker-compose restart

komutları kullanıyorum ancak eski logo duruyor nerde yanlış yapıyorum?

docker-compose build --no-cache şu komutu kullanırken işlem baya uzun sürüyor ve bazen kırmızı yazılarla uyarı veriyor ondan dolayımı işlemi yapmıyor acaba?

güncelleme ile logo ayarı mail ayarı gibi seçenekleri yönetim panelinden yaparsanız güzel olur diye düşünüyorum öyle bir seçenek mümkünse tabi.

Dockerfile/docker-compose needed

A docker setup is needed for easy installation (especially for production, setting up a dev environment is not that hard), it should at least cover these:

  • Nginx with Gunicorn to serve Django. Nginx will also serve media/static files.
  • PostgreSQL setup
  • Memcached setup
  • Celery daemonization with RabbitMQ as broker
  • ...

Pagination is not showing

I've installed the script to play around a little and realized that no matter how many entries I posted, "Show more" and/or pagination did not show up on left sidebar.

I posted 60 + entries and didn't see any pagination or show more, just scrollbar was showing. graphql request always returns:

hasNext: false
hasOtherPages: false
number: 1
objectList: [60+ objects]
paginator: {pageRange: [1], numPages: 1}
numPages: 1
pageRange: [1]

Is this a bug?

400 bad request

Merhaba,
docker-compose up -d yapıp çalıştırdıktan sonra kurulum + user açmayı yaptım fakat 8000 portunda çıkış alamıyorum dışarıdan
400 hatası veriyor. Contaner içinden curl atınca yanıt veriyor.
.env içinde şöyle bir şey var DJANGO_ALLOWED_HOSTS buraya 0.0.0.0 veya ip adresleri yazdım ama sonuç değişmedi nerede yanlış yapıyoruz acaba yardımcı olur musunuz? ellerinize sağlık proje için çok güzel görünüyor

<!doctype html>

<title>Bad Request (400)</title>

Bad Request (400)

Feed veya rss

Merhaba bunda feed veya rss özellikleri nerde linklerinden baktım bulamadım rss ve feed seçeneği varmı?
Varsa linkleri nedir

kurulumdan sonra linkler 404 hatası veriyor.

cloudlinux kernel ile cpanel üzerine kurulum yaptım ve gereklilikleri yükledim anasayfa çalışıyor sadece ancak linklerin tamamında 404 hatası alıyorum yardımcı olur musunuz

operationalerror hatasını alıyorum

Request Method: GET
http://127.0.0.1:8000/
2.2.13
OperationalError
no such table: django_site
C:\Users\Halit\Desktop\dj\venv\lib\site-packages\django\db\backends\sqlite3\base.py in execute, line 383
C:\Users\Halit\Desktop\dj\venv\Scripts\python.exe
3.8.3
['C:\Users\Halit\Desktop\dj', 'C:\Users\Halit\Desktop\dj\venv\Scripts\python38.zip', 'c:\users\halit\appdata\local\programs\python\python38-32\DLLs', 'c:\users\halit\appdata\local\programs\python\python38-32\lib', 'c:\users\halit\appdata\local\programs\python\python38-32', 'C:\Users\Halit\Desktop\dj\venv', 'C:\Users\Halit\Desktop\dj\venv\lib\site-packages']
Paz, 28 Haz 2020 14:35:56 +0300

bu hatayı alıyorum nasıl çözüceğimi bilmiyorum yardımcı olur musun?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.