The
i get that error when i run python mange.py runserver
what might be the issue
AleMVP
chicos que programa es bueno para hacer modelo de datos, hojala free?
The
Exception in thread django-main-thread:
Traceback (most recent call last):
File "C:\ProgramData\Miniconda3\lib\threading.py", line 932, in _bootstrap_inner
self.run()
File "C:\ProgramData\Miniconda3\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "C:\ProgramData\Miniconda3\lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "C:\ProgramData\Miniconda3\lib\site-packages\django\core\management\commands\runserver.py", line 118, in inner_run
self.check(display_num_errors=True)
File "C:\ProgramData\Miniconda3\lib\site-packages\django\core\management\base.py", line 419, in check
all_issues = checks.run_checks(
File "C:\ProgramData\Miniconda3\lib\site-packages\django\core\checks\registry.py", line 76, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "C:\ProgramData\Miniconda3\lib\site-packages\django\core\checks\urls.py", line 40, in check_url_namespaces_unique
all_namespaces = _load_all_namespaces(resolver)
File "C:\ProgramData\Miniconda3\lib\site-packages\django\core\checks\urls.py", line 57, in _load_all_namespaces
url_patterns = getattr(resolver, 'url_patterns', [])
File "C:\ProgramData\Miniconda3\lib\site-packages\django\utils\functional.py", line 48, in get
res = instance.__dict__[self.name] = self.func(instance)
File "C:\ProgramData\Miniconda3\lib\site-packages\django\urls\resolvers.py", line 598, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "C:\ProgramData\Miniconda3\lib\site-packages\django\utils\functional.py", line 48, in get
res = instance.__dict__[self.name] = self.func(instance)
File "C:\ProgramData\Miniconda3\lib\site-packages\django\urls\resolvers.py", line 591, in urlconf_module
return import_module(self.urlconf_name)
File "C:\ProgramData\Miniconda3\lib\importlib\__init__.py", line 127, in import_module
The
Exception in thread django-main-thread:
Traceback (most recent call last):
File "C:\ProgramData\Miniconda3\lib\threading.py", line 932, in _bootstrap_inner
self.run()
File "C:\ProgramData\Miniconda3\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "C:\ProgramData\Miniconda3\lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "C:\ProgramData\Miniconda3\lib\site-packages\django\core\management\commands\runserver.py", line 118, in inner_run
self.check(display_num_errors=True)
File "C:\ProgramData\Miniconda3\lib\site-packages\django\core\management\base.py", line 419, in check
all_issues = checks.run_checks(
File "C:\ProgramData\Miniconda3\lib\site-packages\django\core\checks\registry.py", line 76, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "C:\ProgramData\Miniconda3\lib\site-packages\django\core\checks\urls.py", line 40, in check_url_namespaces_unique
all_namespaces = _load_all_namespaces(resolver)
File "C:\ProgramData\Miniconda3\lib\site-packages\django\core\checks\urls.py", line 57, in _load_all_namespaces
url_patterns = getattr(resolver, 'url_patterns', [])
File "C:\ProgramData\Miniconda3\lib\site-packages\django\utils\functional.py", line 48, in get
res = instance.__dict__[self.name] = self.func(instance)
File "C:\ProgramData\Miniconda3\lib\site-packages\django\urls\resolvers.py", line 598, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "C:\ProgramData\Miniconda3\lib\site-packages\django\utils\functional.py", line 48, in get
res = instance.__dict__[self.name] = self.func(instance)
File "C:\ProgramData\Miniconda3\lib\site-packages\django\urls\resolvers.py", line 591, in urlconf_module
return import_module(self.urlconf_name)
File "C:\ProgramData\Miniconda3\lib\importlib\__init__.py", line 127, in import_module
This is an error i get on running python manage.py runserver
The
I can't tell where I'm going wrong ..anyone who knows where the problem is
Anonymous
Aniesh
someone help me (non_field_errors“: [”Invalid data. Expected a dictionary, but got InMemoryUploadedFile."])
Aniesh
Anonymous
is there any way to change a row in a table and if an error has been generated in process return changes?
Anonymous
did transaction solved my problem?
Anonymous
Anonymous
Aniesh
Who know about drf please help
sheikh
How to remove single user from group in channels?
Asad
hi there, i'm working with timefield in admin panel and django time fields is uncomfortable. it offers Now, Midnight, Noon keywords. how can i change that, how can i change them to detailed timedeltas?
Pavel
Hi. I have url
re_path(r"a/(<int:pk>/)?", MyListView.as_view())
How to add pk in browser url if it wasn't passed?
I mean to convert "a/" to "a/10/" for example
Dispatch of MyListView has this logic
if 'pk' in kwargs:
self.a = A.objects.get(pk=kwargs['pk'])
else:
self.a = A.objects.last()
return super().dispatch(request, *args, **kwargs)
-
Any good django project suggestions?
Mirco
Pavel
Ok. I'll pop pk to not to confuse u with listView
Pavel
But it doesn't solve my question
Pavel
Solve it with redirect
Pavel
last pk
Ankit
hey please help, my webpage is working fine but i can not save new task in the field
Ankit
from django.shortcuts import render, redirect
from django.http import HttpResponse
from todolist_app.models import Tasklist
from todolist_app.form import TaskForm
def todolist(request):
if request.method == "POST":
search_form = TaskForm(request.POST, request.FILES)
if search_form.is_valid():
cd = search_form.cleaned_data
search_form.save()
else:
all_tasks = Tasklist.objects.all()
return render(request,'todolist.html', {'all_tasks':all_tasks})
def contact(request):
context = {
'welcome_contact': "Hey, Welcome to contact page",
}
return render(request,'contact.html',context)
def about(request):
context = {
'welcome_about': "Hey, Welcome to about page",
}
return render(request, 'about.html', context)
Complex_101
I added Amazon rds using postgres in my django website and deployed on heroku. Now when I run the website on local host it gives and error that -
django.db.utils.OperationalError: fe_sendauth: no password supplied
It has something to do with the psycopg2? How should I resolve this?
Mirco
from django.shortcuts import render, redirect
from django.http import HttpResponse
from todolist_app.models import Tasklist
from todolist_app.form import TaskForm
def todolist(request):
if request.method == "POST":
search_form = TaskForm(request.POST, request.FILES)
if search_form.is_valid():
cd = search_form.cleaned_data
search_form.save()
else:
all_tasks = Tasklist.objects.all()
return render(request,'todolist.html', {'all_tasks':all_tasks})
def contact(request):
context = {
'welcome_contact': "Hey, Welcome to contact page",
}
return render(request,'contact.html',context)
def about(request):
context = {
'welcome_about': "Hey, Welcome to about page",
}
return render(request, 'about.html', context)
!paste
Doragonsureiyā
from django.shortcuts import render, redirect
from django.http import HttpResponse
from todolist_app.models import Tasklist
from todolist_app.form import TaskForm
def todolist(request):
if request.method == "POST":
search_form = TaskForm(request.POST, request.FILES)
if search_form.is_valid():
cd = search_form.cleaned_data
search_form.save()
else:
all_tasks = Tasklist.objects.all()
return render(request,'todolist.html', {'all_tasks':all_tasks})
def contact(request):
context = {
'welcome_contact': "Hey, Welcome to contact page",
}
return render(request,'contact.html',context)
def about(request):
context = {
'welcome_about': "Hey, Welcome to about page",
}
return render(request, 'about.html', context)
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like:
- https://del.dog
- https://dpaste.org
- https://linkode.org
- https://hastebin.com
- https://bin.kv2.dev
If you posted a wall of text, go back and delete it.
Ankit
https://del.dog/pegecrykux
Ashish
Hey all, can we clone a website? Is it legal??
Ankit
it is illegal. You cannot duplicate copyrighted elements such as images, text, or source code and logo.
Sopan
But out of curiocity - what do you want to copy?
Anonymous
Ashish
I want to make a clone of Amazon, Netflix apps
Ghorz
Sopan
Sopan
That's madness
Ghorz
Ashish
Asad
Sopan
Yes
May be check for free courses online + check projects on github.com ... you can learn more things there
Ashish
Ankit
Ashish you can take ideas of looks and fancy things but you can not build exactly same. do some changes when copying
Anonymous
Ashish
Ankit
you can use same navigation bars but do some changes in colors and styling.
Ankit
etc etc
Ashish
But if I changed all color schemes and elements then it doesn't look like amazon
Ankit
yes and this is how patent/copyright works
Ankit
nobody can steal your ideas and hardwork so easily lol
Ashish
I just add it in my portfolio I am not use that app for business purposes
Ankit
https://del.dog/pegecrykux
Ankit
help me to resolve error pls. i'm new to django and now learning how to save data in database. i'm getting error in save() attribute
Artem
Can't display data from database to html dropdown list. What am I doing wrong?
<div class="form__input">
<select name='department_name' class="form-select" aria-label="Default select example">
{% for item in query_results %}
<option>{{ item.department_name }}</option>
{% endfor %}
</select>
</div>
views.py
def index(request):
query_results = Department.objects.all()
context = {'query_results': query_results,}
return render(request,'passage/registration.html', context)
Artem
William
Dev
! [remote rejected] master -> master (pre-receive hook declined)
Dev
File "/app/.heroku/python/lib/python3.9/distutils/util.py", line 9, in <module>
remote: import importlib.util
remote: ModuleNotFoundError: No module named 'importlib.util'
Dev
how to solve thi eroor
Ankit
Artem
write it where??
when you create a database model in models.py you should add that
Mo
hi, when i want to connect django rest api with mongodb by both mongoengine and djongo methods this error appears: what is the solution: raise ImproperlyConfigured("Missing MONGODB_DATABASES in settings.py")
django.core.exceptions.ImproperlyConfigured: Missing MONGODB_DATABASES in settings.py
William
William
Artem
Artem
Are you using bootstrap?
But in other fields in html I also use name parameter and there I'm using database column name. In this case it doesn't work
William
Null Boy
Hi . I deployed my django project on server with aapanel .
I proxed the domain over 8080 and IP 127.0.0.1 .
Everything works fine when I run the project in the terminal with
python manage.py runserver 0.0.0.0:8080
But when I run the project with Apache and gunicorn mode, it does not recognize the static and media folder .
SERVER OS : Centos 7
Admin panel : aapanel
Web server : apache
Use ssl : Yes
I went to Google for Apache configuration solutions but got no answer
Mounted
Hello everyone!
need help with django infinite scrolling. Couldn't make HTML scrolling table. Maybe someone has examples?
Red