Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move blog app into apps #35

Merged
merged 14 commits into from
Oct 5, 2024
Prev Previous commit
Next Next commit
added fileds to serializers
  • Loading branch information
JohananOppongAmoateng committed Oct 4, 2024
commit 3d3de61758aab55c337229a180a065d96a4df4d8
2 changes: 1 addition & 1 deletion apps/blog/serializers/category_serializer.py
Original file line number Diff line number Diff line change
@@ -4,4 +4,4 @@
class CategorySerializer(serializers.ModelSerializer):
class Meta:
model = Category
fields = '__all__'
fields = ["name"]
2 changes: 1 addition & 1 deletion apps/blog/serializers/image_serializer.py
Original file line number Diff line number Diff line change
@@ -4,4 +4,4 @@
class ImageSerializer(serializers.ModelSerializer):
class Meta:
model = Image
fields = '__all__'
fields = ["image_file", "uploaded_at", "blog_post"]
2 changes: 1 addition & 1 deletion apps/blog/tasks.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from celery import shared_task
from .models import Image
from apps.blog.models.image import Image

@shared_task
def handle_image_upload(image_id):