{"id":26399716,"url":"https://github.com/wuiiigithub/django-social","last_synced_at":"2025-03-17T13:31:42.087Z","repository":{"id":219766680,"uuid":"749863626","full_name":"WuiiiGithub/django-social","owner":"WuiiiGithub","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-16T17:28:12.000Z","size":255,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-07-16T21:30:09.991Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WuiiiGithub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-29T14:51:21.000Z","updated_at":"2024-07-16T17:28:15.000Z","dependencies_parsed_at":"2024-07-16T21:23:04.124Z","dependency_job_id":null,"html_url":"https://github.com/WuiiiGithub/django-social","commit_stats":null,"previous_names":["adam04github/django-social","wuiiigithub/django-social"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WuiiiGithub%2Fdjango-social","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WuiiiGithub%2Fdjango-social/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WuiiiGithub%2Fdjango-social/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WuiiiGithub%2Fdjango-social/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WuiiiGithub","download_url":"https://codeload.github.com/WuiiiGithub/django-social/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244041446,"owners_count":20388241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-17T13:31:08.213Z","updated_at":"2025-03-17T13:31:42.073Z","avatar_url":"https://github.com/WuiiiGithub.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# django-social\n## Introduction\nThis is a repository which while trying to develop a webpage using a python framework called Django. I tried to make a simple webpage which is like blog page. And didn't focus much on UI as its not for commercial purpose. I like something to contribute to the open source community. I like keeping few codes for free. So, I just thought let me post it so that anybody will find it helpfull and continue from here. Let's continue how to use this.\n## Setup\nYou need these python3 packages wtih pip on your device to work with this.\n- django\n- django_crispy_forms\n- crispy_bootstrap4\n- django-bootstrap4\n- whitenoise\n- Pillow\n\nThese were the packages which I had to download while working on it. If you are a unix user and had already downloaded python and pip in your device then copy and paste this in terminal:\n```\npip install django\ndjango_crispy_forms\npip install crispy_bootstrap4\npip install django-bootstrap4\npip install whitenoise\npip install Pillow\n```\n## Essential Django Commands:\n\n### Project Management:\n\n- `django-admin startproject \u003cproject_name\u003e`: Creates a new Django project structure.\n- `python manage.py runserver`: Starts the development server locally for testing and debugging.\n- `python manage.py createsuperuser`: Creates a superuser account for administration.\n- `python manage.py collectstatic`: Collects static files from various app directories into a single location.\n- `python manage.py startapp \u003capp_name\u003e`: Creates a new Django app within your project.\n- `python manage.py check`: Runs various checks for potential errors or warnings in your project.\n- `python manage.py help [command]`: Gets help on a specific command's usage.\n\n### Database Management:\n\n- `python manage.py makemigrations`: Creates migration files to reflect model changes in your database.\n- `python manage.py migrate`: Applies pending migrations to your database.\n- `python manage.py sqlmigrate \u003capp_name\u003e [migration_id]`: Generates raw SQL for a specific migration.\n- `python manage.py shell`: Opens an interactive Python shell within your project environment.\n- `python manage.py loaddata \u003cfixture_file\u003e`: Loads initial data from fixture files into your database.\n- `python manage.py flush`: It deletes all the entries (data) from your tables, leaving the table structure (columns and names) intact.\n\n### Data Management:\n\n- `python manage.py dumpdata \u003capp_name\u003e [model_name] \u003e \u003cfixture_file\u003e`: Creates fixture files from existing data.\n- `python manage.py customcommand [args]`: Creates and runs custom management commands for specific tasks.\n- `python manage.py clearsessions`: Removes all session data from the database.\n\n### Development Tools:\n\n- `python manage.py test [app_name] [test_pattern]`: Runs unit tests for your project or app.\n- `python manage.py coverage`: Measures code coverage using Django's test runner.\n\n### Deployment:\n\n- `python manage.py gunicorn`: Starts your project using the Gunicorn web server (more suitable for production).\n- `python manage.py collectstatic [--no-postprocess]`: Collects static files for deployment.\n- `python manage.py compress`: Compresses static files for better performance.\n- `python manage.py freeze \u003e requirements.txt`: Creates a requirements.txt file listing project dependencies.\n- `python manage.py startapp myapp --template=project_template`: Uses a custom project template for rapid development.\n\n### Miscellaneous:\n\n- `python manage.py startproject \u003cproject_name\u003e`: Creates a new Django project in the current directory.\n- `python manage.py startapp \u003capp_name\u003e`: Creates a new Django app in the current directory.\n- `python manage.py runserver [port number]`: Starts the development server with a different address and port.\n- `python manage.py runserver --settings=myproject.settings.dev`: Uses a specific settings file.\n- `python manage.py shell --basic`: Starts a shell without loading models or apps.\n## More information\n### Routes\nHere are the links which might help you to atleast kinda know what is happening and get a big picture about the functionality of the project.\n- `http://localhost:8000/admin/`: This is for admin(8000 or your port number)\n- `http://localhost:8000/blog/`: For blogs\n- `http://localhost:8000/register/`: For signup page or register page\n- `http://localhost:8000/profile/`: For profile viewing and changes\n- `http://localhost:8000/login`: For logging in the site\n- `http://localhost:8000/logout`: Logout page (Currently making issues in newer version of django)\n- `http://localhost:8000/blog/post/create`: Can create your own new post.\n- `http://localhost:8000/blog/post/\u003cpost_number\u003e`: Post detailed view\n- `http://localhost:8000/blog/post/\u003cpost_number\u003e/update`: Update the already existing post\n- `http://localhost:8000/blog/post/\u003cpost_number\u003e/delete`: Delete the post.\n### Ideas for further development\nYou can do many things like:\n- Use nodejs, reactjs, js, bootstrap, css and html to enhance look and interactivity\n- Using other databases for large implementation\n- Adding different features and customization\n\n# Conclusion\nIf you have a basic understanding of django then this might be very helpfull to you. If you are at the start and love making a site then you might need a tutorial to understand django and get some handson experience and then look at this repository. **Note: Don't forget to flush the database using the following commands.**\n```\npython manage.py flush\npython manage.py makemigrations\npython manage.py migrate\n```\n\nThank you for reading this\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwuiiigithub%2Fdjango-social","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwuiiigithub%2Fdjango-social","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwuiiigithub%2Fdjango-social/lists"}