hackstarsj / student_management_system_part_11

Student Management System With Video Conferencing Class Room Features
Other
193 stars 111 forks source link

some problems #8

Closed itinerary-hui closed 3 years ago

itinerary-hui commented 3 years ago

which kind of profile_pic?

itinerary-hui commented 3 years ago

I cannot sign up a student

hackstarsj commented 3 years ago

Share Your Error Log

itinerary-hui commented 3 years ago

Internal Server Error: /do_signup_student Traceback (most recent call last): File "D:\Anaconda3\envs\stuM\lib\site-packages\django\core\handlers\exception.py", line 34, in inner response = get_response(request) File "D:\Anaconda3\envs\stuM\lib\site-packages\django\core\handlers\base.py", line 115, in _get_response response = self.process_exception_by_middleware(e, request) File "D:\Anaconda3\envs\stuM\lib\site-packages\django\core\handlers\base.py", line 113, in _get_response response = wrapped_callback(request, callback_args, callback_kwargs) File "C:\Users\hui\Desktop\student_management_system_part_11\student_management_app\views.py", line 152, in do_signup_student first_name=first_name, user_type=3) File "D:\Anaconda3\envs\stuM\lib\site-packages\django\contrib\auth\models.py", line 147, in create_user return self._create_user(username, email, password, extra_fields) File "D:\Anaconda3\envs\stuM\lib\site-packages\django\contrib\auth\models.py", line 141, in _create_user user.save(using=self._db) File "D:\Anaconda3\envs\stuM\lib\site-packages\django\contrib\auth\base_user.py", line 66, in save super().save(args, *kwargs) File "D:\Anaconda3\envs\stuM\lib\site-packages\django\db\models\base.py", line 746, in save force_update=force_update, update_fields=update_fields) File "D:\Anaconda3\envs\stuM\lib\site-packages\django\db\models\base.py", line 795, in save_base update_fields=update_fields, raw=raw, using=using, File "D:\Anaconda3\envs\stuM\lib\site-packages\django\dispatch\dispatcher.py", line 175, in send for receiver in self._live_receivers(sender) File "D:\Anaconda3\envs\stuM\lib\site-packages\django\dispatch\dispatcher.py", line 175, in for receiver in self._live_receivers(sender) File "C:\Users\hui\Desktop\student_management_system_part_11\student_management_app\models.py", line 169, in create_user_profile Students.objects.create(admin=instance,course_id=Courses.objects.get(id=1),session_year_id=SessionYearModel.object.get(id=1),address="",profile_pic="",gender="") File "D:\Anaconda3\envs\stuM\lib\site-packages\django\db\models\manager.py", line 82, in manager_method return getattr(self.get_queryset(), name)(args, **kwargs) File "D:\Anaconda3\envs\stuM\lib\site-packages\django\db\models\query.py", line 417, in get self.model._meta.object_name student_management_app.models.SessionYearModel.DoesNotExist: SessionYearModel matching query does not exist. [11/Apr/2021 21:08:09] "POST /do_signup_student HTTP/1.1" 500 122133

hackstarsj commented 3 years ago

You need to add session year first in session year table

Then use one default id for setting session year in models.py receiver code for students.object.create() here you need to pass the one default it of session year model object which exists in your database

AkshayGaikwad02 commented 3 years ago

after extract zip file this error was come ...... Can solve this error 123

AkshayGaikwad02 commented 3 years ago

after extract zip file this error was come ...... Can solve this error 123

I solve this by using command pip install requests ...... then after that i am succsessfully run that on cmd then i am goes on login page but it's showing this...............OperationalError at /

no such table: django_session

Error1 Error2