Questions tagged [django-angular]

12 questions
2
votes
1 answer

How to load images in assets folder, wile running Angular in Django Framework?

I am trying to run Angular 6 app inside Django 2.1. I am able to run the app and getting the webpage. But, all the images in assets folder, are not rendering in the UI. it is returning as 404 Not Found. My index.html is like this below {% load…
BlizZard
  • 587
  • 5
  • 22
2
votes
2 answers

Django rest API vs Django views

I am building a project where I have 2 approaches to follow - Either I can create APIs for all operations and call them from my frontend which can be in Angular. Or I can use normal Django views and template. Question: what is the best approach to…
Adi81027
  • 61
  • 6
1
vote
1 answer

Python ImportError: No module named djng

Not sure what is the correct package to be installed. When I do pip install djng I get this error message. pip install djng Collecting djng Could not find a version that satisfies the requirement djng (from versions: ) No matching distribution…
thatzprem
  • 4,697
  • 1
  • 33
  • 41
1
vote
0 answers

ng-model not attaching to controller $scope when inserting modal form from Django

I'm serving a form from Django into an angular-ui-bootstrap modal using the template property: function openFinderModal() { var modalInstance = $modal.open({ template: vm.modalTemplate, }); The relevant part of the modal template…
0
votes
1 answer

ModuleNotFoundError: No module named 'django-angular'

I have already installed pip3 install django-angular Requirement already satisfied: django-angular in /usr/local/lib/python3.9/site-packages (2.3) Requirement already satisfied: django>=2.1 in /usr/local/lib/python3.9/site-packages (from…
jagtar
  • 23
  • 8
0
votes
0 answers

djnago rest api data is not loading in Angular localhost page(client)

I have created REST API in django. For frontend i am using Angular framework. In django my site for showing all the data is 'http://127.0.0.1:8000/flightschedule/'. Now for angular in routing module i am confused to which path should i give. I have…
Saurabh G
  • 19
  • 2
  • 8
0
votes
0 answers

django-angular example error

We hope this thread will help users running the django-angular package for Python. At the moment, we are following the example: django-angular We are able to get the demo running, but have an error loading some of the static files. The creator of…
dataviews
  • 2,466
  • 7
  • 31
  • 64
0
votes
0 answers

Compressed image is not going to save using angular js

I am trying to compress multiple images using angular js, It also showing compressed images before submitting the button but after uploading those images they are going to save with original size but not of compressed size in database What…
Mayuresh Patil
  • 2,072
  • 1
  • 21
  • 44
0
votes
1 answer

Access dynamically-named form from an angular controller

All, I have a form inside an Angular controller. But the name of that form is dynamically-generated (by Django) from the server. Does anybody know how I can access that form (w/ the intention of changing the validity of certain items after some…
trubliphone
  • 4,132
  • 3
  • 42
  • 66
0
votes
1 answer

django angular anonymous user

I am sending an $http get request from my angular client to my Django backend, where (request.user) gives me Anonymous. Because of this I can do anything on server side. I am using django-rest-auth on django side and angular-django-registration-auth…
Thinker
  • 5,326
  • 13
  • 61
  • 137
0
votes
0 answers

Angularjs with Django: making http.get from angular controller with scope parameters in the url

My django views look like following: #view to retrieve all the exercises def exercise_all(request): """ List all exercises. """ if request.method == 'GET': exercises = Exercise.objects.all() serializer = ExerciseSerializer(exercises,…
Thinker
  • 5,326
  • 13
  • 61
  • 137
0
votes
1 answer

Django refused to display YouTube video in a iframe because it set 'X-Frame-Options' to 'SAMEORIGIN'

My HTML page looks like this:
'exercise_video_url' I am setting in my controller like…
Thinker
  • 5,326
  • 13
  • 61
  • 137