updating my code
This commit is contained in:
		
							parent
							
								
									f18d36e42d
								
							
						
					
					
						commit
						c2f1899e20
					
				
					 3 changed files with 23 additions and 1 deletions
				
			
		
							
								
								
									
										15
									
								
								back/backend/serializers.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								back/backend/serializers.py
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| from rest_framework import serializers | ||||
| from . import models | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| class BackendSerializer(serializers.ModelSerializer): | ||||
|     class Meta: | ||||
|         fields = ( | ||||
|             'id', | ||||
|             'title', | ||||
|             'description', | ||||
|         ) | ||||
|         # model = models.Backend | ||||
| 
 | ||||
|  | @ -39,8 +39,15 @@ INSTALLED_APPS = [ | |||
|     'django.contrib.messages', | ||||
|     'django.contrib.staticfiles', | ||||
|     'backend', | ||||
|     'rest_framework', | ||||
| ] | ||||
| 
 | ||||
| REST_FRAMEWORK = { | ||||
|     'DEFAULT_PERMISSION_CLASSES': [ | ||||
|         'rest_framework.permissions.AllowAny', | ||||
|     ] | ||||
| } | ||||
| 
 | ||||
| MIDDLEWARE = [ | ||||
|     'django.middleware.security.SecurityMiddleware', | ||||
|     'django.contrib.sessions.middleware.SessionMiddleware', | ||||
|  |  | |||
|  | @ -23,5 +23,5 @@ from django.urls import path, include | |||
| # add urls to this array | ||||
| urlpatterns = [ | ||||
|     path('admin/', admin.site.urls), | ||||
|     path('', include("backend.urls")), | ||||
|     path('backend/v1/', include("backend.urls")), | ||||
| ] | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Rupika
						Rupika