Anonymous
Where should I mention app1?
Ismail
No! Sir
go to settings , in installed apps add your app name in list
Ismail
Okay! Tank you sir ...
you're welcome
Anonymous
you're welcome
Sir, same error!
Ismail
send Screenshot to my pv
78
Hi
Yyyyyy
Can we use python 3.9 in django
Hi, I have a question. In django group model, how can the user create a duplicate name for a group. Because when he try he got this: django.db.utils.IntegrityError: duplicate key value violates unique constraint "auth_group_name_key" How make it possible?
Anonymous
Hello everybody How do I pass data from DetailView to Createview
Anonymous
Explain
I have DetailView which has form context I want to pass the id to CreateView
sheikh
You need to define url for createview like 'student/<int:id>/ and in detailview template add edit update button and call this url by passing id
Hamidreza
hi, how can we use django orm in script? i want to run a python telegram bot outsite of django project and use django project database! how could do that?
Jd
Yes i will try
Sumit
Hi, i wanted to write signup views but getting error can anyone help me please
Sumit
/
Sumit
Is any online member free
Sumit
Reply
Dmitry
Hey there! I'm creating poll app, but not like in django tutorial. Question has three ways to answer - text, single option, multiple option. I created Question model, Choice model related to Question. How can I create Answer model depending on Question answer type? If question answer type text, answer should contain text, otherwise it should be single or multiple option from Choice
Amit
Hii everyone I m start learning Django restframework for api
Amit
When I add rest_framework in install app it's show no module name that even I install that why any help ??
Anonymous
Hey guys, is there a clear guide on how to deploy the project i made in django development into production on Apache server please? the django docs on that is not an easy one for me being beginner. Appreciate any help. Thanks.
AA
Hi everyone. When I go to admin panel with http://127.0.0.1:8000/admin/ the page is shown without css. I looked through similar questions in stackoverflow, but could not find the solution for my case. Can anyone help me?
Anonymous
Hi
Anonymous
Anyone know jQuery
AA
Hi everyone. When I go to admin panel with http://127.0.0.1:8000/admin/ the page is shown without css. I looked through similar questions in stackoverflow, but could not find the solution for my case. Can anyone help me?
my settings.py file TEMPLATE_DIR = os.path.join(BASE_DIR, 'templates') STATIC_DIR = os.path.join(BASE_DIR, 'static') MEDIA_DIR = os.path.join(BASE_DIR, 'media') MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media') STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') STATICFILES_DIRS = [STATIC_DIR]
Amit
you need to install it via pip follow the documentation's tutorial
I install it's by using pip command pip install djangorestframework
AA
And in urls.py file
urlpatterns = [ path('admin/', admin.site.urls), path('users/', include('users.urls')), path('users/', include('django.contrib.auth.urls')), path('articles/', include('articles.urls')), path('', include('pages.urls')), ]
Doragonsureiyā
Anyone know jQuery
Looks like you need an offtopic group, please continue this conversation at @pythonofftopic as it's not related to Python
Sadra
If I want to reset password I am always redirected to the admin
Allauth does everything. I think it looks for those switches for reset passeord.. If does not, search for reset password redirect switch in allauth.
Amit
Mirco
How I can do that
open python.org and study basics
Amit
I m abel to run python manage.py runserver
Amit
And I also got my localserver but when I add rest framework I got error
Mirco
if you don't know what a venv is, go back studying basics of Python and its environment
Amit
Ok
Neo
What is the service_name in cx oracle connection
Mirco
we can't do that!?
Yes you can do but with another ORM like SQLAlchemy or Tortoise
عــمــر
How can i change the max length of User Model fields ?
عــمــر
Can i write this in forms.py ? User.username(max_length=10)
Hamidreza
Yes you can do but with another ORM like SQLAlchemy or Tortoise
i run the bot in view but when my robot is runned my project is stopped and Django not runned how can fix this?
Bunty chhatri wala..
Admin login issues.. 127.0.0.1:8080/adminlogin/?next=/admin It keeps redirecting to this login page whenever i try to login a admin..
Alex
How can i change the max length of User Model fields ?
By customizing it and setting the values you need.
Alex
Can i write this in forms.py ? User.username(max_length=10)
Django's forms are merely connectors between python code and html.
عــمــر
Ok i will use abstractUser to customize it right ?
عــمــر
I only want to change error massage of username field
Dmitry
I have a list of queryset objects. How can I convert it to queryset type?
Alex
I only want to change error massage of username field
I guess it's form's logic layer.
Alex
I have a list of queryset objects. How can I convert it to queryset type?
Do you mean python list of django's QuerySets?
عــمــر
I guess it's form's logic layer.
I change the error massage of password match in form.py, but the unique error message of username i dont know how to change it .
Dmitry
Do you mean python list of django's QuerySets?
I have a python list but I want to work with queryset methods. I got a python list this way: queryset = Poll.objects.all() queryset = [filter(lambda x: x.is_active(), queryset)]
Dmitry
is_active is my custom model method (: I heared about managers but I don't know how to use it and Im trying to find some ways to escape it
Alex
is_active is my custom model method (: I heared about managers but I don't know how to use it and Im trying to find some ways to escape it
Then you're doing it wrong. I work with django already for 5 years and can say that such logic is an anti-pattern. You should move it in a custom Manager/QuerySet
Dmitry
ok, thanks, then I have to learn how to use managers anyway
عــمــر
I make my custom user model by use abstractUser , i do everything but its show error , no such table UserModel ! I do migrant and makemigrations
Sergey
Hi guys. I have questions is there a way some how manage depth of self linkage of model if this have foreign key or many to many key on itself?
Anonymous
hi there is there a way to choose all else urls in urlpatterns? i have an app and that has 2 path : /post /like and i want to select another urls , all of them how i can select them? i try that with re_path : re_path( r'^.+$' , func_name ) but it still did not, and in some cases it was wrong 🙏🏻
Ngige
Anyone good at asynchronous php
Ngige
Need some help
Alex
Anyone good at asynchronous php
have you read the name of the group?
Ngige
have you read the name of the group?
Yes, just shooting my shot. I really need some help in a certain PHP project, I hoped I could find someone who has crossed paths with PHP at any point
Ngige
Thank you