Bring project from Github to Replit and access it via localhost

Question:

How can i upload my Django project from github and then use it here as localhost?

1)I created a new project, then i’ve chosen Python as the language.
2)I made a clone from GitHub of the project
3)I entered the directory of my project and then did “pip install -r requirements.txt” to install the requirements of my project
4)I changed my database on settings to sqlite3 and then did “python manage.py migrate” to create my tables
5)I used “python manage.py runserver” and the server started to run but when i open any browser on the localhost the project does not run.
Am i missing something?

Welcome to the community, @tiagoadel!
Replit does not run on localhost, but on a repl.co domain, or a replit.app domain if you are using a deployment. To access this domain, just press the “Open In New Tab” button in the webview tab.

1 Like

I tried it. It says not found. Any configurations that I have to do on Replit to put it running correctly ?

Hey, @tiagoadel !

Can you please provide a link to the repl? This way it is easier for staff and members of the community to help you!

Also see this guide on how to share your code:

1 Like

Hello there. Here’s the link:

https://replit.com/@tiagoadel/ResponsiblePointedDominspector

Thanks in advance

Hi @tiagoadel !
Your repl appears to be private or deleted.
If it is private, could you make it public?
Thanks!

Done. Forgot to do that when i shared the link.

Hi @tiagoadel !
Try changing your .replit file from

run = "python3 manage.py runserver"

To:

run = "manage.py"

Then, to run your repl, just click ‘Run’.
[1]


  1. Replit doesn’t need that runserver command to run the program, the Run button will do. ↩︎

Hi @tiagoadel !
Have you tried my suggestion and see if it works?

Hello @NateDhaliwal i managed to put it working just now. Edited my .replit file to:
run = “python Showoff/manage.py runserver 0.0.0.0:3000” because the .replit file was not in the location off the “Showoff” project.

1 Like

Hi @tiagoadel , you can mark your post as a Solution since it solved the issue.

image

No but it needs that python3 command.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.