from django.core.management.base import BaseCommand from case_studies.models import CaseStudyCategory, Client, CaseStudy, CaseStudyImage, CaseStudyProcess from django.utils import timezone from datetime import timedelta class Command(BaseCommand): help = 'Populate database with sample case study data' def handle(self, *args, **options): self.stdout.write(self.style.SUCCESS('Starting to populate case study data...')) # Clear existing data CaseStudyProcess.objects.all().delete() CaseStudyImage.objects.all().delete() CaseStudy.objects.all().delete() Client.objects.all().delete() CaseStudyCategory.objects.all().delete() # Create Categories categories_data = [ { 'name': '3D Render', 'slug': '3d-render', 'description': '3D rendering and visualization projects', 'display_order': 1 }, { 'name': 'UI / UX', 'slug': 'ui-ux', 'description': 'User interface and user experience design projects', 'display_order': 2 }, { 'name': 'Photography', 'slug': 'photography', 'description': 'Professional photography projects', 'display_order': 3 }, { 'name': 'AI', 'slug': 'ai', 'description': 'Artificial intelligence and machine learning projects', 'display_order': 4 }, { 'name': 'Icon Set', 'slug': 'icon-set', 'description': 'Custom icon set design projects', 'display_order': 5 }, { 'name': 'Road Map', 'slug': 'road-map', 'description': 'Product roadmap and planning projects', 'display_order': 6 } ] categories = {} for cat_data in categories_data: category = CaseStudyCategory.objects.create(**cat_data) categories[category.slug] = category self.stdout.write(f'Created category: {category.name}') # Create Clients clients_data = [ { 'name': 'Tarapio', 'slug': 'tarapio', 'description': 'Leading technology solutions provider', 'website': 'https://tarapio.com' }, { 'name': 'Melenpo', 'slug': 'melenpo', 'description': 'Digital innovation company', 'website': 'https://melenpo.com' }, { 'name': 'Polax', 'slug': 'polax', 'description': 'Enterprise software solutions', 'website': 'https://polax.com' }, { 'name': 'AINA', 'slug': 'aina', 'description': 'AI and automation solutions', 'website': 'https://aina.com' } ] clients = {} for client_data in clients_data: client = Client.objects.create(**client_data) clients[client.slug] = client self.stdout.write(f'Created client: {client.name}') # Create Case Studies case_studies_data = [ { 'title': '3D computer graphics, or "3D graphics', 'subtitle': 'Immersive 3D Visualization Experience', 'description': '''
A comprehensive 3D rendering project that showcases cutting-edge visualization techniques and photorealistic rendering capabilities. This project demonstrates our expertise in creating stunning visual content for modern digital platforms.
Our client needed high-quality 3D visualizations that could accurately represent their products in a digital environment. The challenge was to create renders that were not only photorealistic but also optimized for various platforms and use cases.
We employed advanced 3D modeling techniques combined with physically-based rendering (PBR) to achieve exceptional results. Our team utilized industry-standard tools and custom workflows to deliver renders that exceeded client expectations.
The project resulted in a collection of stunning 3D renders that significantly enhanced the client's digital presence. The visualizations led to increased customer engagement and improved conversion rates across their digital channels.
''', 'category': categories['3d-render'], 'client': None, 'thumbnail_url': '/images/case/two.png', 'poster_image_url': '/images/case/poster.png', 'project_image_url': '/images/case/project.png', 'project_overview': 'Lorem ipsum dolor sit amet consectetur. Vestibulum malesuada amet sagittis urna. Mattis eget ultricies est morbi velit ultrices viverra elit facilisi.', 'site_map_content': 'Lorem ipsum dolor sit amet consectetur. Vestibulum malesuada amet sagittis urna. Mattis eget ultricies est morbi velit ultrices viverra elit facilisi.', 'featured': True, 'display_order': 1, 'days_ago': 10 }, { 'title': 'Artificial intelligence is the simulation of human processes', 'subtitle': 'AI-Powered Business Solutions', 'description': '''This artificial intelligence project demonstrates the power of machine learning and AI in solving complex business problems. We developed custom AI models that automate decision-making processes and provide predictive insights.
The project utilizes state-of-the-art AI technologies including neural networks, natural language processing, and computer vision. Our solution is built on a scalable cloud infrastructure that can handle large volumes of data processing.
We worked closely with the client to understand their specific needs and challenges. The implementation phase involved data collection, model training, validation, and deployment to production environments.
The AI solution has transformed the client's operations, reducing manual work by 60% and improving accuracy in decision-making processes. The system continues to learn and improve over time, providing increasing value to the organization.
''', 'category': categories['ai'], 'client': clients['tarapio'], 'thumbnail_url': '/images/case/one.png', 'poster_image_url': '/images/case/poster.png', 'featured': True, 'display_order': 2, 'days_ago': 15 }, { 'title': 'User experience (UX) design is the process design teams', 'subtitle': 'Modern UX Design System', 'description': '''A comprehensive UX design project focused on creating intuitive and engaging user experiences. This case study showcases our approach to user-centered design and our ability to create interfaces that delight users.
We conducted extensive user research including interviews, surveys, and usability testing to understand user needs and pain points. This research formed the foundation of our design decisions.
Our design process involved creating user personas, journey maps, wireframes, and high-fidelity prototypes. Each step was validated with real users to ensure we were on the right track.
A stunning photography project that captures the essence of modern visual storytelling. This portfolio demonstrates our expertise in various photography styles and techniques.
The project incorporates multiple photography styles including product photography, portrait photography, and architectural photography. Each image is carefully composed and post-processed to achieve the desired aesthetic.
Using professional-grade equipment and advanced lighting techniques, we created images that stand out in quality and artistic vision.
''', 'category': categories['photography'], 'client': None, 'thumbnail_url': '/images/case/four.png', 'poster_image_url': '/images/case/poster.png', 'featured': False, 'display_order': 4, 'days_ago': 25 }, { 'title': 'UX case study for a medical app- medical product design', 'subtitle': 'Healthcare UX Innovation', 'description': '''Designing for healthcare requires special attention to accessibility, security, and user trust. This medical app design project showcases our expertise in creating intuitive interfaces for complex healthcare workflows.
The design adheres to HIPAA regulations and industry best practices for healthcare data security while maintaining an intuitive user experience.
We conducted extensive research with healthcare professionals and patients to ensure the design meets the needs of all stakeholders.
''', 'category': categories['ui-ux'], 'client': clients['polax'], 'thumbnail_url': '/images/case/five.png', 'poster_image_url': '/images/case/poster.png', 'featured': False, 'display_order': 5, 'days_ago': 30 }, { 'title': 'Make icon set for the educational project', 'subtitle': 'Custom Educational Icon Set', 'description': '''A comprehensive icon set designed specifically for educational platforms. This project demonstrates our ability to create cohesive, scalable, and meaningful iconography.
The icons follow consistent design principles including size, style, and metaphor. Each icon is designed to be instantly recognizable and appropriate for educational contexts.
The final deliverable includes icons in multiple formats (SVG, PNG) and sizes, along with comprehensive usage guidelines.
''', 'category': categories['icon-set'], 'client': None, 'thumbnail_url': '/images/case/six.png', 'poster_image_url': '/images/case/poster.png', 'featured': False, 'display_order': 6, 'days_ago': 35 }, { 'title': 'AI-driven user experience design process', 'subtitle': 'AI-Driven User Experience', 'description': '''This project combines artificial intelligence with user experience design to create adaptive interfaces that learn from user behavior and preferences.
The design incorporates machine learning algorithms that personalize the user experience based on individual usage patterns and preferences.
''', 'category': categories['ai'], 'client': clients['aina'], 'thumbnail_url': '/images/case/seven.png', 'poster_image_url': '/images/case/poster.png', 'featured': False, 'display_order': 7, 'days_ago': 40 }, { 'title': 'UX site rode map app product design system', 'subtitle': 'Product Roadmap Visualization', 'description': '''A comprehensive product roadmap visualization system that helps teams plan, communicate, and execute their product strategy effectively.
The roadmap system includes timeline views, milestone tracking, dependency mapping, and collaboration tools for distributed teams.
Built with modern web technologies and optimized for performance and usability across all devices and platforms.
''', 'category': categories['road-map'], 'client': None, 'thumbnail_url': '/images/case/eight.png', 'poster_image_url': '/images/case/poster.png', 'featured': False, 'display_order': 8, 'days_ago': 45 } ] # Create case studies created_case_studies = [] for cs_data in case_studies_data: days_ago = cs_data.pop('days_ago') case_study = CaseStudy.objects.create( **cs_data, published_at=timezone.now() - timedelta(days=days_ago) ) created_case_studies.append(case_study) # Add gallery images gallery_images = [ '/images/case/nine.png', '/images/case/ten.png', '/images/case/eleven.png', '/images/case/twelve.png' ] for idx, img_url in enumerate(gallery_images, 1): CaseStudyImage.objects.create( case_study=case_study, image_url=img_url, caption=f'Gallery Image {idx}', display_order=idx ) # Add process steps processes = [ {'step_number': 1, 'title': 'Computer Vision', 'description': 'Quisque varius malesuada dui, ut posuere purus gravida in. Phasellus ultricies ullamcorper mollis.'}, {'step_number': 2, 'title': 'Computer Vision', 'description': 'Quisque varius malesuada dui, ut posuere purus gravida in. Phasellus ultricies ullamcorper mollis.'}, {'step_number': 3, 'title': '3D Vision', 'description': 'Quisque varius malesuada dui, ut posuere purus gravida in. Phasellus ultricies ullamcorper mollis.'}, {'step_number': 4, 'title': 'Computer Vision', 'description': 'Quisque varius malesuada dui, ut posuere purus gravida in. Phasellus ultricies ullamcorper mollis.'}, {'step_number': 5, 'title': '3D Vision', 'description': 'Quisque varius malesuada dui, ut posuere purus gravida in. Phasellus ultricies ullamcorper mollis.'}, ] for process_data in processes: CaseStudyProcess.objects.create( case_study=case_study, **process_data ) self.stdout.write(f'Created case study: {case_study.title}') self.stdout.write(self.style.SUCCESS('\nSuccessfully populated case study data!')) self.stdout.write(f'Created {CaseStudyCategory.objects.count()} categories') self.stdout.write(f'Created {Client.objects.count()} clients') self.stdout.write(f'Created {CaseStudy.objects.count()} case studies') self.stdout.write(f'Created {CaseStudyImage.objects.count()} gallery images') self.stdout.write(f'Created {CaseStudyProcess.objects.count()} process steps')