Python Django Static Files Setup



Python Django Static Files Setup

Use this at top of settings.py

import os

Add / update in TEMPLATES

os.path.join(BASE_DIR, 'templates')

Create public/static directory at project root where manage.py file is located.

Add below to settings.py

STATIC_ROOT = os.path.join(BASE_DIR, 'public/static')
STATIC_URL = '/static/'

MEDIA_ROOT = os.path.join(BASE_DIR, 'public/media')
MEDIA_URL = '/media/'

and

python manage.py collectstatic

Posted in Technical Solutions on Jul 05, 2022



AliTech is now verified by Apple ®

Posted in About Hosting by AliTech, News on Sep 20, 2020

Now Alitech is verified with Apple. Support team is available via iMessage 24/7.



Mastering WooCommerce SEO: A Complete Guide to Optimize Your Online Store

Posted on Dec 05, 2024

Discover the ultimate guide to WooCommerce SEO and learn how to optimize your online store for better visibility, increased traffic, and higher sales with proven strategies and tools



Is Microsoft Using Your Word Documents to Train AI?

Posted in News on Nov 27, 2024

Microsoft is facing allegations of using Word and Excel user data to train its AI models through a default-enabled feature called "Connected Experiences." While the company denies these claims, citing privacy safeguards, critics argue that the convoluted opt-out process and vague terms of service raise ethical concerns. This controversy highlights the tension between advancing AI technology and protecting user privacy, urging companies to adopt clearer policies and transparent communication.



[Tips] Change Python Django Superuser password

Posted in Technical Solutions on May 06, 2022

[Tips] Change Python Django Superuser password



[SOLVED / FIXED] DataError: (1406, "Data too long for column 'name' at row 1")

Posted in Technical Solutions on Sep 14, 2022

DataError: (1406, "Data too long for column 'name' at row 1") Error: DataError: (1406, "Data too long for column 'name' at row 1") Problem Statement: When creating a Slug in Django Model with Slugify this error populates. Solution:



US Election Results 2024: LIVE Updates on Trump's Lead in Key States

Posted in News on Nov 06, 2024

The 2024 US presidential election is becoming one of the most closely watched races in history. With former President Donald Trump facing Vice President Kamala Harris, early results indicate a tight race, especially in key battleground states. As the night unfolds, Trump leads in traditionally Republican states, but the outcome remains uncertain, with Nevada, North Carolina, and Georgia all still too close to call. Voters are anxiously awaiting final results, and Pennsylvania's outcome could very well determine the next president. Stay tuned for live updates on the election results and key developments.



CES 2025: Everything You Need to Know About the Biggest Tech Show

Posted in News on Jan 03, 2025

CES 2025 is set to unveil groundbreaking innovations in technology, from AI advancements to the latest in electric vehicles and smart home devices. Industry leaders like Nvidia and AMD are expected to showcase their newest GPU technologies, while startups present revolutionary solutions for the future. This year, sustainability and AI-powered gadgets take center stage, offering a glimpse into the future of tech. Whether it's the next-gen display technologies, autonomous systems, or wellness trackers, CES 2025 promises to be a hub of excitement and new ideas that could redefine how we live and interact with technology.



[SOLVED / FIXED] Kubesphere request to http //ks-apiserver/oauth/token failed

Posted in Technical Solutions on Jul 17, 2022

[SOLVED / FIXED] Kubesphere request to http //ks-apiserver/oauth/token failed



Unbeatable Prices and Performance: HostingbyAliTech's Cloud Hosting

Posted in Hosting Promotions on Jun 07, 2024

HostingbyAliTech offers low-cost cloud web hosting with optimized performance using CyberPanel and LiteSpeed, making it the top choice for quality and speed-conscious clients since 2020.



Meet Autumn 2024 Alibaba Cloud MVPs: A Spotlight on Farhan Ali Shah

Posted in News on Oct 01, 2024

The Autumn 2024 Alibaba Cloud MVP Program proudly welcomes a group of talented professionals, including Farhan Ali Shah, Director at AliTech Solutions. This article highlights their achievements and contributions to the cloud computing community. Alibaba Cloud MVPs are recognized for their expertise and commitment to sharing knowledge, playing a crucial role in driving digital transformation and innovation. Join us as we celebrate these leaders who are shaping the future of technology through their dedication and passion for cloud solutions.



CES 2025: Samsung’s AI Robot Ballie Ready to Roll in 2025

Posted in News on Jan 07, 2025

Samsung’s AI-powered robot Ballie, a bright yellow rolling companion, is set to transform smart home technology in 2025. First introduced as a concept in 2020, Ballie combines cutting-edge AI personalization, advanced sensors, and seamless integration with smart home systems. Equipped with a built-in projector and Vision AI, it tailors its functions to suit individual lifestyles. From entertaining with movies and games to controlling devices through voice commands, Ballie acts as a versatile and interactive home assistant. Its official release marks a significant milestone in AI-driven living, offering a glimpse into the future of smarter, more connected homes.



WordPress Cofounder Asks Court to Dismiss WP Engine’s Lawsuit

