207 questions
-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 ...
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 ...
1
vote
1
answer
133
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
464
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 ...
1
vote
1
answer
358
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 ...
2
votes
0
answers
674
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
486
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 ...
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/...
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 ...
-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 ...
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: ...
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 ...
0
votes
1
answer
906
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/...
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
0
answers
514
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 ...
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
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....
0
votes
0
answers
839
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
716
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 {% ...
0
votes
1
answer
825
views
How to only create .pot files with django manage.py makemessages
Weblate has an add-on called "Update PO files to match POT (msgmerge)". I want to delegate the creation of .po files to Weblate and only use manage.py makemessages to create the .pot file(s)....
1
vote
1
answer
3k
views
what is the difference between os.environ.setdefault() vs os.environ.putenv()
It is my understanding that both are supposed to set environmental variables. But toggling between these two in django's manage.py file leads to different outcomes.
>>> help(os.environ.putenv)...
4
votes
4
answers
2k
views
Why it shows Unknown command: 'collectstatic', when I try to collect-static
I am trying to deploy my Django project on Digital Ocean. I created my droplet and spaces on Digital Ocean and created a static folder to store my static files. I pulled my code from my github-repo. ...
1
vote
2
answers
7k
views
ImportError : Couldn't import Django
I have installed django==3.1.4 and activated Venv on my windows machine and it works fine in myBlog project. But today when I try to run the server, got this error
ImportError: Couldn't import Django....
0
votes
1
answer
648
views
Django's 'python manage.py runserver' does not create a local website I can access
I am trying to follow this online class, and I am stuck on the part where I access a local website made by django. The tutorial that I follow is this one by freecodecamp, and I get stuck by the 11min ...
-1
votes
1
answer
886
views
Django project run manage.py results in no module named django
I was working on a django project served as a backend for a small personal site, the built-in localhost server by django runs smoothly until I accidentally removed the app execution alias of python in ...
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 ...
1
vote
1
answer
1k
views
Azure Web App - Python: can't open file 'manage.py': [Errno 0] No error
I am trying to deploy my Django application with Azure DevOps as a Azure Web App. The application is pipelined and build to the web app but it will not run.
When I am trying to run py manage.py ...
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 ...
0
votes
1
answer
157
views
Initial migrations after cloning repo - "related model cannot be resolved"
I'm working with a few people on an app. I'm doing front end.
Recently, I've messed up migrations. After trying to fix them for a few hours, I've dropped all tables, and cloned the repo again.
Since ...
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 ...
0
votes
1
answer
93
views
module 'hello_world' not found while running the manage.py runserver in django
My site is hosted at centos 7, lamp stack, whm/cpanel.
I created a virtual environment mp_env and installed python3.7 and Django in mp_env.
This mp_env is created in the same folder where we have ...
0
votes
1
answer
64
views
On Windows 10 Django is not installing properly under the project folder - unable to find manage.py
I am a new developer. I'm following instructions from to Django for Beginners book.
When I run
C:\Users\User\Desktop\HelloWorld>pipenv install django~=3.1.0
The message I got:
Installation ...
0
votes
2
answers
363
views
Why do I get conflicts while creating new Django app
tn_gram_backend is the main Django project folder.
I created a new folder staging and inside that I am trying to create another Django app called ddc but it is throwing me the following error as show ...
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?
-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 ...
0
votes
1
answer
2k
views
Cannot fix django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet
I run the following line of code on a Docker container:
RUN python3 manage.py sitetree_resync_apps --settings=sites.production.settings
and I get the following error:
Traceback (most recent call last)...
0
votes
2
answers
1k
views
python3 manage.py runserver does not work without specifying the localhost
Earlier when I executed,
python3 manage.py runserver
It used to start the server at my localhost http://127.0.0.1:8000/
but somehow it isnt doing so now, when I type it in now and press enter, ...
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
votes
1
answer
411
views
not showing the server address while using python manage.py runserver in django
while running python manage.py runserver , getting this error as given below. using pycharm
(venv) C:\Users\User\PycharmProjects\PyShop>python manage.py runserver
Watching for file changes with ...