kepatotorica / firstdjangoproject Goto Github PK
View Code? Open in Web Editor NEWthis will be a very basic social media site, it is practice for the one I am building for my research at RIT
this will be a very basic social media site, it is practice for the one I am building for my research at RIT
To get this project running after downloading it follow these steps: if you get stuck during installation this site has great instructions: https://djangobook.com/installing-django/ ==========INITIAL SETUP============ 1: Install python version 3.6.5: https://www.python.org/downloads/ if you just want to copy paste from this point type the following: ---word of warning, you will need to press enter several times, without prompting if it appears nothing is happeneing just press enter for the first thing you copy paste 1. python -m venv venv; source venv/Scripts/activate; pip install -r requirements.txt ---be careful when choosing the credintials for the admin, it will be used for your access to the admin section of the website 2. rm db.sqlite3; find user/migrations/ -type f -not -name '__init__.py' -print0 | xargs -0 rm --; python manage.py makemigrations user; python manage.py migrate; python manage.py createsuperuser; python manage.py runserver 2: Install a python virtual environment in the root of the project, then also add the projects requirements: https://docs.python.org/3.6/library/venv.html#module-venv i. python -m venv venv ii. source venv/Scripts/activate (start your virtual enviromnet. Do this anytime you want to run this project) iii. pip install -r requirements.txt (press enter whenever the download gets to 100%) 4: From the root of the project (in the firstDjangoWebsite folder) (short-cut to step 4) in console paste: rm db.sqlite3; find user/migrations/ -type f -not -name '__init__.py' -print0 | xargs -0 rm --; python manage.py makemigrations user; python manage.py migrate; python manage.py createsuperuser; python manage.py runserver i. delete db.sqlite3 ii. delete everything in the folder firstDjangoWebsite/user/migrations except for __init__.py iii. int the console from the root directory type in the following a. python manage.py makemigrations user b. python manage.py migrate c. python manage.py createsuperuser i. for this fill in what ever you want. It will give you access to the admin side of the site reachable now by typing localhost:8000/admin note that the 8000 after localhost may change depending on how you set everything up, but when you run the project the number will be shown in the console. d. python manage.py runserver i. in the console you will see: "Starting development server at http://127.0.0.1:XXXX/" the url shown will go in the address bar of your chosen web browser to access your website. The ip address can be replaced with localhost. eg. localhost:XXXX. iiii. Type in the localhost:(your_port_numbr) to access the site in your browser of choice =======EVERYTIME YOU DO WORK======= 1. cd to root folder of the project 2. git pull; source venv/Scripts/activate; pip install -r requirements.txt 3. do any work that you need to do i. if you change the database a. python manage.py makemigrations (name_of_changed_app) b. python manage.py migrate 4. test it: python manage.py runserver 5. if you are done working: i. pip freeze > requirements.txt ii. deactivate iii. git commit -am "changes" iiii. git push =========TODO========= Things that we need to do, feel free to add to this: -Photo uploading, in the social media sense -privacy managment of each photo -a browse view that will show all photos you have the ability to see -Implementation of sessions -user privacy settings -ability to have a friend -use relational mapping -this will be difficult given the way django handles forms. =====TROUBLE SHOOTING===== if you have any database errors text the shortcut from above to solve them, here it is again if you missed it: rm db.sqlite3; find user/migrations/ -type f -not -name '__init__.py' -print0 | xargs -0 rm --; python manage.py makemigrations user; python manage.py migrate; python manage.py createsuperuser; python manage.py runserver
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.