diff --git a/vrobbler/apps/moods/admin.py b/vrobbler/apps/moods/admin.py index 42fca46..5262e8e 100644 --- a/vrobbler/apps/moods/admin.py +++ b/vrobbler/apps/moods/admin.py @@ -1,6 +1,6 @@ from django.contrib import admin -from moods.models import Mood +from moods.models import Mood, MoodReason from scrobbles.admin import ScrobbleInline @@ -15,9 +15,16 @@ class MoodAdmin(admin.ModelAdmin): list_display = ( "uuid", "title", + "mood_type", ) ordering = ("-created",) search_fields = ("title",) inlines = [ ScrobbleInline, ] + + +@admin.register(MoodReason) +class MoodReasonAdmin(admin.ModelAdmin): + list_display = ("title", "uuid") + search_fields = ("title",) diff --git a/vrobbler/apps/moods/fixtures/mood_reasons.json b/vrobbler/apps/moods/fixtures/mood_reasons.json new file mode 100644 index 0000000..20d7b3d --- /dev/null +++ b/vrobbler/apps/moods/fixtures/mood_reasons.json @@ -0,0 +1,164 @@ +[ + { + "model": "moods.moodreason", + "pk": 1, + "fields": { + "uuid": "efdfc694-1b1b-4623-b645-6c0749eb6acd", + "title": "Community", + "description": "Feelings related to community interactions and sense of belonging" + } + }, + { + "model": "moods.moodreason", + "pk": 2, + "fields": { + "uuid": "1f5f347f-d73e-4853-b4cd-6c346d3a9c98", + "title": "Current Events", + "description": "Feelings influenced by news, politics, or current world events" + } + }, + { + "model": "moods.moodreason", + "pk": 3, + "fields": { + "uuid": "8765cc40-8ce6-4d08-b4ee-4c50f27201b8", + "title": "Dating", + "description": "Feelings related to romantic dating experiences" + } + }, + { + "model": "moods.moodreason", + "pk": 4, + "fields": { + "uuid": "5844f70f-a971-469c-b886-4949da4dd581", + "title": "Education", + "description": "Feelings related to learning, school, or educational pursuits" + } + }, + { + "model": "moods.moodreason", + "pk": 5, + "fields": { + "uuid": "ead56adf-671f-44cd-a61f-98a7e553a57a", + "title": "Family", + "description": "Feelings related to family interactions and relationships" + } + }, + { + "model": "moods.moodreason", + "pk": 6, + "fields": { + "uuid": "2ca7a801-0933-43e3-967b-c1ee973ccf8d", + "title": "Fitness", + "description": "Feelings related to physical fitness, exercise, or workout experiences" + } + }, + { + "model": "moods.moodreason", + "pk": 7, + "fields": { + "uuid": "1d0fb8bf-dc1d-4fd0-b158-69a2b8683524", + "title": "Friends", + "description": "Feelings related to friendships and social interactions" + } + }, + { + "model": "moods.moodreason", + "pk": 8, + "fields": { + "uuid": "6c6b50b5-b737-4cdb-b163-96c4ec8d674f", + "title": "Health", + "description": "Feelings related to physical or mental health" + } + }, + { + "model": "moods.moodreason", + "pk": 9, + "fields": { + "uuid": "2568d6db-80fc-4b5b-b4e2-8a7cd28b0a01", + "title": "Hobbies", + "description": "Feelings related to personal hobbies and leisure activities" + } + }, + { + "model": "moods.moodreason", + "pk": 10, + "fields": { + "uuid": "c1363eb0-16c6-4c98-8237-323f43b508b0", + "title": "Identity", + "description": "Feelings related to self-identity, gender, or personal identity exploration" + } + }, + { + "model": "moods.moodreason", + "pk": 11, + "fields": { + "uuid": "97f28eec-0354-46b7-9d8c-b45c3d12f83e", + "title": "Money", + "description": "Feelings related to financial situations, spending, or money matters" + } + }, + { + "model": "moods.moodreason", + "pk": 12, + "fields": { + "uuid": "653eb557-443f-4ab0-ae93-06007b12e747", + "title": "Partner", + "description": "Feelings related to romantic partner or significant other" + } + }, + { + "model": "moods.moodreason", + "pk": 13, + "fields": { + "uuid": "4a1cf35d-3b3e-4042-a2cf-8c0fa6160113", + "title": "Self-Care", + "description": "Feelings related to self-care practices and mental health maintenance" + } + }, + { + "model": "moods.moodreason", + "pk": 14, + "fields": { + "uuid": "fffcd937-187e-476a-99e3-8f13eef6abc9", + "title": "Spirituality", + "description": "Feelings related to spiritual beliefs, practices, or experiences" + } + }, + { + "model": "moods.moodreason", + "pk": 15, + "fields": { + "uuid": "29af8f56-bc32-43a0-8b37-c1878d453bff", + "title": "Tasks", + "description": "Feelings related to work tasks, chores, or to-do items" + } + }, + { + "model": "moods.moodreason", + "pk": 16, + "fields": { + "uuid": "3dafed9b-941b-4907-8dc2-5d8f16dd7ed1", + "title": "Travel", + "description": "Feelings related to travel experiences, trips, or vacations" + } + }, + { + "model": "moods.moodreason", + "pk": 17, + "fields": { + "uuid": "2e4a9da6-bef4-4a74-87eb-3d9a32bfadc1", + "title": "Weather", + "description": "Feelings influenced by weather conditions or climate" + } + }, + { + "model": "moods.moodreason", + "pk": 18, + "fields": { + "uuid": "78858fcb-0850-4973-9ead-df66818e2a76", + "title": "Work", + "description": "Feelings related to work, career, or professional life" + } + } +] \ No newline at end of file diff --git a/vrobbler/apps/moods/fixtures/moods.json b/vrobbler/apps/moods/fixtures/moods.json index e5a9611..27a2a2c 100644 --- a/vrobbler/apps/moods/fixtures/moods.json +++ b/vrobbler/apps/moods/fixtures/moods.json @@ -1 +1,458 @@ -[{"model": "moods.mood", "pk": 1, "fields": {"created": "2024-08-10T20:06:25.694Z", "modified": "2024-08-10T20:06:25.694Z", "uuid": "5191fa4b-67a3-4b94-b8a5-de3e6863914d", "title": "Anxious", "run_time_seconds": null, "description": "Anxiety is an emotion which is characterized by an unpleasant state of inner turmoil and includes feelings of dread over anticipated events. Anxiety is different from fear in that fear is defined as the emotional response to a present threat, whereas anxiety is the anticipation of a future one. (Wikipedia)"}}, {"model": "moods.mood", "pk": 2, "fields": {"created": "2024-08-10T20:06:55.418Z", "modified": "2024-08-10T20:06:55.418Z", "uuid": "2c431aba-5103-444c-ad91-4fec2405a363", "title": "Fear", "run_time_seconds": null, "description": "Fear is an intensely unpleasant primal emotion in response to perceiving or recognizing a danger or threat. Fear causes psychological changes that may produce behavioral reactions such as mounting an aggressive response or fleeing the threat. (Wikipedia)"}}, {"model": "moods.mood", "pk": 3, "fields": {"created": "2024-08-10T20:07:14.035Z", "modified": "2024-08-10T20:07:14.035Z", "uuid": "696b2bf2-9ae6-43b4-8b3d-67f03c9dc48b", "title": "Sadness", "run_time_seconds": null, "description": "Sadness is an emotional pain associated with, or characterized by, feelings of disadvantage, loss, despair, grief, helplessness, disappointment and sorrow. An individual experiencing sadness may become quiet or lethargic, and withdraw themselves from others. (Wikipedia)"}}, {"model": "moods.mood", "pk": 4, "fields": {"created": "2024-08-10T20:07:38.437Z", "modified": "2024-08-10T20:07:38.437Z", "uuid": "550beff0-d673-4bb5-a87b-80c6f4a9a62a", "title": "Anger", "run_time_seconds": null, "description": "Anger, also known as wrath or rage, is an intense emotional state involving a strong uncomfortable and non-cooperative response to a perceived provocation, hurt, or threat. (Wikipedia)"}}, {"model": "moods.mood", "pk": 5, "fields": {"created": "2024-08-10T20:08:09.423Z", "modified": "2024-08-10T20:08:09.423Z", "uuid": "3b210bc1-7981-4d55-8cf3-e07b46cb15ea", "title": "Surprise", "run_time_seconds": null, "description": "Surprise is an instantaneous, instinctual reaction to something you didn't expect. (Wikipedia)"}}, {"model": "moods.mood", "pk": 6, "fields": {"created": "2024-08-10T20:09:01.056Z", "modified": "2024-08-10T20:09:01.056Z", "uuid": "865dd78e-66e6-44bb-8257-d8dc1fe5c19c", "title": "Disgust", "run_time_seconds": null, "description": "Disgust is an emotional response of rejection or revulsion to something potentially contagious or something considered offensive, distasteful or unpleasant. (Wikipedia)"}}, {"model": "moods.mood", "pk": 8, "fields": {"created": "2024-08-10T20:11:02.145Z", "modified": "2024-08-10T20:11:02.145Z", "uuid": "89e82483-c52f-4855-9bb0-cb246a0b684b", "title": "Joy", "run_time_seconds": null, "description": "Joy is the state of being that allows one to experience feelings of intense, long-lasting happiness and satisfaction of life. It is closely related to, and often evoked by, well-being, success, or good fortune. Happiness, pleasure, and gratitude are closely related to joy but are not identical to it. (Wikipedia)"}}, {"model": "moods.mood", "pk": 9, "fields": {"created": "2024-08-10T20:13:38.852Z", "modified": "2024-08-10T20:13:38.852Z", "uuid": "a0d80c03-969a-4b80-a4b6-2beb9d91687d", "title": "Admiration", "run_time_seconds": null, "description": "Admiration is a social emotion felt by observing people of competence, talent, or skill exceeding standards. Admiration facilitates social learning in groups. Admiration motivates self-improvement through learning from role-models."}}, {"model": "moods.mood", "pk": 10, "fields": {"created": "2024-08-10T20:14:06.617Z", "modified": "2024-08-10T20:14:06.617Z", "uuid": "5382f548-2a5a-4a08-b447-6470d41c1729", "title": "Adoration", "run_time_seconds": null, "description": "Adoration is a feeling of great admiration and love for someone or something. She needs and wants to be loved with overwhelming passion and adoration. Synonyms: love, honour, worship, worshipping More Synonyms of adoration."}}, {"model": "moods.mood", "pk": 11, "fields": {"created": "2024-08-10T20:14:25.964Z", "modified": "2024-08-10T20:14:25.964Z", "uuid": "e36ed925-37d8-4856-ba7c-bfce617ecab2", "title": "Aesthetic Appreciation", "run_time_seconds": null, "description": "Aesthetic appreciation or good taste is the ability to appreciate objective beauty. Aesthetic taste is influenced by many factors, such as personal or cultural background, familiarity, context, and expertise. Access to aesthetically interesting and valuable objects and environments can improve our well-being."}}, {"model": "moods.mood", "pk": 12, "fields": {"created": "2024-08-10T20:14:58.926Z", "modified": "2024-08-10T20:14:58.926Z", "uuid": "4d8c6a20-0041-4793-94ae-1d3dc12c2e95", "title": "Amusement", "run_time_seconds": null, "description": "Amusement is the state of experiencing humorous and entertaining events or situations while the person or animal actively maintains the experience, and is associated with enjoyment, happiness, laughter and pleasure. It is an emotion with positive valence and high physiological arousal."}}, {"model": "moods.mood", "pk": 13, "fields": {"created": "2024-08-10T20:17:32.001Z", "modified": "2024-08-10T20:17:32.001Z", "uuid": "460e072a-6d5b-481a-8343-cec66b9f4baa", "title": "Awe", "run_time_seconds": null, "description": "Awe is a complex emotion that occurs when we experience or witness something wonderous, vast, terrifying, inspiring, amazing or mind-blowing. Awe can be triggered by experiences as diverse as walking through an untamed natural landscape, viewing a highly complex piece of art or architecture, having a spiritual or religious experience, or witnessing a seemingly impossible athletic feat."}}, {"model": "moods.mood", "pk": 14, "fields": {"created": "2024-08-10T20:17:52.494Z", "modified": "2024-08-10T20:17:52.494Z", "uuid": "cbeefe6b-0a6e-4f91-8b1f-a272901265ff", "title": "Awkwardness", "run_time_seconds": null, "description": "Embarrassment or awkwardness is an emotional state that is associated with mild to severe levels of discomfort, and which is usually experienced when someone commits (or thinks of) a socially unacceptable or frowned-upon act that is witnessed by or revealed to others."}}, {"model": "moods.mood", "pk": 15, "fields": {"created": "2024-08-10T20:18:40.932Z", "modified": "2024-08-10T20:18:40.933Z", "uuid": "1c27b52e-aae4-4631-9bf4-21953776ef8b", "title": "Boredom", "run_time_seconds": null, "description": "In conventional usage, boredom, ennui, or tedium is an emotion characterized by uninterest in one's surrounding, often caused by a lack of distractions or occupations. Although, \"There is no universally accepted definition of boredom. But whatever it is, researchers argue, it is not simply another name for depression or apathy. It seems to be a specific mental state that people find unpleasant—a lack of stimulation that leaves them craving relief, with a host of behavioral, medical and social consequences.\""}}, {"model": "moods.mood", "pk": 16, "fields": {"created": "2024-08-10T20:19:04.661Z", "modified": "2024-08-10T20:19:04.661Z", "uuid": "6a0ea707-05d6-41a5-9e2f-92b7a9c15cdc", "title": "Calmness", "run_time_seconds": null, "description": "Calmness is the mental state of peace of mind, being free from agitation, excitement, or disturbance. It also refers being in a state of serenity, tranquillity, or peace. Calmness can most easily occur for the average person during a state of relaxation, but it can also be found during much more alert and aware states."}}, {"model": "moods.mood", "pk": 17, "fields": {"created": "2024-08-10T20:19:26.216Z", "modified": "2024-08-10T20:19:26.216Z", "uuid": "c4e5e2b2-9070-4203-857e-18b82cd62b92", "title": "Confusion", "run_time_seconds": null, "description": "The feeling when you get information that does not make sense to you, leaving you uncertain what to do with it."}}, {"model": "moods.mood", "pk": 18, "fields": {"created": "2024-08-10T20:20:32.294Z", "modified": "2024-08-10T20:20:32.294Z", "uuid": "0bffe27f-6514-4478-b9b5-0b099ea39e28", "title": "Craving/Desire", "run_time_seconds": null, "description": "Desires are states of mind that are expressed by terms like \"wanting\", \"wishing\", \"longing\" or \"craving\". A great variety of features is commonly associated with desires. They are seen as propositional attitudes towards conceivable states of affairs. They aim to change the world by representing how the world should be, unlike beliefs, which aim to represent how the world actually is."}}, {"model": "moods.mood", "pk": 19, "fields": {"created": "2024-08-10T20:21:00.225Z", "modified": "2024-08-10T20:21:00.225Z", "uuid": "2f213c97-369e-4763-ac87-7d74dc6801ae", "title": "Empathetic pain", "run_time_seconds": null, "description": "Pain empathy is a specific variety of empathy that involves recognizing and understanding another person's pain. Empathy is the mental ability that allows one person to understand another person's mental and emotional state and how to effectively respond to that person."}}, {"model": "moods.mood", "pk": 20, "fields": {"created": "2024-08-10T20:21:37.372Z", "modified": "2024-08-10T20:21:37.372Z", "uuid": "4beb8a85-16e0-4df9-b569-d29205e0fb4f", "title": "Entrancement", "run_time_seconds": null, "description": "Definitions of entrancement. noun. a feeling of delight at being filled with wonder and enchantment."}}, {"model": "moods.mood", "pk": 21, "fields": {"created": "2024-08-10T20:22:24.010Z", "modified": "2024-08-10T20:22:24.010Z", "uuid": "8f8c26e2-86cd-4c69-89ed-4ce8a4ec5029", "title": "Excitement", "run_time_seconds": null, "description": "Excitement is a feeling or situation full of activity, joy, exhilaration, or upheaval. One thing about excitement — it sure isn't boring. There are a few types of excitement, but they're all exciting — they get your attention. If you can't wait for your birthday, you're feeling a happy kind of excitement."}}, {"model": "moods.mood", "pk": 22, "fields": {"created": "2024-08-10T20:22:41.137Z", "modified": "2024-08-10T20:22:41.137Z", "uuid": "1056d48e-8615-4caf-b876-97e6e7324086", "title": "Horror", "run_time_seconds": null, "description": "Horror is the feeling of dread and anticipation that usually occurs before something frightening is seen, heard, or otherwise experienced. It is also the feeling one gets after coming to an awful realization or experiencing a hideous revelation."}}, {"model": "moods.mood", "pk": 23, "fields": {"created": "2024-08-10T20:23:10.897Z", "modified": "2024-08-10T20:23:10.897Z", "uuid": "42c1f073-3292-4cfd-8a3e-39073f6a13c1", "title": "Interest", "run_time_seconds": null, "description": "Interest is a feeling or emotion that causes attention to focus on an object, event, or process. In contemporary psychology of interest,[1] the term is used as a general concept that may encompass other more specific psychological terms, such as curiosity and to a much lesser degree surprise."}}, {"model": "moods.mood", "pk": 24, "fields": {"created": "2024-08-10T20:23:38.584Z", "modified": "2024-08-10T20:23:38.584Z", "uuid": "8a4aa6df-db88-4a85-a6b8-975ca6c588ef", "title": "Nostalgia", "run_time_seconds": null, "description": "Nostalgia is triggered by something reminding an individual of an event or item from their past. The resulting emotion can vary from happiness to sorrow. The term \"feeling nostalgic\" is more commonly used to describe pleasurable emotions associated with, or a longing to return to, a particular period of time."}}, {"model": "moods.mood", "pk": 25, "fields": {"created": "2024-08-10T20:24:19.272Z", "modified": "2024-08-10T20:24:19.272Z", "uuid": "fbe92946-988e-4e33-8eaa-f060a5a89d7f", "title": "Relief", "run_time_seconds": null, "description": "Relief is a positive emotion experienced when something unpleasant, painful or distressing has not happened or has come to an end.\r\n\r\nOften accompanied with a sigh, which signals emotional transition, relief is universally recognized, and judged as a fundamental emotion."}}, {"model": "moods.mood", "pk": 26, "fields": {"created": "2024-08-10T20:24:52.182Z", "modified": "2024-08-10T20:24:52.182Z", "uuid": "0044a42d-b75d-497d-b887-43b014db9850", "title": "Romance", "run_time_seconds": null, "description": "Romance or romantic love is a feeling of love for, or a strong attraction towards another person,and the courtship behaviors undertaken by an individual to express those overall feelings and resultant emotions."}}, {"model": "moods.mood", "pk": 27, "fields": {"created": "2024-08-10T20:25:39.705Z", "modified": "2024-08-10T20:25:39.705Z", "uuid": "185e903f-f958-4230-9604-2ce74d9adf40", "title": "Satisfaction", "run_time_seconds": null, "description": "Satisfaction is the pleasure that you feel when you do something or get something that you wanted or needed to do or get."}}] +[ + { + "model": "moods.mood", + "pk": 1, + "fields": { + "created": "2024-08-10T20:06:25.694Z", + "modified": "2024-08-10T20:06:25.694Z", + "uuid": "5191fa4b-67a3-4b94-b8a5-de3e6863914d", + "title": "Anxious", + "description": "Anxiety is an emotion which is characterized by an unpleasant state of inner turmoil and includes feelings of dread over anticipated events. Anxiety is different from fear in that fear is defined as the emotional response to a present threat, whereas anxiety is the anticipation of a future one. (Wikipedia)", + "mood_type": "negative" + } + }, + { + "model": "moods.mood", + "pk": 2, + "fields": { + "created": "2024-08-10T20:06:55.418Z", + "modified": "2024-08-10T20:06:55.418Z", + "uuid": "2c431aba-5103-444c-ad91-4fec2405a363", + "title": "Angry", + "description": "Anger, also known as wrath or rage, is an intense emotional state involving a strong uncomfortable and non-cooperative response to a perceived provocation, hurt, or threat. (Wikipedia)", + "mood_type": "negative" + } + }, + { + "model": "moods.mood", + "pk": 3, + "fields": { + "created": "2024-08-10T20:07:14.035Z", + "modified": "2024-08-10T20:07:14.035Z", + "uuid": "696b2bf2-9ae6-43b4-8b3d-67f03c9dc48b", + "title": "Sad", + "description": "Sadness is an emotional pain associated with, or characterized by, feelings of disadvantage, loss, despair, grief, helplessness, disappointment and sorrow. An individual experiencing sadness may become quiet or lethargic, and withdraw themselves from others. (Wikipedia)", + "mood_type": "negative" + } + }, + { + "model": "moods.mood", + "pk": 4, + "fields": { + "created": "2024-08-10T20:08:09.423Z", + "modified": "2024-08-10T20:08:09.423Z", + "uuid": "3b210bc1-7981-4d55-8cf3-e07b46cb15ea", + "title": "Surprised", + "description": "Surprise is an instantaneous, instinctual reaction to something you didn't expect. (Wikipedia)", + "mood_type": "positive" + } + }, + { + "model": "moods.mood", + "pk": 5, + "fields": { + "created": "2024-08-10T20:09:01.056Z", + "modified": "2024-08-10T20:09:01.056Z", + "uuid": "865dd78e-66e6-44bb-8257-d8dc1fe5c19c", + "title": "Disgusted", + "description": "Disgust is an emotional response of rejection or revulsion to something potentially contagious or something considered offensive, distasteful or unpleasant. (Wikipedia)", + "mood_type": "negative" + } + }, + { + "model": "moods.mood", + "pk": 6, + "fields": { + "created": "2024-08-10T20:11:02.145Z", + "modified": "2024-08-10T20:11:02.145Z", + "uuid": "89e82483-c52f-4855-9bb0-cb246a0b684b", + "title": "Joyful", + "description": "Joy is the state of being that allows one to experience feelings of intense, long-lasting happiness and satisfaction of life. It is closely related to, and often evoked by, well-being, success, or good fortune. Happiness, pleasure, and gratitude are closely related to joy but are not identical to it. (Wikipedia)", + "mood_type": "positive" + } + }, + { + "model": "moods.mood", + "pk": 7, + "fields": { + "created": "2024-08-10T20:13:38.852Z", + "modified": "2024-08-10T20:13:38.852Z", + "uuid": "a0d80c03-969a-4b80-a4b6-2beb9d91687d", + "title": "Amused", + "description": "Amusement is a means by which people experience a mixture of happiness and fun. (Wikipedia)", + "mood_type": "positive" + } + }, + { + "model": "moods.mood", + "pk": 8, + "fields": { + "created": "2024-08-10T20:15:00.000Z", + "modified": "2024-08-10T20:15:00.000Z", + "uuid": "b1c92d14-070b-4961-b5c7-3cfc1fe6c20e", + "title": "Amazed", + "description": "Awe is a complex emotion that is experienced when someone encounters something so grand, either physically or conceptually, that it overwhelms their ability to mentally process it. (Wikipedia)", + "mood_type": "positive" + } + }, + { + "model": "moods.mood", + "pk": 9, + "fields": { + "created": "2024-08-10T20:15:30.000Z", + "modified": "2024-08-10T20:15:30.000Z", + "uuid": "c2da3e25-181c-4a72-c6d8-4d0d2ff7d31f", + "title": "Calm", + "description": "Calmness is the mental state of being free from agitation, excitement, or disturbance. (Wikipedia)", + "mood_type": "positive" + } + }, + { + "model": "moods.mood", + "pk": 10, + "fields": { + "created": "2024-08-10T20:16:00.000Z", + "modified": "2024-08-10T20:16:00.000Z", + "uuid": "51fc35ca-92c5-40f3-9b3a-6e1457d19838", + "title": "Excited", + "description": "Excitement is a feeling of great enthusiasm and eagerness. (Wikipedia)", + "mood_type": "positive" + } + }, + { + "model": "moods.mood", + "pk": 11, + "fields": { + "created": "2024-08-10T20:16:30.000Z", + "modified": "2024-08-10T20:16:30.000Z", + "uuid": "de166493-d222-4b3f-a50a-ca6dbccb6ede", + "title": "Relieved", + "description": "Relief is the feeling of reassurance and relaxation following release from anxiety or distress. (Wikipedia)", + "mood_type": "positive" + } + }, + { + "model": "moods.mood", + "pk": 12, + "fields": { + "created": "2024-08-10T20:17:00.000Z", + "modified": "2024-08-10T20:17:00.000Z", + "uuid": "51f806a4-21ce-4929-864f-99ea4376393f", + "title": "Satisfied", + "description": "Satisfaction is the fulfillment of one's wishes, expectations, or needs, or the pleasure derived from this. (Wikipedia)", + "mood_type": "positive" + } + }, + { + "model": "moods.mood", + "pk": 13, + "fields": { + "created": "2024-08-10T20:17:30.000Z", + "modified": "2024-08-10T20:17:30.000Z", + "uuid": "7fd97455-3aca-4786-af94-ffb2fc307025", + "title": "Brave", + "description": "Bravery is the quality of being brave; courage. (Wikipedia)", + "mood_type": "positive" + } + }, + { + "model": "moods.mood", + "pk": 14, + "fields": { + "created": "2024-08-10T20:18:00.000Z", + "modified": "2024-08-10T20:18:00.000Z", + "uuid": "afb7f987-10d4-4888-bd7d-0a81e77d7671", + "title": "Confident", + "description": "Confidence is the feeling or belief that one can have faith in or rely on someone or something. (Wikipedia)", + "mood_type": "positive" + } + }, + { + "model": "moods.mood", + "pk": 15, + "fields": { + "created": "2024-08-10T20:18:30.000Z", + "modified": "2024-08-10T20:18:30.000Z", + "uuid": "50fbc143-e97f-4026-bbee-e2f691d13b01", + "title": "Contented", + "description": "Contentment is a mental or emotional state of satisfaction. (Wikipedia)", + "mood_type": "positive" + } + }, + { + "model": "moods.mood", + "pk": 16, + "fields": { + "created": "2024-08-10T20:19:00.000Z", + "modified": "2024-08-10T20:19:00.000Z", + "uuid": "2f28eec6-d1e2-44fa-973b-824ff6a3e0a7", + "title": "Grateful", + "description": "Gratitude is a feeling of appreciation or thanks. (Wikipedia)", + "mood_type": "positive" + } + }, + { + "model": "moods.mood", + "pk": 17, + "fields": { + "created": "2024-08-10T20:19:30.000Z", + "modified": "2024-08-10T20:19:30.000Z", + "uuid": "7daf7bfc-03aa-471f-aec2-8e1f85ec7489", + "title": "Happy", + "description": "Happiness is a state of well-being characterized by emotions ranging from contentment to intense joy. (Wikipedia)", + "mood_type": "positive" + } + }, + { + "model": "moods.mood", + "pk": 18, + "fields": { + "created": "2024-08-10T20:20:00.000Z", + "modified": "2024-08-10T20:20:00.000Z", + "uuid": "a1bf1d22-97b0-4b23-9284-5f674ab45da0", + "title": "Hopeful", + "description": "Hope is the feeling that what is wanted can be had or that events will turn out for the best. (Wikipedia)", + "mood_type": "positive" + } + }, + { + "model": "moods.mood", + "pk": 19, + "fields": { + "created": "2024-08-10T20:20:30.000Z", + "modified": "2024-08-10T20:20:30.000Z", + "uuid": "91cb7082-5b37-4b55-b454-0c1e15aab9f8", + "title": "Passionate", + "description": "Passion is a strong feeling of enthusiasm or excitement for something or about doing something. (Wikipedia)", + "mood_type": "positive" + } + }, + { + "model": "moods.mood", + "pk": 20, + "fields": { + "created": "2024-08-10T20:21:00.000Z", + "modified": "2024-08-10T20:21:00.000Z", + "uuid": "75d6d4b0-1814-471f-82f3-d87c1ba279d1", + "title": "Peaceful", + "description": "Peace is a state of harmony and the absence of hostility. (Wikipedia)", + "mood_type": "positive" + } + }, + { + "model": "moods.mood", + "pk": 21, + "fields": { + "created": "2024-08-10T20:21:30.000Z", + "modified": "2024-08-10T20:21:30.000Z", + "uuid": "ebfcc374-9393-4b1c-8ac0-9c81f259b984", + "title": "Proud", + "description": "Pride is a feeling of pleasure or satisfaction from one's own achievements or the achievements of those with whom one closely associates. (Wikipedia)", + "mood_type": "positive" + } + }, + { + "model": "moods.mood", + "pk": 22, + "fields": { + "created": "2024-08-10T20:22:00.000Z", + "modified": "2024-08-10T20:22:00.000Z", + "uuid": "ea815e86-3298-45c8-9dc1-ab131bf285a9", + "title": "Annoyed", + "description": "Annoyance is the feeling that someone or something is unpleasant or offensive. (Wikipedia)", + "mood_type": "negative" + } + }, + { + "model": "moods.mood", + "pk": 23, + "fields": { + "created": "2024-08-10T20:22:30.000Z", + "modified": "2024-08-10T20:22:30.000Z", + "uuid": "7d9507a1-eab4-42a9-9efb-36c649638fcc", + "title": "Ashamed", + "description": "Shame is a painful feeling of humiliation or distress caused by the consciousness of wrong or foolish behavior. (Wikipedia)", + "mood_type": "negative" + } + }, + { + "model": "moods.mood", + "pk": 24, + "fields": { + "created": "2024-08-10T20:23:00.000Z", + "modified": "2024-08-10T20:23:00.000Z", + "uuid": "b185d77b-1335-4ca7-aa46-3d75268de058", + "title": "Disappointed", + "description": "Disappointment is the feeling of sadness or displeasure caused by the non-fulfillment of one's hopes or expectations. (Wikipedia)", + "mood_type": "negative" + } + }, + { + "model": "moods.mood", + "pk": 25, + "fields": { + "created": "2024-08-10T20:23:30.000Z", + "modified": "2024-08-10T20:23:30.000Z", + "uuid": "c833a46c-a368-4db2-905d-e7f3cbba74ee", + "title": "Discouraged", + "description": "Discouragement is the loss of confidence or enthusiasm; disheartenment. (Wikipedia)", + "mood_type": "negative" + } + }, + { + "model": "moods.mood", + "pk": 26, + "fields": { + "created": "2024-08-10T20:24:00.000Z", + "modified": "2024-08-10T20:24:00.000Z", + "uuid": "813239ab-4ad6-45a1-afde-41f463736066", + "title": "Drained", + "description": "Emotional exhaustion is a state of feeling emotionally worn out and drained due to accumulated stress. (Wikipedia)", + "mood_type": "negative" + } + }, + { + "model": "moods.mood", + "pk": 27, + "fields": { + "created": "2024-08-10T20:24:30.000Z", + "modified": "2024-08-10T20:24:30.000Z", + "uuid": "51694a2f-2ace-4b5d-a5b2-81975eec40d8", + "title": "Embarrassed", + "description": "Embarrassment is an emotional state of intense discomfort with oneself, experienced when having a socially unacceptable act or condition witnessed by or revealed to others. (Wikipedia)", + "mood_type": "negative" + } + }, + { + "model": "moods.mood", + "pk": 28, + "fields": { + "created": "2024-08-10T20:25:00.000Z", + "modified": "2024-08-10T20:25:00.000Z", + "uuid": "34f6ac4d-ed9e-4a7c-b84b-69d6769720e7", + "title": "Frustrated", + "description": "Frustration is a common emotional response to opposition, related to anger, annoyance and disappointment. (Wikipedia)", + "mood_type": "negative" + } + }, + { + "model": "moods.mood", + "pk": 29, + "fields": { + "created": "2024-08-10T20:25:30.000Z", + "modified": "2024-08-10T20:25:30.000Z", + "uuid": "04157243-a293-4933-8d9b-895b6115da7c", + "title": "Guilty", + "description": "Guilt is a cognitive or an emotional experience that occurs when a person believes they have compromised their own standards of conduct or violated a universal moral standard. (Wikipedia)", + "mood_type": "negative" + } + }, + { + "model": "moods.mood", + "pk": 30, + "fields": { + "created": "2024-08-10T20:26:00.000Z", + "modified": "2024-08-10T20:26:00.000Z", + "uuid": "3030f582-8e6f-4495-8be0-5d20afae1845", + "title": "Hopeless", + "description": "Hopelessness is the state of having no hope; despair. (Wikipedia)", + "mood_type": "negative" + } + }, + { + "model": "moods.mood", + "pk": 31, + "fields": { + "created": "2024-08-10T20:26:30.000Z", + "modified": "2024-08-10T20:26:30.000Z", + "uuid": "f28c2fa9-a10a-44e7-b27d-653c941def17", + "title": "Indifferent", + "description": "Indifference is the lack of interest, concern, or sympathy. (Wikipedia)", + "mood_type": "negative" + } + }, + { + "model": "moods.mood", + "pk": 32, + "fields": { + "created": "2024-08-10T20:27:00.000Z", + "modified": "2024-08-10T20:27:00.000Z", + "uuid": "3177ead6-db40-4ae6-a0ac-7d44ed3a059d", + "title": "Irritated", + "description": "Irritation is a feeling of annoyance or anger. (Wikipedia)", + "mood_type": "negative" + } + }, + { + "model": "moods.mood", + "pk": 33, + "fields": { + "created": "2024-08-10T20:27:30.000Z", + "modified": "2024-08-10T20:27:30.000Z", + "uuid": "da52386c-fcb2-4525-8369-fb2e8f814c13", + "title": "Jealous", + "description": "Jealousy is an emotion and typically refers to the negative thoughts and feelings of insecurity, fear, and anxiety over an anticipated loss of something or someone valuable. (Wikipedia)", + "mood_type": "negative" + } + }, + { + "model": "moods.mood", + "pk": 34, + "fields": { + "created": "2024-08-10T20:28:00.000Z", + "modified": "2024-08-10T20:28:00.000Z", + "uuid": "78f51ecf-aada-47f8-9049-186d6a90e3c1", + "title": "Lonely", + "description": "Loneliness is an unpleasant emotional response to perceived isolation. (Wikipedia)", + "mood_type": "negative" + } + }, + { + "model": "moods.mood", + "pk": 35, + "fields": { + "created": "2024-08-10T20:28:30.000Z", + "modified": "2024-08-10T20:28:30.000Z", + "uuid": "e8e314ec-df46-45d5-9d9d-8812afa2aeb3", + "title": "Overwhelmed", + "description": "Feeling overwhelmed describes an intense emotional state during which a person feels completely overcome in mind or body. (Wikipedia)", + "mood_type": "negative" + } + }, + { + "model": "moods.mood", + "pk": 36, + "fields": { + "created": "2024-08-10T20:29:00.000Z", + "modified": "2024-08-10T20:29:00.000Z", + "uuid": "98d46227-b898-4947-8b68-8b89b8325f64", + "title": "Scared", + "description": "Fear is an intensely unpleasant primal emotion in response to perceiving or recognizing a danger or threat. (Wikipedia)", + "mood_type": "negative" + } + }, + { + "model": "moods.mood", + "pk": 37, + "fields": { + "created": "2024-08-10T20:29:30.000Z", + "modified": "2024-08-10T20:29:30.000Z", + "uuid": "96b780ec-d45d-450a-a3e2-da5675949d3c", + "title": "Stressed", + "description": "Stress is a feeling of emotional or physical tension. It can come from any event or thought that makes you feel frustrated, angry, or nervous. (Wikipedia)", + "mood_type": "negative" + } + }, + { + "model": "moods.mood", + "pk": 38, + "fields": { + "created": "2024-08-10T20:30:00.000Z", + "modified": "2024-08-10T20:30:00.000Z", + "uuid": "c8a31477-f93f-437a-88d6-5a3fd9f2d971", + "title": "Worried", + "description": "Worry is an emotional state of anticipating a future problem or outcome. (Wikipedia)", + "mood_type": "negative" + } + } +] diff --git a/vrobbler/apps/moods/migrations/0006_add_mood_type_to_mood.py b/vrobbler/apps/moods/migrations/0006_add_mood_type_to_mood.py new file mode 100644 index 0000000..0ebcb6e --- /dev/null +++ b/vrobbler/apps/moods/migrations/0006_add_mood_type_to_mood.py @@ -0,0 +1,46 @@ +# Generated by Django 4.2.29 on 2026-04-28 18:03 + +from django.db import migrations, models +import uuid + + +class Migration(migrations.Migration): + + dependencies = [ + ("moods", "0005_mood_tags"), + ] + + operations = [ + migrations.CreateModel( + name="MoodReason", + fields=[ + ( + "id", + models.BigAutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ( + "uuid", + models.UUIDField( + blank=True, default=uuid.uuid4, editable=False, null=True + ), + ), + ("title", models.CharField(blank=True, max_length=255, null=True)), + ("description", models.TextField(blank=True, null=True)), + ], + ), + migrations.AddField( + model_name="mood", + name="mood_type", + field=models.CharField( + blank=True, + choices=[("positive", "Positive"), ("negative", "Negative")], + max_length=20, + null=True, + ), + ), + ] diff --git a/vrobbler/apps/moods/migrations/0007_update_moods_to_apple_list.py b/vrobbler/apps/moods/migrations/0007_update_moods_to_apple_list.py new file mode 100644 index 0000000..04d1ec1 --- /dev/null +++ b/vrobbler/apps/moods/migrations/0007_update_moods_to_apple_list.py @@ -0,0 +1,104 @@ +# Generated by Django 4.2.29 on 2026-04-28 18:06 + +from django.db import migrations +from uuid import uuid4 + + +def update_moods_to_apple_list(apps, schema_editor): + Mood = apps.get_model("moods", "Mood") + Scrobble = apps.get_model("scrobbles", "Scrobble") + + # Mapping of old mood titles to new adverb titles with mood_type + # Format: old_title -> (new_title, mood_type) + mood_mapping = { + "Anxious": ("Anxiously", "negative"), + "Fear": ("Fear", "negative"), + "Sadness": ("Sadly", "negative"), + "Anger": ("Angrily", "negative"), + "Surprise": ("Surprisingly", "positive"), + "Disgust": ("Disgustedly", "negative"), + "Joy": ("Joyfully", "positive"), + "Admiration": ("Admiration", "positive"), + "Adoration": ("Adoration", "positive"), + "Aesthetic Appreciation": ("Aesthetic Appreciation", "positive"), + "Amusement": ("Amusedly", "positive"), + "Awe": ("Amazingly", "positive"), + "Awkwardness": ("Awkwardness", "negative"), + "Boredom": ("Boredom", "negative"), + "Calmness": ("Calmly", "positive"), + "Confusion": ("Confusion", "negative"), + "Craving/Desire": ("Craving/Desire", "positive"), + "Empathetic pain": ("Empathetic pain", "negative"), + "Entrancement": ("Entrancement", "positive"), + "Excitement": ("Excitedly", "positive"), + "Horror": ("Horror", "negative"), + "Interest": ("Interest", "positive"), + "Nostalgia": ("Nostalgia", "positive"), + "Relief": ("Relievedly", "positive"), + "Romance": ("Romance", "positive"), + "Satisfaction": ("Satisfiedly", "positive"), + } + + # Apple moods (adverbs) with their mood_type + # Tier1 (positive) + apple_positive = [ + "Amazingly", "Amusedly", "Bravely", "Calmly", "Confidently", + "Contentedly", "Excitedly", "Gratefully", "Happily", "Hopefully", + "Joyfully", "Passionately", "Peacefully", "Proudly", "Relievedly", + "Satisfiedly", "Surprisingly", + ] + # Tier2 (negative) + apple_negative = [ + "Angrily", "Annoyedly", "Anxiously", "Ashamedly", "Disappointedly", + "Discouragedly", "Disgustedly", "Drainedly", "Embarrassedly", + "Frustratedly", "Guiltily", "Hopelessly", "Indifferently", + "Irritatedly", "Jealously", "Lonelily", "Overwhelmingly", "Sadly", + "Scaredly", "Stressedly", "Worriedly", + ] + + apple_moods = set(apple_positive + apple_negative) + + # Update existing moods + for old_title, (new_title, mood_type) in mood_mapping.items(): + try: + mood = Mood.objects.get(title=old_title) + mood.title = new_title + mood.mood_type = mood_type + mood.save() + except Mood.DoesNotExist: + pass + + # Delete moods with no scrobbles that aren't in Apple list + moods_to_check = Mood.objects.filter(mood_type__isnull=True) + for mood in moods_to_check: + if not Scrobble.objects.filter(mood=mood).exists(): + if mood.title not in apple_moods: + mood.delete() + + # Create missing Apple moods + for title in apple_positive: + Mood.objects.get_or_create( + title=title, + defaults={"mood_type": "positive", "uuid": uuid4()} + ) + + for title in apple_negative: + Mood.objects.get_or_create( + title=title, + defaults={"mood_type": "negative", "uuid": uuid4()} + ) + + +class Migration(migrations.Migration): + + dependencies = [ + ("moods", "0006_add_mood_type_to_mood"), + ("scrobbles", "0057_scrobble_mood_alter_scrobble_log_and_more"), + ] + + operations = [ + migrations.RunPython( + update_moods_to_apple_list, + migrations.RunPython.noop, + ), + ] diff --git a/vrobbler/apps/moods/models.py b/vrobbler/apps/moods/models.py index b3d9e00..9f4181d 100644 --- a/vrobbler/apps/moods/models.py +++ b/vrobbler/apps/moods/models.py @@ -1,6 +1,7 @@ import logging from dataclasses import dataclass from typing import Optional +from uuid import uuid4 from django.contrib.auth import get_user_model from django.db import models @@ -15,9 +16,33 @@ BNULL = {"blank": True, "null": True} User = get_user_model() +class MoodType(models.TextChoices): + POSITIVE = "positive", "Positive" + NEGATIVE = "negative", "Negative" + + @dataclass class MoodLogData(BaseLogData): - reasons: Optional[str] = None + mood_type: Optional[str] = None + mood_reason_ids: Optional[list[int]] = None + + @classmethod + def override_fields(cls) -> dict: + from django import forms + from moods.models import MoodReason + + return { + "mood_type": forms.ChoiceField( + choices=MoodType.choices, + required=False, + widget=forms.Select(attrs={"class": "form-control"}), + ), + "mood_reason_ids": forms.ModelMultipleChoiceField( + queryset=MoodReason.objects.all().order_by("title"), + required=False, + widget=forms.SelectMultiple(attrs={"size": 10}), + ), + } class Mood(ScrobblableMixin): @@ -35,6 +60,9 @@ class Mood(ScrobblableMixin): format="JPEG", options={"quality": 75}, ) + mood_type = models.CharField( + max_length=20, choices=MoodType.choices, **BNULL + ) def __str__(self): if self.title: @@ -61,3 +89,12 @@ class Mood(ScrobblableMixin): if self.image: return self.image.url return "" + + +class MoodReason(models.Model): + uuid = models.UUIDField(default=uuid4, editable=False, **BNULL) + title = models.CharField(max_length=255, **BNULL) + description = models.TextField(**BNULL) + + def __str__(self): + return self.title