Coder Social home page Coder Social logo

badrihippo / sawaliram Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sawaliram/sawaliram

0.0 2.0 0.0 48.29 MB

Online repository for the Sawaliram platform

License: GNU General Public License v3.0

Python 36.86% CSS 12.40% JavaScript 10.54% HTML 40.20%

sawaliram's Introduction

Sawaliram

Sawaliram is an online respository of questions asked by school students, collected from across India and answered by experts. The questions are collected with the aim of providing credible answers, fostering curiosity among students of all ages and analysing the questions to gain insights into Indian students' interests and motivations. The project is collaborative between TIFR (Tata Institute of Fundamental Research) Centre for Interdisciplinary Sciences (TCIS), Hyderabad and Eklavya, an NGO based in Bhopal, Madhya Pradesh, which traces its origins to the 'Hoshangabad Science Teaching Program' of 1972-2002.

Apart from the questions and their answers, the web platform will host blog posts, research papers and other resources (like links to relevant books and online media) related to education, pedagogy, questioning and related topics. The website aims to become an invaluable resource to students, teachers, parents, researchers, curriculum designers and other stakeholders.

Setting up your development environment

To find help with the setup procedure and to discuss all things related to the development, join our Zulip server.

1. Install an environment manager
It is recommended to use an environment management tool like virtualenv to easily manage the project's requirements and avoid any conflicts with your system packages. If you are using virtualenv, run these commands to set up a development environment:

$ cd into/your/project/folder
$ virtualenv -p python3 env
$ source env/bin/activate

This will activate an empty virtual environment. You can use deactivate to exit the environment.

2. Fork the project
Click on the 'Fork' button on the top right corner of this page to create a 'copy' of this project for yourself, on your GitHub profile. You will keep this fork updated with the 'upstream' repository, the one you're at now. You will also create branches on your own fork before sending a Pull Request to the upstream repo.

3. Set up a git repository for your system
Run these commands to set up a local git repository and populate with the code you just forked:

$ mkdir code
$ cd code
$ git init
$ git remote add upstream https://github.com/sawaliram/sawaliram.git
$ git remote add origin https://github.com/your-username/sawaliram.git
$ git pull origin master

At this point, your project folder will have an env directory for your virtual environment, and a code directory for your code.

4. Install dependencies
In the root folder (where the requirements.txt file is), run this command to install all dependencies:

$ pip install -r requirements.txt

5. Initialize the database
The project uses PostgreSQL as its database. If you haven't set up a PostgreSQL server on your system, follow this or this resource to set it up. Once you have your database up and running, apply the migrations for the data models by running the following command in the root directory:

$ python manage.py migrate

6. Add environment variables to your shell
The project reads some values for configuring the project from the local environment variables. To permanently add variables to the shell environment, add these lines to the .bash_profile file in your home directory (for Linux and MacOS users):

export sawaliram_secret_key='some_string_without_spaces'
export sawaliram_debug_value='True'
export sawaliram_db_password='your-database-password'
export environment='dev'

export GOOGLE_SECRET_KEY='set-this-from-GoogleRecaptcha-site'
export GOOGLE_SITE_KEY='set-this-from-GoogleRecaptcha-site'

To generate a secret key, you can use the Django's built-in get_random_secret_key() function:

from django.core.management.utils import get_random_secret_key
print(get_random_secret_key())

After saving the file, make sure you run $ source .bash_profile to save the changes to your existing bash session. The instructions for Windows might be different.

7. Run scripts to finish the setup
To perform the remaining updation or configuration, run these commands:

$ python manage.py createusergroups
$ python manage.py createsubmissionsfolder

8. Run the test server
To test your setup and to make sure everything is working as expected, run the test server from the root directory (where you can find the manage.py file):

python manage.py runserver

Visit localhost:8000 in your browser to see the Sawaliram homepage in all it's glory!

You are now ready to write some code! Begin by reading our contributing guide to help you get started!

Minification instructions

These instructions are about minification of static files such as html, css , js etc. We are using django-compressor.

To minify run these commands:

To minify on the production server run this

python manage.py compress

And to test it in local server run this:

python manage.py compress --force

We are passing --force argument to test it in local server as by default the Offline compression is disabled.

sawaliram's People

Contributors

abhiprojectz avatar badrihippo avatar dchandrika-tifr avatar dependabot[bot] avatar hitarths avatar jr-sawaliram avatar nitinpaultifr avatar petermorgandev avatar rsvarma95 avatar sshashank18 avatar subindevs avatar tannucheria avatar ukey54 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.