diff --git a/README.md b/README.md index 3aeecfd..60ccce3 100644 --- a/README.md +++ b/README.md @@ -1 +1,27 @@ -# Don't delete this repo! +Given the complexity of the project, we will use Django, a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Django is a good choice for this project because it comes with a lot of built-in features that will help us to build a robust and scalable application. + +Here are the core classes, functions, and methods that will be necessary: + +1. User: This class will represent a user in our system. It will have methods for creating, updating, and deleting a user. + +2. Board: This class will represent a board in our system. It will have methods for creating, updating, and deleting a board. + +3. Pin: This class will represent a pin in our system. It will have methods for creating, updating, and deleting a pin. + +4. Comment: This class will represent a comment in our system. It will have methods for creating, updating, and deleting a comment. + +5. Follow: This class will represent a follow relationship between two users in our system. It will have methods for creating, updating, and deleting a follow relationship. + +6. AIGC: This class will be responsible for generating images using artificial intelligence. It will have a method for generating an image. + +7. Views: This file will contain the functions that handle the requests and responses of our application. + +8. URLs: This file will define the URL patterns for our application. + +9. Settings: This file will contain the configuration settings for our application. + +10. WSGI: This file will be the entry point for our application. + +Now, let's write the code for each file. + +wsgi.py diff --git a/all_output.txt b/all_output.txt new file mode 100644 index 0000000..68daf09 --- /dev/null +++ b/all_output.txt @@ -0,0 +1,184 @@ +Given the complexity of the project, we will use Django, a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Django is a good choice for this project because it comes with a lot of built-in features that will help us to build a robust and scalable application. + +Here are the core classes, functions, and methods that will be necessary: + +1. User: This class will represent a user in our system. It will have methods for creating, updating, and deleting a user. + +2. Board: This class will represent a board in our system. It will have methods for creating, updating, and deleting a board. + +3. Pin: This class will represent a pin in our system. It will have methods for creating, updating, and deleting a pin. + +4. Comment: This class will represent a comment in our system. It will have methods for creating, updating, and deleting a comment. + +5. Follow: This class will represent a follow relationship between two users in our system. It will have methods for creating, updating, and deleting a follow relationship. + +6. AIGC: This class will be responsible for generating images using artificial intelligence. It will have a method for generating an image. + +7. Views: This file will contain the functions that handle the requests and responses of our application. + +8. URLs: This file will define the URL patterns for our application. + +9. Settings: This file will contain the configuration settings for our application. + +10. WSGI: This file will be the entry point for our application. + +Now, let's write the code for each file. + +wsgi.py +```python +import os +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'architecturesite.settings') + +application = get_wsgi_application() +``` + +settings.py +```python +import os +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + +SECRET_KEY = 'your-secret-key' + +DEBUG = True + +ALLOWED_HOSTS = [] + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'website', +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'architecturesite.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'architecturesite.wsgi.application' + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + +STATIC_URL = '/static/' +``` + +urls.py +```python +from django.contrib import admin +from django.urls import path, include + +urlpatterns = [ + path('admin/', admin.site.urls), + path('', include('website.urls')), +] +``` + +models.py +```python +from django.db import models +from django.contrib.auth.models import User + +class Board(models.Model): + name = models.CharField(max_length=100) + user = models.ForeignKey(User, on_delete=models.CASCADE) + +class Pin(models.Model): + image = models.ImageField(upload_to='pins/') + description = models.TextField() + board = models.ForeignKey(Board, on_delete=models.CASCADE) + +class Comment(models.Model): + text = models.TextField() + user = models.ForeignKey(User, on_delete=models.CASCADE) + pin = models.ForeignKey(Pin, on_delete=models.CASCADE) + +class Follow(models.Model): + follower = models.ForeignKey(User, related_name='following', on_delete=models.CASCADE) + followee = models.ForeignKey(User, related_name='followers', on_delete=models.CASCADE) +``` + +views.py +```python +from django.shortcuts import render +from .models import Board, Pin, Comment, Follow + +def home(request): + boards = Board.objects.all() + return render(request, 'home.html', {'boards': boards}) + +def board_detail(request, board_id): + board = Board.objects.get(id=board_id) + return render(request, 'board_detail.html', {'board': board}) + +def pin_detail(request, pin_id): + pin = Pin.objects.get(id=pin_id) + return render(request, 'pin_detail.html', {'pin': pin}) + +def comment_detail(request, comment_id): + comment = Comment.objects.get(id=comment_id) + return render(request, 'comment_detail.html', {'comment': comment}) + +def follow_detail(request, follow_id): + follow = Follow.objects.get(id=follow_id) + return render(request, 'follow_detail.html', {'follow': follow}) +``` + +Please note that this is a basic implementation and does not include the AIGC class for generating images. The implementation of this class would depend on the specific AI technology you want to use. Also, the views.py file only includes the detail views for simplicity. In a real application, you would also need to implement views for creating, updating, and deleting boards, pins, comments, and follows. \ No newline at end of file diff --git a/logs/log.txt b/logs/log.txt new file mode 100644 index 0000000..f4c4cab --- /dev/null +++ b/logs/log.txt @@ -0,0 +1,309 @@ +2023-09-12 03:28:59.185 | INFO | metagpt.config:__init__:44 - Config loading done. +2023-09-12 03:28:59.186 | INFO | metagpt.config:__init__:58 - Set OPENAI_API_BASE in case of network issues +2023-09-12 03:29:01.879 | INFO | metagpt.software_company:invest:39 - Investment: $2.0. +2023-09-12 03:29:01.880 | DEBUG | metagpt.software_company:run:58 - n_round=1 +2023-09-12 03:29:01.880 | DEBUG | metagpt.roles.role:_observe:195 - Alice(Product Manager) observed: ['BOSS: Help me design a con...'] +2023-09-12 03:29:01.880 | DEBUG | metagpt.roles.role:_set_state:128 - [WritePRD] +2023-09-12 03:29:01.880 | DEBUG | metagpt.roles.role:_react:208 - Alice(Product Manager): self._rc.state=0, will do WritePRD +2023-09-12 03:29:01.880 | INFO | metagpt.roles.role:_act:167 - Alice(Product Manager): ready to WritePRD +2023-09-12 03:29:01.883 | DEBUG | metagpt.actions.write_prd:run:144 - +# Context +## Original Requirements +[BOSS: Help me design a content website for architects, similar to Pinterest, with images generated by AIGC. Always use engineer role to write out any code] + +## Search Information +### Search Results + + +### Search Summary + + +## mermaid quadrantChart code syntax example. DONT USE QUOTO IN CODE DUE TO INVALID SYNTAX. Replace the with REAL COMPETITOR NAME +```mermaid +quadrantChart + title Reach and engagement of campaigns + x-axis Low Reach --> High Reach + y-axis Low Engagement --> High Engagement + quadrant-1 We should expand + quadrant-2 Need to promote + quadrant-3 Re-evaluate + quadrant-4 May be improved + "Campaign: A": [0.3, 0.6] + "Campaign B": [0.45, 0.23] + "Campaign C": [0.57, 0.69] + "Campaign D": [0.78, 0.34] + "Campaign E": [0.40, 0.34] + "Campaign F": [0.35, 0.78] + "Our Target Product": [0.5, 0.6] +``` + +## Format example + +--- +## Original Requirements +The boss ... + +## Product Goals +```python +[ + "Create a ...", +] +``` + +## User Stories +```python +[ + "As a user, ...", +] +``` + +## Competitive Analysis +```python +[ + "Python Snake Game: ...", +] +``` + +## Competitive Quadrant Chart +```mermaid +quadrantChart + title Reach and engagement of campaigns + ... + "Our Target Product": [0.6, 0.7] +``` + +## Requirement Analysis +The product should be a ... + +## Requirement Pool +```python +[ + ("End game ...", "P0") +] +``` + +## UI Design draft +Give a basic function description, and a draft + +## Anything UNCLEAR +There are no unclear points. +--- + +----- +Role: You are a professional product manager; the goal is to design a concise, usable, efficient product +Requirements: According to the context, fill in the following missing information, note that each sections are returned in Python code triple quote form seperatedly. If the requirements are unclear, ensure minimum viability and avoid excessive design +ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. AND '## ' SHOULD WRITE BEFORE the code and triple quote. Output carefully referenced "Format example" in format. + +## Original Requirements: Provide as Plain text, place the polished complete original requirements here + +## Product Goals: Provided as Python list[str], up to 3 clear, orthogonal product goals. If the requirement itself is simple, the goal should also be simple + +## User Stories: Provided as Python list[str], up to 5 scenario-based user stories, If the requirement itself is simple, the user stories should also be less + +## Competitive Analysis: Provided as Python list[str], up to 7 competitive product analyses, consider as similar competitors as possible + +## Competitive Quadrant Chart: Use mermaid quadrantChart code syntax. up to 14 competitive products. Translation: Distribute these competitor scores evenly between 0 and 1, trying to conform to a normal distribution centered around 0.5 as much as possible. + +## Requirement Analysis: Provide as Plain text. Be simple. LESS IS MORE. Make your requirements less dumb. Delete the parts unnessasery. + +## Requirement Pool: Provided as Python list[str, str], the parameters are requirement description, priority(P0/P1/P2), respectively, comply with PEP standards; no more than 5 requirements and consider to make its difficulty lower + +## UI Design draft: Provide as Plain text. Be simple. Describe the elements and functions, also provide a simple style description and layout description. +## Anything UNCLEAR: Provide as Plain text. Make clear here. + +2023-09-12 03:29:01.928 | DEBUG | metagpt.roles.role:run:237 - Bob(Architect): no news. waiting. +2023-09-12 03:29:01.928 | DEBUG | metagpt.roles.role:run:237 - Eve(Project Manager): no news. waiting. +2023-09-12 03:29:01.928 | DEBUG | metagpt.roles.role:run:237 - Alex(Engineer): no news. waiting. +2023-09-12 03:29:01.928 | DEBUG | metagpt.roles.role:run:237 - Edward(QaEngineer): no news. waiting. +2023-09-12 03:30:29.355 | INFO | metagpt.provider.openai_api:update_cost:81 - Total running cost: $0.080 | Max budget: $2.000 | Current cost: $0.080, prompt_tokens: 867, completion_tokens: 904 +2023-09-12 03:30:29.357 | DEBUG | metagpt.provider.base_gpt_api:aask:45 - [{'role': 'system', 'content': 'You are a Product Manager, named Alice, your goal is Efficiently create a successful product, and the constraint is . '}, {'role': 'user', 'content': '\n# Context\n## Original Requirements\n[BOSS: Help me design a content website for architects, similar to Pinterest, with images generated by AIGC. Always use engineer role to write out any code]\n\n## Search Information\n### Search Results\n\n\n### Search Summary\n\n\n## mermaid quadrantChart code syntax example. DONT USE QUOTO IN CODE DUE TO INVALID SYNTAX. Replace the with REAL COMPETITOR NAME\n```mermaid\nquadrantChart\n title Reach and engagement of campaigns\n x-axis Low Reach --> High Reach\n y-axis Low Engagement --> High Engagement\n quadrant-1 We should expand\n quadrant-2 Need to promote\n quadrant-3 Re-evaluate\n quadrant-4 May be improved\n "Campaign: A": [0.3, 0.6]\n "Campaign B": [0.45, 0.23]\n "Campaign C": [0.57, 0.69]\n "Campaign D": [0.78, 0.34]\n "Campaign E": [0.40, 0.34]\n "Campaign F": [0.35, 0.78]\n "Our Target Product": [0.5, 0.6]\n```\n\n## Format example\n\n---\n## Original Requirements\nThe boss ... \n\n## Product Goals\n```python\n[\n "Create a ...",\n]\n```\n\n## User Stories\n```python\n[\n "As a user, ...",\n]\n```\n\n## Competitive Analysis\n```python\n[\n "Python Snake Game: ...",\n]\n```\n\n## Competitive Quadrant Chart\n```mermaid\nquadrantChart\n title Reach and engagement of campaigns\n ...\n "Our Target Product": [0.6, 0.7]\n```\n\n## Requirement Analysis\nThe product should be a ...\n\n## Requirement Pool\n```python\n[\n ("End game ...", "P0")\n]\n```\n\n## UI Design draft\nGive a basic function description, and a draft\n\n## Anything UNCLEAR\nThere are no unclear points.\n---\n\n-----\nRole: You are a professional product manager; the goal is to design a concise, usable, efficient product\nRequirements: According to the context, fill in the following missing information, note that each sections are returned in Python code triple quote form seperatedly. If the requirements are unclear, ensure minimum viability and avoid excessive design\nATTENTION: Use \'##\' to SPLIT SECTIONS, not \'#\'. AND \'## \' SHOULD WRITE BEFORE the code and triple quote. Output carefully referenced "Format example" in format.\n\n## Original Requirements: Provide as Plain text, place the polished complete original requirements here\n\n## Product Goals: Provided as Python list[str], up to 3 clear, orthogonal product goals. If the requirement itself is simple, the goal should also be simple\n\n## User Stories: Provided as Python list[str], up to 5 scenario-based user stories, If the requirement itself is simple, the user stories should also be less\n\n## Competitive Analysis: Provided as Python list[str], up to 7 competitive product analyses, consider as similar competitors as possible\n\n## Competitive Quadrant Chart: Use mermaid quadrantChart code syntax. up to 14 competitive products. Translation: Distribute these competitor scores evenly between 0 and 1, trying to conform to a normal distribution centered around 0.5 as much as possible.\n\n## Requirement Analysis: Provide as Plain text. Be simple. LESS IS MORE. Make your requirements less dumb. Delete the parts unnessasery.\n\n## Requirement Pool: Provided as Python list[str, str], the parameters are requirement description, priority(P0/P1/P2), respectively, comply with PEP standards; no more than 5 requirements and consider to make its difficulty lower\n\n## UI Design draft: Provide as Plain text. Be simple. Describe the elements and functions, also provide a simple style description and layout description.\n## Anything UNCLEAR: Provide as Plain text. Make clear here.\n'}] +2023-09-12 03:30:29.358 | DEBUG | metagpt.actions.action:_aask_v1:58 - ## Original Requirements +The boss has requested for the design of a content website for architects. The website should be similar to Pinterest with images generated by AIGC. The code for the website should be written by an engineer. + +## Product Goals +```python +[ + "Create a user-friendly content website for architects", + "Incorporate AIGC-generated images into the website", + "Ensure the website is similar in functionality and design to Pinterest" +] +``` + +## User Stories +```python +[ + "As an architect, I want to browse through a variety of AIGC-generated images to find inspiration for my projects", + "As a user, I want to be able to save images I like to my personal board for future reference", + "As a user, I want to be able to search for specific types of architectural designs", + "As a user, I want to be able to upload my own images and share them with the community", + "As a user, I want to interact with other users by commenting on and liking their posts" +] +``` + +## Competitive Analysis +```python +[ + "Pinterest: A well-known platform for sharing and discovering new ideas. It has a user-friendly interface and a large user base, but it doesn't focus specifically on architecture", + "ArchDaily: A website dedicated to architecture, but it lacks the social and interactive aspects of Pinterest", + "Houzz: A platform for home renovation and design, providing a unique blend of products, pros, and inspiration. However, it's more focused on interior design than architecture", + "Dwell: A platform for discovering modern architecture and design, but it doesn't allow users to upload their own content", + "Architizer: A platform for architects to showcase their work, but it lacks the user-friendly interface of Pinterest", + "Designboom: An online architecture magazine, but it doesn't have the interactive features of a social platform", + "Archinect: A platform for architects to connect and share their work, but it doesn't have the visual appeal of Pinterest" +] +``` + +## Competitive Quadrant Chart +```mermaid +quadrantChart + title Reach and engagement of campaigns + x-axis Low Reach --> High Reach + y-axis Low Engagement --> High Engagement + quadrant-1 We should expand + quadrant-2 Need to promote + quadrant-3 Re-evaluate + quadrant-4 May be improved + "Pinterest": [0.9, 0.8] + "ArchDaily": [0.7, 0.5] + "Houzz": [0.8, 0.6] + "Dwell": [0.6, 0.4] + "Architizer": [0.5, 0.3] + "Designboom": [0.4, 0.2] + "Archinect": [0.3, 0.1] + "Our Target Product": [0.5, 0.6] +``` + +## Requirement Analysis +The product should be a content website for architects, similar to Pinterest. It should allow users to browse, save, and upload images, as well as interact with other users. The images on the website should be generated by AIGC. + +## Requirement Pool +```python +[ + ("Implement a user-friendly interface similar to Pinterest", "P0"), + ("Incorporate AIGC-generated images into the website", "P0"), + ("Allow users to save images to their personal board", "P0"), + ("Include a search function for users to find specific types of architectural designs", "P1"), + ("Enable users to upload their own images and share them with the community", "P1"), + ("Include interactive features for users to comment on and like posts", "P2") +] +``` + +## UI Design draft +The website should have a clean, minimalist design with a focus on the images. The homepage should display a grid of images, with options to filter and sort them. Each image should have a button to save it to the user's personal board. There should also be a search bar at the top of the page for users to find specific types of designs. The user's personal board and uploaded images should be accessible from a menu bar at the top of the page. + +## Anything UNCLEAR +There are no unclear points. +2023-09-12 03:30:29.361 | DEBUG | metagpt.actions.action:_aask_v1:61 - {'Original Requirements': 'The boss has requested for the design of a content website for architects. The website should be similar to Pinterest with images generated by AIGC. The code for the website should be written by an engineer.', 'Product Goals': ['Create a user-friendly content website for architects', 'Incorporate AIGC-generated images into the website', 'Ensure the website is similar in functionality and design to Pinterest'], 'User Stories': ['As an architect, I want to browse through a variety of AIGC-generated images to find inspiration for my projects', 'As a user, I want to be able to save images I like to my personal board for future reference', 'As a user, I want to be able to search for specific types of architectural designs', 'As a user, I want to be able to upload my own images and share them with the community', 'As a user, I want to interact with other users by commenting on and liking their posts'], 'Competitive Analysis': ["Pinterest: A well-known platform for sharing and discovering new ideas. It has a user-friendly interface and a large user base, but it doesn't focus specifically on architecture", 'ArchDaily: A website dedicated to architecture, but it lacks the social and interactive aspects of Pinterest', "Houzz: A platform for home renovation and design, providing a unique blend of products, pros, and inspiration. However, it's more focused on interior design than architecture", "Dwell: A platform for discovering modern architecture and design, but it doesn't allow users to upload their own content", 'Architizer: A platform for architects to showcase their work, but it lacks the user-friendly interface of Pinterest', "Designboom: An online architecture magazine, but it doesn't have the interactive features of a social platform", "Archinect: A platform for architects to connect and share their work, but it doesn't have the visual appeal of Pinterest"], 'Competitive Quadrant Chart': 'quadrantChart\n title Reach and engagement of campaigns\n x-axis Low Reach --> High Reach\n y-axis Low Engagement --> High Engagement\n quadrant-1 We should expand\n quadrant-2 Need to promote\n quadrant-3 Re-evaluate\n quadrant-4 May be improved\n "Pinterest": [0.9, 0.8]\n "ArchDaily": [0.7, 0.5]\n "Houzz": [0.8, 0.6]\n "Dwell": [0.6, 0.4]\n "Architizer": [0.5, 0.3]\n "Designboom": [0.4, 0.2]\n "Archinect": [0.3, 0.1]\n "Our Target Product": [0.5, 0.6]\n', 'Requirement Analysis': 'The product should be a content website for architects, similar to Pinterest. It should allow users to browse, save, and upload images, as well as interact with other users. The images on the website should be generated by AIGC.', 'Requirement Pool': [('Implement a user-friendly interface similar to Pinterest', 'P0'), ('Incorporate AIGC-generated images into the website', 'P0'), ('Allow users to save images to their personal board', 'P0'), ('Include a search function for users to find specific types of architectural designs', 'P1'), ('Enable users to upload their own images and share them with the community', 'P1'), ('Include interactive features for users to comment on and like posts', 'P2')], 'UI Design draft': "The website should have a clean, minimalist design with a focus on the images. The homepage should display a grid of images, with options to filter and sort them. Each image should have a button to save it to the user's personal board. There should also be a search bar at the top of the page for users to find specific types of designs. The user's personal board and uploaded images should be accessible from a menu bar at the top of the page.", 'Anything UNCLEAR': 'There are no unclear points.'} +2023-09-12 03:30:29.362 | DEBUG | metagpt.software_company:run:58 - n_round=0 +2023-09-12 03:30:29.362 | DEBUG | metagpt.roles.role:run:237 - Alice(Product Manager): no news. waiting. +2023-09-12 03:30:29.362 | DEBUG | metagpt.roles.role:_observe:195 - Bob(Architect) observed: ['Product Manager: ## Original Requirem...'] +2023-09-12 03:30:29.362 | DEBUG | metagpt.roles.role:_set_state:128 - [WriteDesign] +2023-09-12 03:30:29.363 | DEBUG | metagpt.roles.role:_react:208 - Bob(Architect): self._rc.state=0, will do WriteDesign +2023-09-12 03:30:29.363 | INFO | metagpt.roles.role:_act:167 - Bob(Architect): ready to WriteDesign +2023-09-12 03:30:29.364 | DEBUG | metagpt.roles.role:run:237 - Eve(Project Manager): no news. waiting. +2023-09-12 03:30:29.364 | DEBUG | metagpt.roles.role:run:237 - Alex(Engineer): no news. waiting. +2023-09-12 03:30:29.364 | DEBUG | metagpt.roles.role:run:237 - Edward(QaEngineer): no news. waiting. +2023-09-12 03:31:27.410 | INFO | metagpt.provider.openai_api:update_cost:81 - Total running cost: $0.166 | Max budget: $2.000 | Current cost: $0.086, prompt_tokens: 1427, completion_tokens: 718 +2023-09-12 03:31:27.413 | DEBUG | metagpt.provider.base_gpt_api:aask:45 - [{'role': 'system', 'content': 'You are a Architect, named Bob, your goal is Design a concise, usable, complete python system, and the constraint is Try to specify good open source tools as much as possible. '}, {'role': 'user', 'content': '\n# Context\n[Product Manager: ## Original Requirements\nThe boss has requested for the design of a content website for architects. The website should be similar to Pinterest with images generated by AIGC. The code for the website should be written by an engineer.\n\n## Product Goals\n```python\n[\n "Create a user-friendly content website for architects",\n "Incorporate AIGC-generated images into the website",\n "Ensure the website is similar in functionality and design to Pinterest"\n]\n```\n\n## User Stories\n```python\n[\n "As an architect, I want to browse through a variety of AIGC-generated images to find inspiration for my projects",\n "As a user, I want to be able to save images I like to my personal board for future reference",\n "As a user, I want to be able to search for specific types of architectural designs",\n "As a user, I want to be able to upload my own images and share them with the community",\n "As a user, I want to interact with other users by commenting on and liking their posts"\n]\n```\n\n## Competitive Analysis\n```python\n[\n "Pinterest: A well-known platform for sharing and discovering new ideas. It has a user-friendly interface and a large user base, but it doesn\'t focus specifically on architecture",\n "ArchDaily: A website dedicated to architecture, but it lacks the social and interactive aspects of Pinterest",\n "Houzz: A platform for home renovation and design, providing a unique blend of products, pros, and inspiration. However, it\'s more focused on interior design than architecture",\n "Dwell: A platform for discovering modern architecture and design, but it doesn\'t allow users to upload their own content",\n "Architizer: A platform for architects to showcase their work, but it lacks the user-friendly interface of Pinterest",\n "Designboom: An online architecture magazine, but it doesn\'t have the interactive features of a social platform",\n "Archinect: A platform for architects to connect and share their work, but it doesn\'t have the visual appeal of Pinterest"\n]\n```\n\n## Competitive Quadrant Chart\n```mermaid\nquadrantChart\n title Reach and engagement of campaigns\n x-axis Low Reach --> High Reach\n y-axis Low Engagement --> High Engagement\n quadrant-1 We should expand\n quadrant-2 Need to promote\n quadrant-3 Re-evaluate\n quadrant-4 May be improved\n "Pinterest": [0.9, 0.8]\n "ArchDaily": [0.7, 0.5]\n "Houzz": [0.8, 0.6]\n "Dwell": [0.6, 0.4]\n "Architizer": [0.5, 0.3]\n "Designboom": [0.4, 0.2]\n "Archinect": [0.3, 0.1]\n "Our Target Product": [0.5, 0.6]\n```\n\n## Requirement Analysis\nThe product should be a content website for architects, similar to Pinterest. It should allow users to browse, save, and upload images, as well as interact with other users. The images on the website should be generated by AIGC.\n\n## Requirement Pool\n```python\n[\n ("Implement a user-friendly interface similar to Pinterest", "P0"),\n ("Incorporate AIGC-generated images into the website", "P0"),\n ("Allow users to save images to their personal board", "P0"),\n ("Include a search function for users to find specific types of architectural designs", "P1"),\n ("Enable users to upload their own images and share them with the community", "P1"),\n ("Include interactive features for users to comment on and like posts", "P2")\n]\n```\n\n## UI Design draft\nThe website should have a clean, minimalist design with a focus on the images. The homepage should display a grid of images, with options to filter and sort them. Each image should have a button to save it to the user\'s personal board. There should also be a search bar at the top of the page for users to find specific types of designs. The user\'s personal board and uploaded images should be accessible from a menu bar at the top of the page.\n\n## Anything UNCLEAR\nThere are no unclear points.]\n\n## Format example\n\n---\n## Implementation approach\nWe will ...\n\n## Python package name\n```python\n"snake_game"\n```\n\n## File list\n```python\n[\n "main.py",\n]\n```\n\n## Data structures and interface definitions\n```mermaid\nclassDiagram\n class Game{\n +int score\n }\n ...\n Game "1" -- "1" Food: has\n```\n\n## Program call flow\n```mermaid\nsequenceDiagram\n participant M as Main\n ...\n G->>M: end game\n```\n\n## Anything UNCLEAR\nThe requirement is clear to me.\n---\n\n-----\nRole: You are an architect; the goal is to design a SOTA PEP8-compliant python system; make the best use of good open source tools\nRequirement: Fill in the following missing information based on the context, note that all sections are response with code form separately\nMax Output: 8192 chars or 2048 tokens. Try to use them up.\nAttention: Use \'##\' to split sections, not \'#\', and \'## \' SHOULD WRITE BEFORE the code and triple quote.\n\n## Implementation approach: Provide as Plain text. Analyze the difficult points of the requirements, select the appropriate open-source framework.\n\n## Python package name: Provide as Python str with python triple quoto, concise and clear, characters only use a combination of all lowercase and underscores\n\n## File list: Provided as Python list[str], the list of ONLY REQUIRED files needed to write the program(LESS IS MORE!). Only need relative paths, comply with PEP8 standards. ALWAYS write a main.py or app.py here\n\n## Data structures and interface definitions: Use mermaid classDiagram code syntax, including classes (INCLUDING __init__ method) and functions (with type annotations), CLEARLY MARK the RELATIONSHIPS between classes, and comply with PEP8 standards. The data structures SHOULD BE VERY DETAILED and the API should be comprehensive with a complete design. \n\n## Program call flow: Use sequenceDiagram code syntax, COMPLETE and VERY DETAILED, using CLASSES AND API DEFINED ABOVE accurately, covering the CRUD AND INIT of each object, SYNTAX MUST BE CORRECT.\n\n## Anything UNCLEAR: Provide as Plain text. Make clear here.\n\n'}] +2023-09-12 03:31:27.413 | DEBUG | metagpt.actions.action:_aask_v1:58 - ## Implementation approach +The website will be built using the Django framework due to its robustness and scalability. Django has a user-friendly admin interface which can be used for managing the content of the website. For the front-end, we will use Bootstrap to achieve a responsive and user-friendly interface similar to Pinterest. + +To incorporate AIGC-generated images, we will use an open-source AI image generation library such as DeepArt or DeepDream. These images will be stored in a PostgreSQL database due to its excellent performance with large datasets. + +For user interactions such as saving images, commenting, and liking posts, we will use Django's built-in authentication and authorization modules. + +The search functionality will be implemented using Elasticsearch, an open-source search engine that provides a distributed, multitenant-capable full-text search engine with an HTTP web interface and schema-free JSON documents. + +## Python package name +```python +"architects_inspiration" +``` + +## File list +```python +[ + "main.py", + "settings.py", + "urls.py", + "models.py", + "views.py", + "forms.py", + "templates/home.html", + "templates/board.html", + "templates/search.html", + "templates/upload.html", + "static/css/main.css", + "static/js/main.js", + "requirements.txt" +] +``` + +## Data structures and interface definitions +```mermaid +classDiagram + class User{ + +str username + +str password + +str email + +list[Image] saved_images + +list[Image] uploaded_images + +list[Comment] comments + +list[Like] likes + +__init__(username: str, password: str, email: str) + +save_image(image: Image) + +upload_image(image: Image) + +comment_on_image(image: Image, comment: str) + +like_image(image: Image) + } + class Image{ + +str url + +str title + +str description + +User uploader + +list[Comment] comments + +list[Like] likes + +__init__(url: str, title: str, description: str, uploader: User) + +add_comment(comment: Comment) + +add_like(like: Like) + } + class Comment{ + +User author + +str text + +Image image + +__init__(author: User, text: str, image: Image) + } + class Like{ + +User user + +Image image + +__init__(user: User, image: Image) + } + User "1" -- "*" Image: saves, uploads + User "1" -- "*" Comment: writes + User "1" -- "*" Like: makes + Image "1" -- "*" Comment: has + Image "1" -- "*" Like: has +``` + +## Program call flow +```mermaid +sequenceDiagram + participant U as User + participant I as Image + participant C as Comment + participant L as Like + U->>I: save_image(image) + U->>I: upload_image(image) + U->>C: comment_on_image(image, comment) + U->>L: like_image(image) + I->>C: add_comment(comment) + I->>L: add_like(like) +``` + +## Anything UNCLEAR +The requirement is clear to me. +2023-09-12 03:31:27.415 | DEBUG | metagpt.actions.action:_aask_v1:61 - {'Implementation approach': "The website will be built using the Django framework due to its robustness and scalability. Django has a user-friendly admin interface which can be used for managing the content of the website. For the front-end, we will use Bootstrap to achieve a responsive and user-friendly interface similar to Pinterest. \n\nTo incorporate AIGC-generated images, we will use an open-source AI image generation library such as DeepArt or DeepDream. These images will be stored in a PostgreSQL database due to its excellent performance with large datasets. \n\nFor user interactions such as saving images, commenting, and liking posts, we will use Django's built-in authentication and authorization modules. \n\nThe search functionality will be implemented using Elasticsearch, an open-source search engine that provides a distributed, multitenant-capable full-text search engine with an HTTP web interface and schema-free JSON documents.", 'Python package name': '"architects_inspiration"\n', 'File list': ['main.py', 'settings.py', 'urls.py', 'models.py', 'views.py', 'forms.py', 'templates/home.html', 'templates/board.html', 'templates/search.html', 'templates/upload.html', 'static/css/main.css', 'static/js/main.js', 'requirements.txt'], 'Data structures and interface definitions': 'classDiagram\n class User{\n +str username\n +str password\n +str email\n +list[Image] saved_images\n +list[Image] uploaded_images\n +list[Comment] comments\n +list[Like] likes\n +__init__(username: str, password: str, email: str)\n +save_image(image: Image)\n +upload_image(image: Image)\n +comment_on_image(image: Image, comment: str)\n +like_image(image: Image)\n }\n class Image{\n +str url\n +str title\n +str description\n +User uploader\n +list[Comment] comments\n +list[Like] likes\n +__init__(url: str, title: str, description: str, uploader: User)\n +add_comment(comment: Comment)\n +add_like(like: Like)\n }\n class Comment{\n +User author\n +str text\n +Image image\n +__init__(author: User, text: str, image: Image)\n }\n class Like{\n +User user\n +Image image\n +__init__(user: User, image: Image)\n }\n User "1" -- "*" Image: saves, uploads\n User "1" -- "*" Comment: writes\n User "1" -- "*" Like: makes\n Image "1" -- "*" Comment: has\n Image "1" -- "*" Like: has\n', 'Program call flow': 'sequenceDiagram\n participant U as User\n participant I as Image\n participant C as Comment\n participant L as Like\n U->>I: save_image(image)\n U->>I: upload_image(image)\n U->>C: comment_on_image(image, comment)\n U->>L: like_image(image)\n I->>C: add_comment(comment)\n I->>L: add_like(like)\n', 'Anything UNCLEAR': 'The requirement is clear to me.'} +2023-09-12 03:31:27.417 | WARNING | metagpt.utils.mermaid:mermaid_to_file:31 - RUN `npm install -g @mermaid-js/mermaid-cli` to install mmdc +2023-09-12 03:31:27.418 | INFO | metagpt.actions.design_api:_save_prd:110 - Saving PRD to /mnt/disks/disk-1/users/kingh/Gothub/repos/orders/TevqufGVq0X7QF8fZ01lPR2Kyol1_QcqxVhD5KKOH7ejGZhok/target_repo/workspace/architects_inspiration/docs/prd.md +2023-09-12 03:31:27.419 | WARNING | metagpt.utils.mermaid:mermaid_to_file:31 - RUN `npm install -g @mermaid-js/mermaid-cli` to install mmdc +2023-09-12 03:31:27.421 | WARNING | metagpt.utils.mermaid:mermaid_to_file:31 - RUN `npm install -g @mermaid-js/mermaid-cli` to install mmdc +2023-09-12 03:31:27.421 | INFO | metagpt.actions.design_api:_save_system_design:119 - Saving System Designs to /mnt/disks/disk-1/users/kingh/Gothub/repos/orders/TevqufGVq0X7QF8fZ01lPR2Kyol1_QcqxVhD5KKOH7ejGZhok/target_repo/workspace/architects_inspiration/docs/system_design.md diff --git a/models.py b/models.py new file mode 100644 index 0000000..b6934b4 --- /dev/null +++ b/models.py @@ -0,0 +1,20 @@ +from django.db import models +from django.contrib.auth.models import User + +class Board(models.Model): + name = models.CharField(max_length=100) + user = models.ForeignKey(User, on_delete=models.CASCADE) + +class Pin(models.Model): + image = models.ImageField(upload_to='pins/') + description = models.TextField() + board = models.ForeignKey(Board, on_delete=models.CASCADE) + +class Comment(models.Model): + text = models.TextField() + user = models.ForeignKey(User, on_delete=models.CASCADE) + pin = models.ForeignKey(Pin, on_delete=models.CASCADE) + +class Follow(models.Model): + follower = models.ForeignKey(User, related_name='following', on_delete=models.CASCADE) + followee = models.ForeignKey(User, related_name='followers', on_delete=models.CASCADE) diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..f881e78 --- /dev/null +++ b/run.sh @@ -0,0 +1,17 @@ +# Create a virtual environment +python3 -m venv env + +# Activate the virtual environment +source env/bin/activate + +# Install Django +pip install Django + +# Navigate to the project directory +cd architecturesite + +# Apply migrations +python manage.py migrate + +# Run the server +python manage.py runserver diff --git a/settings.py b/settings.py new file mode 100644 index 0000000..8970ad7 --- /dev/null +++ b/settings.py @@ -0,0 +1,82 @@ +import os +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + +SECRET_KEY = 'your-secret-key' + +DEBUG = True + +ALLOWED_HOSTS = [] + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'website', +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'architecturesite.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'architecturesite.wsgi.application' + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + +STATIC_URL = '/static/' diff --git a/urls.py b/urls.py new file mode 100644 index 0000000..e363c34 --- /dev/null +++ b/urls.py @@ -0,0 +1,7 @@ +from django.contrib import admin +from django.urls import path, include + +urlpatterns = [ + path('admin/', admin.site.urls), + path('', include('website.urls')), +] diff --git a/views.py b/views.py new file mode 100644 index 0000000..c948ffe --- /dev/null +++ b/views.py @@ -0,0 +1,22 @@ +from django.shortcuts import render +from .models import Board, Pin, Comment, Follow + +def home(request): + boards = Board.objects.all() + return render(request, 'home.html', {'boards': boards}) + +def board_detail(request, board_id): + board = Board.objects.get(id=board_id) + return render(request, 'board_detail.html', {'board': board}) + +def pin_detail(request, pin_id): + pin = Pin.objects.get(id=pin_id) + return render(request, 'pin_detail.html', {'pin': pin}) + +def comment_detail(request, comment_id): + comment = Comment.objects.get(id=comment_id) + return render(request, 'comment_detail.html', {'comment': comment}) + +def follow_detail(request, follow_id): + follow = Follow.objects.get(id=follow_id) + return render(request, 'follow_detail.html', {'follow': follow}) diff --git a/workspace/architects_inspiration/docs/prd.md b/workspace/architects_inspiration/docs/prd.md new file mode 100644 index 0000000..b8392fe --- /dev/null +++ b/workspace/architects_inspiration/docs/prd.md @@ -0,0 +1,76 @@ +## Original Requirements +The boss has requested for the design of a content website for architects. The website should be similar to Pinterest with images generated by AIGC. The code for the website should be written by an engineer. + +## Product Goals +```python +[ + "Create a user-friendly content website for architects", + "Incorporate AIGC-generated images into the website", + "Ensure the website is similar in functionality and design to Pinterest" +] +``` + +## User Stories +```python +[ + "As an architect, I want to browse through a variety of AIGC-generated images to find inspiration for my projects", + "As a user, I want to be able to save images I like to my personal board for future reference", + "As a user, I want to be able to search for specific types of architectural designs", + "As a user, I want to be able to upload my own images and share them with the community", + "As a user, I want to interact with other users by commenting on and liking their posts" +] +``` + +## Competitive Analysis +```python +[ + "Pinterest: A well-known platform for sharing and discovering new ideas. It has a user-friendly interface and a large user base, but it doesn't focus specifically on architecture", + "ArchDaily: A website dedicated to architecture, but it lacks the social and interactive aspects of Pinterest", + "Houzz: A platform for home renovation and design, providing a unique blend of products, pros, and inspiration. However, it's more focused on interior design than architecture", + "Dwell: A platform for discovering modern architecture and design, but it doesn't allow users to upload their own content", + "Architizer: A platform for architects to showcase their work, but it lacks the user-friendly interface of Pinterest", + "Designboom: An online architecture magazine, but it doesn't have the interactive features of a social platform", + "Archinect: A platform for architects to connect and share their work, but it doesn't have the visual appeal of Pinterest" +] +``` + +## Competitive Quadrant Chart +```mermaid +quadrantChart + title Reach and engagement of campaigns + x-axis Low Reach --> High Reach + y-axis Low Engagement --> High Engagement + quadrant-1 We should expand + quadrant-2 Need to promote + quadrant-3 Re-evaluate + quadrant-4 May be improved + "Pinterest": [0.9, 0.8] + "ArchDaily": [0.7, 0.5] + "Houzz": [0.8, 0.6] + "Dwell": [0.6, 0.4] + "Architizer": [0.5, 0.3] + "Designboom": [0.4, 0.2] + "Archinect": [0.3, 0.1] + "Our Target Product": [0.5, 0.6] +``` + +## Requirement Analysis +The product should be a content website for architects, similar to Pinterest. It should allow users to browse, save, and upload images, as well as interact with other users. The images on the website should be generated by AIGC. + +## Requirement Pool +```python +[ + ("Implement a user-friendly interface similar to Pinterest", "P0"), + ("Incorporate AIGC-generated images into the website", "P0"), + ("Allow users to save images to their personal board", "P0"), + ("Include a search function for users to find specific types of architectural designs", "P1"), + ("Enable users to upload their own images and share them with the community", "P1"), + ("Include interactive features for users to comment on and like posts", "P2") +] +``` + +## UI Design draft +The website should have a clean, minimalist design with a focus on the images. The homepage should display a grid of images, with options to filter and sort them. Each image should have a button to save it to the user's personal board. There should also be a search bar at the top of the page for users to find specific types of designs. The user's personal board and uploaded images should be accessible from a menu bar at the top of the page. + +## Anything UNCLEAR +There are no unclear points. \ No newline at end of file diff --git a/workspace/architects_inspiration/docs/system_design.md b/workspace/architects_inspiration/docs/system_design.md new file mode 100644 index 0000000..0441705 --- /dev/null +++ b/workspace/architects_inspiration/docs/system_design.md @@ -0,0 +1,96 @@ +## Implementation approach +The website will be built using the Django framework due to its robustness and scalability. Django has a user-friendly admin interface which can be used for managing the content of the website. For the front-end, we will use Bootstrap to achieve a responsive and user-friendly interface similar to Pinterest. + +To incorporate AIGC-generated images, we will use an open-source AI image generation library such as DeepArt or DeepDream. These images will be stored in a PostgreSQL database due to its excellent performance with large datasets. + +For user interactions such as saving images, commenting, and liking posts, we will use Django's built-in authentication and authorization modules. + +The search functionality will be implemented using Elasticsearch, an open-source search engine that provides a distributed, multitenant-capable full-text search engine with an HTTP web interface and schema-free JSON documents. + +## Python package name +```python +"architects_inspiration" +``` + +## File list +```python +[ + "main.py", + "settings.py", + "urls.py", + "models.py", + "views.py", + "forms.py", + "templates/home.html", + "templates/board.html", + "templates/search.html", + "templates/upload.html", + "static/css/main.css", + "static/js/main.js", + "requirements.txt" +] +``` + +## Data structures and interface definitions +```mermaid +classDiagram + class User{ + +str username + +str password + +str email + +list[Image] saved_images + +list[Image] uploaded_images + +list[Comment] comments + +list[Like] likes + +__init__(username: str, password: str, email: str) + +save_image(image: Image) + +upload_image(image: Image) + +comment_on_image(image: Image, comment: str) + +like_image(image: Image) + } + class Image{ + +str url + +str title + +str description + +User uploader + +list[Comment] comments + +list[Like] likes + +__init__(url: str, title: str, description: str, uploader: User) + +add_comment(comment: Comment) + +add_like(like: Like) + } + class Comment{ + +User author + +str text + +Image image + +__init__(author: User, text: str, image: Image) + } + class Like{ + +User user + +Image image + +__init__(user: User, image: Image) + } + User "1" -- "*" Image: saves, uploads + User "1" -- "*" Comment: writes + User "1" -- "*" Like: makes + Image "1" -- "*" Comment: has + Image "1" -- "*" Like: has +``` + +## Program call flow +```mermaid +sequenceDiagram + participant U as User + participant I as Image + participant C as Comment + participant L as Like + U->>I: save_image(image) + U->>I: upload_image(image) + U->>C: comment_on_image(image, comment) + U->>L: like_image(image) + I->>C: add_comment(comment) + I->>L: add_like(like) +``` + +## Anything UNCLEAR +The requirement is clear to me. \ No newline at end of file diff --git a/workspace/architects_inspiration/resources/competitive_analysis.mmd b/workspace/architects_inspiration/resources/competitive_analysis.mmd new file mode 100644 index 0000000..95dd03c --- /dev/null +++ b/workspace/architects_inspiration/resources/competitive_analysis.mmd @@ -0,0 +1,16 @@ +quadrantChart + title Reach and engagement of campaigns + x-axis Low Reach --> High Reach + y-axis Low Engagement --> High Engagement + quadrant-1 We should expand + quadrant-2 Need to promote + quadrant-3 Re-evaluate + quadrant-4 May be improved + "Pinterest": [0.9, 0.8] + "ArchDaily": [0.7, 0.5] + "Houzz": [0.8, 0.6] + "Dwell": [0.6, 0.4] + "Architizer": [0.5, 0.3] + "Designboom": [0.4, 0.2] + "Archinect": [0.3, 0.1] + "Our Target Product": [0.5, 0.6] diff --git a/workspace/architects_inspiration/resources/data_api_design.mmd b/workspace/architects_inspiration/resources/data_api_design.mmd new file mode 100644 index 0000000..2c50399 --- /dev/null +++ b/workspace/architects_inspiration/resources/data_api_design.mmd @@ -0,0 +1,42 @@ +classDiagram + class User{ + +str username + +str password + +str email + +list[Image] saved_images + +list[Image] uploaded_images + +list[Comment] comments + +list[Like] likes + +__init__(username: str, password: str, email: str) + +save_image(image: Image) + +upload_image(image: Image) + +comment_on_image(image: Image, comment: str) + +like_image(image: Image) + } + class Image{ + +str url + +str title + +str description + +User uploader + +list[Comment] comments + +list[Like] likes + +__init__(url: str, title: str, description: str, uploader: User) + +add_comment(comment: Comment) + +add_like(like: Like) + } + class Comment{ + +User author + +str text + +Image image + +__init__(author: User, text: str, image: Image) + } + class Like{ + +User user + +Image image + +__init__(user: User, image: Image) + } + User "1" -- "*" Image: saves, uploads + User "1" -- "*" Comment: writes + User "1" -- "*" Like: makes + Image "1" -- "*" Comment: has + Image "1" -- "*" Like: has diff --git a/workspace/architects_inspiration/resources/seq_flow.mmd b/workspace/architects_inspiration/resources/seq_flow.mmd new file mode 100644 index 0000000..4bb0f86 --- /dev/null +++ b/workspace/architects_inspiration/resources/seq_flow.mmd @@ -0,0 +1,11 @@ +sequenceDiagram + participant U as User + participant I as Image + participant C as Comment + participant L as Like + U->>I: save_image(image) + U->>I: upload_image(image) + U->>C: comment_on_image(image, comment) + U->>L: like_image(image) + I->>C: add_comment(comment) + I->>L: add_like(like) diff --git a/wsgi.py b/wsgi.py new file mode 100644 index 0000000..5e08312 --- /dev/null +++ b/wsgi.py @@ -0,0 +1,6 @@ +import os +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'architecturesite.settings') + +application = get_wsgi_application()