0
votes

I have deployed my django app via Elastic Beanstalk. I can access the Django app via Elastic Beanstalk URL. But, to access flower app, I need go to the EC2 instance IP address and port number 5555. Is it possible, we can define a URL for flower in urls.py ? If yes, then how?

1

1 Answers

1
votes

You should be able to do this with redirect.

def flower_redirect(request):
...
return redirect('your_flower_url')

In urls.py:

from django.conf.urls import url

from . import views

urlpatterns = [
    url(r'^flower_redirect/$', views.flower_redirect, name='flower_redirect'),
]

Please keep in mind it's still a better idea to do this via your webserver or for example create a CNAME record for your domain, if you're using one.