1 error such as screenshot
2 system: win10 + PyCharm 2017.2.3 x64 + python3.6.2 + Django2.04
1 error such as screenshot
2 system: win10 + PyCharm 2017.2.3 x64 + python3.6.2 + Django2.04
good hint is very clear
blog s article like function, like once + 1, use session to record the current user problem point is: if you like article 1, article 2 will indicate that it has been supported. The reason is to judge that session how to realize that articles cannot b...
Baidu said that there is a problem with the verification method in the file var lib pgsql 9.5 data pg_hba.conf, but the reason for changing the verification method is to use the command psql-U postgres-d mydjango-p 5432-h 127.0.0.1 to log in directl...
in order to obtain Tencent Cloud s ssl certificate, enter the URL domain name after modifying the non-Wanwang domain name registered by Aliyun. the website cannot be accessed. Has anyone encountered ? nginx is normal: [root@iZwz9hbv3lrr68d8bo5dvp...
at present, we are writing the api interface, which is the interface provided for the mobile end, so why do we add a token? when we set the user name and password for the user? And the document also says to verify it in the way of token? Isn t it okay t...
as shown in the picture of the program, user.set_password ( data [ password ] ) also verifies that the output is True, but check to the database and find that the password has not changed. What is the reason? but if you do this in the database,...
(venv3_ETC) [root@iZwz9hbv3lrr68d8bo5dvpZ goods]-sharp python views.py Traceback (most recent call last): File "views.py ", line 5, in < module > from .serializer import GoodsSerializer ModuleNotFoundError: No module named _ main__.serializer ; ...
class Article (models.Model): id=models.BigAutoField(primary_key=True) title=models.CharField(max_length=32) publishtime=models.DateTimeField(auto_now_add=True) catalogs=models.ForeignKey(to= Catalog ) tags=models.ManyToManyField( Tag ) -sharp cont...
sys.path.insert(0,BASE_DIR) , sys.path.insert(0,os.path.join(BASE_DIR, db_tools ))sys.path.insert(0,os.path.join(BASE_DIR, apps ))sys.path.insert(0,os.path.join(BASE_DIR, extra_apps )) :shell from goods.models import Goods :python models.py:Tra...
excuse me, I have a User serialization class. The model used in the class is set owner = models.ForeignKey ( auth.User , related_name= snippets ) in the User,Snippet model. Performing database migration does not report an error, but there is no such...
python2 and python3.5, are already included under ubuntu. I installed 3.6 myself, so I chose 3.6 to configure the interpreter under pycharm, but did not actually execute python3.6. For example, if I execute python on the command line, the default is 3.6....
one of my model has a field value that needs a default value, such as class Earnings(models.Model): earing_num=models.DecimalField(default=) but the setting of the default value depends on a field value of another model class Product(models.Model...
I want to set permission, for a separate field in an API. If the user has permission, it will be displayed, and if there is no permission, it will not be displayed. What should I do? ...
the server is written by nginx + uwsgi + djano, the project is relatively old, and it has been found to be unresponsive recently. After investigation, it is found that the uwsgi queue is slow and full, eliminating the problem of excessive number of reque...
this module is used to authenticate users from django.contrib.auth import authenticate A few days ago, you can use user = authenticate (username=username, password=password) to return a user, but today you try to return None . the following proble...
when using axios to send a POST request to the backend, the server cannot get the parameters that are included in the POST. the sending code of the front end is as follows: Http({ method: POST , url: signup , data:{ username:th...
want to use django to develop a resume recruitment system, ask which corporate member and individual member. Is it better to use one User model or to design two? I have now created a new users app, class User (AbstractUser): xxx then the next s...
I want to transfer the array of objects to the background using post. This is how I pass it: Http({ method: POST , url: addGroup , data:qs.stringify({ list :this.excelData }) }) ...
first log in to the ip:port login interface through form submission and execute the do_login function in view.py. If the login is unsuccessful, I want to jump to the original ip:port login, and carry the error message. if I return via rerener (reque...
render (request, index.html , { index :index}) would you like to ask whether the dictionary type parameter of the index returned later can return more than one parameter at the same time? for example,: render (request, index.html , { index :...
failed to test ViewSet reverse getting route name in Django Rest Framework urls.py: -sharp course chapter without lesson course_chapter_router = DefaultRouter() course_chapter_router.register(r , courses.views.CourseChapterViewSet, ...