Skip to content

Project Setup

Suvansh Rana edited this page May 24, 2020 · 12 revisions

Run the following commands to run developer-search on your system.

  • Fork the dev branch of this repository.

  • Clone your forked repository: git clone <url-of-your-forked-repo.git>

  • Switch to the cloned project directory: cd developer-search

  • Install the requirements for python: pip install -r requirements.txt

  • Create a .env file in the root directory of the project.

  • Generate a secret key for your clone of this Django project here.

  • Copy the generated secret key to .env file in the following format: SECRET_KEY=<your-generated-secret-key-here>.

  • Now for the Google Custom search to work you need to set up a Google custom search engine.

    • Go to cse.google.com.
    • Click Add to create a new custom search engine.
    • Add google.com in Sites to Search input field.
    • Give a name to your search engine and click Create.
    • Then go to to Edit Search Engine > Setup section and do the following changes.
      • Image Search: OFF
      • SafeSearch: ON
      • Search the entire web: ON
      • In Restrict Pages using Knowledge Graph Entities section add Computer Science, Software Developer, Programming Language, Software Engineer, Computer Programming.
    • From this page copy Search Engine ID.
    • Copy the search engine ID to .env file in the following format: CSE_KEY=<your-search-engine-id-here>
    • Now for the API keys, go here.
    • Click on Get a key button.
    • From the Search or create project select Create a new project.
    • Type a name for your project and click Next.
    • Copy the API key shown to you.
    • Copy the API key to .env file in the following format: API_KEY=<your-api-key-here>
    • Woah ! We have setup the google custom search for our project.
  • Now for the final touches go back to the directory in the terminal where you cloned the project.

  • Migrate : python manage.py migrate

  • Runserver: python manage.py runserver

  • Open the search: open http://localhost:8000 in your browser

  • Done! you have successfully set up the project.

  • Once you have set up the project, then you can start making changes and committing them to your forked repository.

  • If you think your changes are suitable enough to be merged in the main repository, you can submit a pull request.


Clone this wiki locally