david john
Try restarting your computer. I encountered a problem like that before, when the first time I installed python and django
Yash
david john
Dn this all already
Try to install django again.
If problem still persist check your PATH environment variable if python and python installed package in included in PATH
Yash
Tukhtamurod
Yash
Naol
Ok
did you just installed django, if so during that if cmd was opend reopen it
Yash
Yash
django-admin is not recognized as an internal or external command
Yash
This error i was getting when i was making my first project
Naol
is python in the environment variable path
Tukhtamurod
Yash
Tukhtamurod
Naol
Yash
Tukhtamurod
if it works django-admin should also work, to verify django is correctly installed, type python and in python shell type following:
import django
print(django.version)
Tukhtamurod
version
Yash
Yash
I think i need to uninstall python amd django again and should set both to same path
Naol
no uninstall just django
Naol
pip uninstall django
Tukhtamurod
Yash
Yash
A
Hey I'm trying to develop a web chat app in django ? Can anyone suggest me how it works ans how I should approach , I have been trying but couldn't get anywhere close to it. Any help would be appreciated.
Darth✧
Neeraj
Hello anyone have best Dajngo Book which complete basic + advance.
Sopan
Neeraj
Sopan
HAHAHA... then documentation at django project is best!
Ekky
Ekky
book can be obsolette, especialy framework book
Ekky
I think good dev is the one who can utilize docs for their work
Neeraj
Anonymous
hello am looking for a librarry for authintacation social accounts (special Twitter)to dev third party app and i found this https://django-allauth.readthedocs.io/en/latest/views.html but is old and i am not sure if it still supported or not...any ideas?
Tobi
Tobi
Hi, I'm having a really incomprehensible error currently. We are working with three models here, "DataImport", "Contact" and "Dataset", the DataImport model import data from a file to a Dataset object, the data is imported as a Contact object , the DataImport model have a foreign key to the Dataset model. This is how the app works:
- a user upload a file
- we convert the content of the file to a TablibDataset or TablibDatabook, these are tablib (python package) classes, don't worry too much about this, tablib have their own Dataset and I have my own, that's why I import the tablib classes with aliases
- if the loaded data is a TablibDataset, the import start and create contacts from the loaded data (this works)
- if the loaded_data is a TablibDatabook, the databook is split into multiple sheet (yes I'm working with excel files) and new Dataset (my model) and DataImport objects are created to handle the import for each sheet (here is the issue)
All import are done as async task using the django_q package
The issue I have is that, when I create a new dataset, start the import and try to add a new contact I get this:
insert or update on table "datasets_contact" violates foreign key constraint "datasets_contact_dataset_id_9dda7f76_fk_datasets_dataset_id"
DETAIL: Key (dataset_id)=(39) is not present in table "datasets_dataset".
It seems like the dataset is not save in db that's why I'm getting this error when I try to create a new contact, but I'm creating my Dataset object with Dataset.objects.create(), I don't understand the problem.
The code for all this is a bit long, so here is a gist with all the necessary code
https://gist.github.com/Tobi-De/411ee7b7fc988864869c8d7ad93ab34f
The method that create the Dataset and DataImpot objects is the class method "create_import_from_databook"
A
Hi folks,
I am looking for best resources to learn design patterns using python. Kindly, suggest me regarding the same
Anonymous
Anonymous
Anonymous
Hi, I'm having a really incomprehensible error currently. We are working with three models here, "DataImport", "Contact" and "Dataset", the DataImport model import data from a file to a Dataset object, the data is imported as a Contact object , the DataImport model have a foreign key to the Dataset model. This is how the app works:
- a user upload a file
- we convert the content of the file to a TablibDataset or TablibDatabook, these are tablib (python package) classes, don't worry too much about this, tablib have their own Dataset and I have my own, that's why I import the tablib classes with aliases
- if the loaded data is a TablibDataset, the import start and create contacts from the loaded data (this works)
- if the loaded_data is a TablibDatabook, the databook is split into multiple sheet (yes I'm working with excel files) and new Dataset (my model) and DataImport objects are created to handle the import for each sheet (here is the issue)
All import are done as async task using the django_q package
The issue I have is that, when I create a new dataset, start the import and try to add a new contact I get this:
insert or update on table "datasets_contact" violates foreign key constraint "datasets_contact_dataset_id_9dda7f76_fk_datasets_dataset_id"
DETAIL: Key (dataset_id)=(39) is not present in table "datasets_dataset".
It seems like the dataset is not save in db that's why I'm getting this error when I try to create a new contact, but I'm creating my Dataset object with Dataset.objects.create(), I don't understand the problem.
The code for all this is a bit long, so here is a gist with all the necessary code
https://gist.github.com/Tobi-De/411ee7b7fc988864869c8d7ad93ab34f
The method that create the Dataset and DataImpot objects is the class method "create_import_from_databook"
thanks but i read that is not suported for third party apps..
Anonymous
I used the APIVIEW and ModelSerializer but it didn't help
sainath
I am just started web development...I am interested to work with a web developer...so can anyone guide me
Danial
How to deploy the Django server to iis on Windows Server??
Daniil
Giridhar
Felipe
How can I implement NGINX to redirect ASGI requests to Daphne and WSGI requests to Gunicorn on Django ??? (my server is Heroku)
Bhashkar
Hi
Anyone can tell me what is diff between
Register. Filter(is_safe = True)
Register. Filter (is_safe=False)
Anonymous
Omair
Haleem
Please let me if there is a way to reflect the admin form styles to the views templates ??
Naol
use admin statics file in your templates
Sumit
HI, I want to send logo with tthe email. I am using html file as a template. I am using emailmultialternatives. But when i am sending it is send as an attachment but I want to diplay it at specified position inn the html file.
Sumit
hhelp me please.
Sumit
Sumit
use form.field_name.error in thhe template
Swapnil
MurMur
Faced such a problem when starting a local server on Django, nothing happens. Already pointed the way to manage.py
Sumit
@yashasvisingh91, Just type python -m pip install django
Yash
Sumit
Done with that
Are you using your cmd with administrative priviledge? if not , try with that
Yash
Yash
Using cmd
Yash
Tried powershell too
Yash
As well as vs code terminal
Sumit
open it as administrator
Sumit
open your cmd as administrator and then try
Yash
open it as administrator
After doing that when i press tab after writing the location it does not completes the path
Sumit
Sumit
Yash
Dont no
Sumit
whhat error it is giving
Sumit
send it here