Posted in News on Nov 01, 2024

WordPress cofounder Matt Mullenweg, along with Automattic, has moved to dismiss a lawsuit filed by WP Engine that alleges defamation, extortion, and trademark infringement. WP Engine’s claims arise from Mullenweg’s criticism of the company’s contributions to WordPress and his decision to restrict its access to WordPress.org resources. Mullenweg counters that WP Engine has no legal right to these resources, describing the company’s reliance on WordPress.org as a “risky decision” made without a backup plan. This high-stakes case has stirred concerns within the WordPress community about the implications for other developers and businesses relying on the platform’s open-source ecosystem.



How to Install Python Django 4.0 on Windows 10 or Windows 11

Posted on Jan 20, 2022

How to Install Python Django 4.0 on Windows 10 or Windows 11 This tutorial explains how to Install Django on Windows 10 or Windows 11.



[SOLVED] MySQL / MariaDB Specified key was too long; max key length is 767 bytes

Posted in Technical Solutions on Jan 07, 2022

[SOLVED] MySQL / MariaDB Specified key was too long; max key length is 767 bytes Error : mariadb specified key was too long. Specified key was too long; max key length is 767 bytes.



General Motors (GM) Lays Off Over 1,000 Salaried Software, Services Employees

Posted in News on Aug 20, 2024

General Motors (GM) has announced the layoff of over 1,000 salaried employees from its software and services divisions, signaling a major shift in its strategic focus. The cuts, affecting both domestic and international positions, come as GM aims to streamline operations and prioritize high-impact projects such as enhancing its Super Cruise driver assistance system and exploring artificial intelligence. This move follows a review after the departure of former executive Mike Abbott and reflects GM's broader push towards innovation in the rapidly evolving automotive sector.



IBM Develops AI Agents to Automate Software Engineering Tasks

Posted in News on Nov 08, 2024

Get ready to revolutionize software development with AI! IBM's latest innovation uses AI agents to automate tasks, improve code quality, and streamline development. Discover how AI-driven software development can transform industries and change the game



Realme 13+ 5G Launched Today in Pakistan

Posted in News on Nov 18, 2024

The Realme 13+ 5G has officially launched in Pakistan, bringing an impressive array of features tailored for gamers, photography enthusiasts, and tech-savvy users. With the latest Dimensity 7300 Energy 5G chipset, a massive 26GB dynamic RAM, and a stunning 120Hz OLED display, this smartphone redefines performance and user experience. Its 50MP Sony LYT-600 OIS camera ensures professional-quality photography, while the 80W SUPERVOOC Charge provides unparalleled convenience for on-the-go lifestyles. Available from November 25th for PKR 89,999, the Realme 13+ 5G is set to be a game-changer in the mid-range smartphone market.



[SOLVED / FIXED] mysqlclient ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Posted on Jun 09, 2022

[SOLVED / FIXED] mysqlclient ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.




Other Blogs


AliTech is now verified by Apple ®

Posted in About Hosting by AliTech, News on Sep 20, 2020 and updated on Mar 30, 2022

Mastering WooCommerce SEO: A Complete Guide to Optimize Your Online Store

Posted on Dec 05, 2024 and updated on Dec 05, 2024

Is Microsoft Using Your Word Documents to Train AI?

Posted in News on Nov 27, 2024 and updated on Nov 27, 2024

[Tips] Change Python Django Superuser password

Posted in Technical Solutions on May 06, 2022 and updated on May 07, 2022

US Election Results 2024: LIVE Updates on Trump's Lead in Key States

Posted in News on Nov 06, 2024 and updated on Nov 06, 2024

CES 2025: Everything You Need to Know About the Biggest Tech Show

Posted in News on Jan 03, 2025 and updated on Jan 03, 2025

Unbeatable Prices and Performance: HostingbyAliTech's Cloud Hosting

Posted in Hosting Promotions on Jun 07, 2024 and updated on Jun 07, 2024

Meet Autumn 2024 Alibaba Cloud MVPs: A Spotlight on Farhan Ali Shah

Posted in News on Oct 01, 2024 and updated on Oct 01, 2024

CES 2025: Samsung’s AI Robot Ballie Ready to Roll in 2025

Posted in News on Jan 07, 2025 and updated on Jan 07, 2025

WordPress Cofounder Asks Court to Dismiss WP Engine’s Lawsuit

Posted in News on Nov 01, 2024 and updated on Nov 01, 2024

How to Install Python Django 4.0 on Windows 10 or Windows 11

Posted on Jan 20, 2022 and updated on Mar 17, 2022

General Motors (GM) Lays Off Over 1,000 Salaried Software, Services Employees

Posted in News on Aug 20, 2024 and updated on Aug 20, 2024

IBM Develops AI Agents to Automate Software Engineering Tasks

Posted in News on Nov 08, 2024 and updated on Nov 08, 2024

Realme 13+ 5G Launched Today in Pakistan

Posted in News on Nov 18, 2024 and updated on Nov 18, 2024







Comments

Please sign in to comment!






Subscribe To Our Newsletter

Stay in touch with us to get latest news and discount coupons