207 questions
-2
votes
2
answers
13k
views
Why "Error: That port is already in use." [duplicate]
Yes obviously I run the command:
killall -9 python
But not working again same error
Error: That port is already in use.
Well, I can also use other port like 8001 instead of 8000 and BOOM!, but ...
-1
votes
1
answer
49
views
Django project -createsuperuser Doesnt work [closed]
I am facing an issue while creating my superuser using the following command: ./manage.py createsuperuser, it seems that there is no error but the line where í can set my email and password doesnt ...
1
vote
1
answer
52
views
Django's manage.py dumpdata adds free text to each file
I am trying to move Django data from SQLite to Postgres, following this flow:
SQLite connection in settings.py
manage.py dumpdata > data.json
Postgres connection in settings.py
manage.py loaddata ...
6
votes
3
answers
3k
views
Running Django custom manage.py task on Heroku - Importing Issues
I'm trying to run a custom django command as a scheduled task on Heroku. I am able to execute the custom command locally via: python manage.py send_daily_email. (note: I do NOT have any problems with ...
0
votes
1
answer
44
views
django - how to distinguish if code in AppConfig is run by manage.py or by http server
I customized AppConfig in django to start some processes needed for the main application as described in the django documentation.
In the usual initialization process, the ready method is only called ...
9
votes
2
answers
5k
views
Why do I get an SQLite syntax error when I run a migration?
I create a user model for my Django REST framework. python manage.py makemigrations functions but when I run a migration I get:
return Database.Cursor.execute(self, query) django.db.utils....
4
votes
9
answers
16k
views
TypeError: translation() got an unexpected keyword argument 'codeset'
I'm following a Python tutorial on youtube and need to create a django website, however I am unable to start, because when I enter "python manage.py runserver" I get the "TypeError: ...
244
votes
19
answers
397k
views
How to change the Django default runserver port?
I would like to make the default port that manage.py runserver listens on specifiable in an extraneous config.ini. Is there an easier fix than parsing sys.argv inside manage.py and inserting the ...
2
votes
1
answer
3k
views
Docker and Django manage.py
I'm trying to find a workflow with Docker and Django. Currently, I'm using the basic configuration from the docker documentation.
I'd like to use manage.py startapp directly from the container to ...
1
vote
1
answer
138
views
Upgrading Django from 3.2 LTS to Django 5.04 causes typeerror: requires_system_checks must be a list or tuple
I just upgraded Django from 3.2 LTS to the latest Django 5.0.4 and updated all packages as on a need basis and I get the following trace after I attempt to run the docker-compose to start my api web ...
0
votes
1
answer
45
views
I have been trying to runserver for my code but I keep getting this error
I'm trying to create a website using django but each time I runserver i keep getting this error message:
TemplateDoesNotExist at /
base.html
Request Method: GET
Request URL: http://127.0.0.1:8000/
...
2
votes
2
answers
183
views
Django - is there a way to shuffle and run only a subset of tests?
We are using Django with tests. We have in total about 6,000 tests which take about 40 minutes to run. Is there a way to shuffle the tests and run only 200 (randomly chosen) tests? This should be done ...
0
votes
0
answers
211
views
Django: Unknown command: 'collectstatic' when using call_command
I have a Django project with "django.contrib.staticfiles" in INSTALLED_APPS. Therefore, I can run ./manage.py collectstatic. But I need to use call_command.
Running python -c 'from django....
1
vote
1
answer
465
views
Django manage.py makemigrations: Show differences between model and database
I occasionally run into a problem where manage.py makemigrations will generate migrations that, as far as I can tell, concern models or model fields I didn't touch.
Is there any way to find out what ...
0
votes
2
answers
2k
views
Django, runserver issues (windows)
I've been looking for the solution everywhere.
I tries to execute "python manage.py runserver" command, but all I received is an error: stack trace.
I have a virtualenv activated, which is ...
1
vote
1
answer
359
views
Visual Studio Django - Freezes on python manage.py createsuperuser
So, I'm new to Django and am using Visual Studio 2022 with Python 3.12 (which is apparently not fully supported by Visual Studio).
When I start a fresh Django web app project, it prompts for me to ...
4
votes
3
answers
4k
views
Running "manage.py compilemessages" in Dockerfile gives "django.db.utils.OperationalError: could not connect to server: No such file or directory"
I have a repo with a django project and want to create a Docker image from it. I also don't want to store any compiled files in git so I try to automate creation of all the artifacts during the Docker ...
2
votes
0
answers
677
views
manage.py runserver: error: unrecognized arguments: --insecure
while running server make run facing this error
I checked for available solution,like- checked debug setting in 'settings.py' file. I tried to kill redis and celery but didn't worked.
Anyone can ...
0
votes
1
answer
487
views
Error when using manage.py loaddata to load Django JSON file created with dumpdata
I am using ./manage.py loaddata file.json to load a JSON file created with ./manage.py dumpdata > ../directory/file.json, and I get the following error:
matching_chars: 6 ...
0
votes
2
answers
2k
views
from django.core.management import execute_from_command_line not working
I am working on a bug project. Which is on Python 2.7, we are migrating to Python 3.9. I am getting import errors in manage.py during importfrom django.core.management import execute_from_command_line....
1
vote
3
answers
698
views
Django REST Framework making a request to itself
I have a question that might have a very simple answer.
Everywhere I look it says that the Django development server (manage.py runserver) is multithreaded (https://docs.djangoproject.com/en/3.2/ref/...
1
vote
3
answers
921
views
Sending a lockfile to django-post_office send_queued_mail
This doesn't seem like it should be hard, but I'm stumped. I've gotten django-post_office integrated with my codebase, and now I'm trying to test that I can set up cron jobs for queued email as ...
2
votes
1
answer
1k
views
Django on AWS Elastic Beanstalk manage.py
I followed the below documentation and installed django on AWS Elastic Beanstalk.
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Python_django.html
Now I started writing my first ...
14
votes
14
answers
60k
views
cannot open manage.py after installing django
I have a problem in setting up django.
My situation: I have Anaconda Python 2.7 in my Windows 8 computer. On the Anaconda command prompt window, I type: pip install django. This is successful.
Then ...
0
votes
1
answer
907
views
django-main-thread error when running manage.py runserver
I've made some changes to my code while trying to deploy my django app on digital ocean, and now when I try to test my code in my local server, I get this error:
(my_chaburah) ~/Desktop/Code/...
0
votes
0
answers
22
views
Update front-end when delete a row in database in React native
I am new with Django and I trying to run my first project. But i keep getting this error when trying to run python .\manage.py makemigrations
enter image description here
I am not sure what is the ...
0
votes
2
answers
530
views
Electron Problem runing manage.py runserver
I'm developing a web app, but just yesterday when i try to run manage.py wiht runserver appeared to me this error "(electron) Sending uncompressed crash reports is deprecated and will be removed ...
-1
votes
1
answer
503
views
manage.py runserver python not found
I'm trying to learn django and I'm almost completely new to python, I'm using pycharm btw.
My problem is that when i try to type
python manage.py runserver
in the PyCharm terminal it just tells me ...
-1
votes
1
answer
52
views
creating an admin user using django [closed]
I was creating an admin user account, when it got to create password my keys stopped working!!I even rebooted my system and started from top boom it happened again
tried to create password on django ...
0
votes
4
answers
3k
views
Running Django development server from Git Bash gets stuck in windows 10
I'm new to Django and now getting stuck in running up the server. I've installed the following components on Windows 10:
Python 3.7.0
Django 1.11.14
Geckodriver 0.21.0
I can successfully create a ...
0
votes
1
answer
599
views
Django Shell Command Does Not Execute For Loop
I have a Django project going on, containing some functions and creating/updating a database. From time to time, I need to update the staticfiles in the project therefore I created a .py file in the ...
1
vote
0
answers
47
views
Why are we reassigning self.prog_name in the ManagementUtility class?
This is the code snippet in the django that I'm tryin to parse.
1
vote
1
answer
382
views
run a cloned repository for django project
Traceback (most recent call last):
File "/home/cand/Python_Project/Data Science Github/gitando/django-simples/manage.py", line 10, in main
from django.core.management import ...
0
votes
0
answers
35
views
Problems with manage.py in django
I am attempting to run a site from my localhost. What I did is I first cloned the repo and pull it into my local directory. Then, I changed the DB part to my DB settings. I have tried python manage.py ...
0
votes
2
answers
787
views
When running my django project in python3 manage.py run server i get this error ModuleNotFoundError: No module named 'pip._vendor.urllib3.connection'
After i run python3 manage.py runserver i get the following error:
Traceback (most recent call last):
File "manage.py", line 11, in main
from django.core.management import ...
13
votes
7
answers
18k
views
How to execute code in the Django shell by an external python script?
What I want to achieve:
I would like to create a python script to deactivate Django users in the database from the CLI. I came up with this:
$ sudo python manage.py shell
>>> user = User....
7
votes
3
answers
2k
views
django-extensions - Get manage.py shell_plus to save history?
I'm using django-extensions shell_plus command, but it doesn't save the command history (i.e., ↑ does nothing). Any ideas how to fix this?
1
vote
2
answers
2k
views
django: I accidentally deleted the manage.py file. how to recover it?
I accidentally deleted the manage.py file with vim nerdtree. apparently, there isn't a way to recover it I I don't know what to do.
can I somehow create a new one or restore it?
0
votes
0
answers
515
views
python3 manage.py makemigrations not working
I can successfully run git clone 'my repository'
I can run 'pip3 install -r requirements.txt'; from the correct directory 'server'
When I run the command 'python3 manage.py makemigrations'; nothing ...
7
votes
5
answers
6k
views
Django migrations - django.db.migrations.exceptions.NodeNotFoundError
I get the following error when I run any python manage.py function:
raise NodeNotFoundError(self.error_message, self.key, origin=self.origin)
django.db.migrations.exceptions.NodeNotFoundError: ...
3
votes
1
answer
4k
views
DeprecationWarning: Using or importing the ABCs from 'collections' instead of fr om 'collections.abc' is deprecated, and in 3.8 it will stop working
I downloaded a code from github and trying to run it as it is by running command in git bash: python manage.py runserver
But I am experiencing this error:
DeprecationWarning: Using or importing the ...
1
vote
3
answers
2k
views
python manage.py makemigrations says table already exists in Django project
I am trying to get a coworker of mine up and running with a project I have already created. When we try to run the server it says one of the tables already exists. We googled it and tried to ...
0
votes
0
answers
258
views
django 4.0.4 ./manage working, however when using the management command 'runserver', an error is returned
A peculiar thing is happening with my Django Manage script.
No changes have been made since yesterday, however 'runserver' stopped working, and returns:
ValueError: illegal environment variable name
...
0
votes
1
answer
2k
views
TypeError: module() takes at most 2 arguments (3 given) Django manage.py runserver [duplicate]
I tried running
manage.py runserver
manage.py makemigrations
and manage.py migrate
but they all give me a TypeError
The error is
Traceback (most recent call last):
File "/Users/William/...
0
votes
1
answer
295
views
Django App works on PyCharm by not VS-code (File manage.py line 17 error)
I have a Django App that works well in PyCharm. All modules etc work.
I need, however, to open the code in Visual Studio Code.
However, when I execute a:
python manage.py runserver
command in visual ...
0
votes
1
answer
2k
views
localhost: A server error occurred. Please contact the administrator
I am learning to run local hosts using Django with the help of https://www.dj4e.com/. I am currently trying to run the local server using the following:
python manage.py runserver
When I run this, ...
0
votes
0
answers
840
views
I write the full python venv path to be able to run manage.py
I have a problem in the virtual environment with django manage.py
I use git bash terminal. and when I activate my venve like this :
source explorer/Scripts/activate
I successfully activate the ...
0
votes
1
answer
717
views
Django makemessages fails both with django-admin and manage.py
I have a fresh Django project with no third-party apps installed. I'm trying to create a multilingual setup, with from django.utils.translation import gettext_lazy as _ in my Python files and {% ...
3
votes
3
answers
1k
views
Run DJango server from outside of virtual environment by using script
I have created DJango Project inside virtual environment.
Let's say virtual environment DJangoProject project name is Mysite
I am tired of running ./manage.py runserver everytime so that I wanted to ...
1
vote
3
answers
9k
views
Syntax error in "manage.py" file - django 2
I do not understand what the problem is but I keep getting a syntax error for the "from exc" line even though I did not alter the code. I have checked for un-closed parentheses and quotes and ...