فهرست منبع

Necessary corrections have been made for correct operation with the sharix-open-user-model

TonyKurts 11 ماه پیش
والد
کامیت
d9dbbf9e76
2فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 2
      forms.py
  2. 0 1
      serializer/orders_local.py

+ 3 - 2
forms.py

@@ -1,5 +1,6 @@
 from django import forms
-from SharixAdmin.models import SharixUser
+from django.contrib.auth import get_user_model
+
 from webservice_running.models import OrdersLocal 
 from django.contrib.auth.forms import UserCreationForm
 
@@ -25,5 +26,5 @@ class RegisterUserForm(UserCreationForm):
         widget=forms.TextInput(attrs={'class':'form-control'}))
 
     class Meta:
-        model = SharixUser
+        model = get_user_model()
         fields = ['username', 'password1', 'password2']

+ 0 - 1
serializer/orders_local.py

@@ -2,7 +2,6 @@ from rest_framework import serializers
 from webservice_running.models import OrdersLocal
 from tickets.models import *
 from metaservicesynced.models import Orders
-from SharixAdmin.models import SharixUser
 # from metaservicesynced.serializer import OrdersSerializer
 from rest_framework.utils import model_meta
 import pprint