Re: trying to use a variable inside a static content tag

2019-07-27 Thread Sipum Mishra
Hi Lyman, PFB. Configure the following setting in your setting.py STATIC_ROOT = os.path.join(BASE_DIR,"static_files") STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(BASE_DIR, "static"),) load *staticfiles* tag to template {% load staticfiles %} and then use in *src* attribute

Re: trying to use a variable inside a static content tag

2019-07-27 Thread Sithembewena L. Dube
Interesting. Kind regards, Lloyd *Sent with Shift * On Sat, Jul 27, 2019 at 11:25 PM Lyman Hurd wrote: > A helpful user in the Python #

Re: trying to use a variable inside a static content tag

2019-07-27 Thread Lyman Hurd
A helpful user in the Python #django slack channel showed me this answer: https://stackoverflow.com/questions/16655851/django-1-5-how-to-use-variables-inside-static-tag On Saturday, July 20, 2019 at 4:31:52 AM UTC-7, Lyman Hurd wrote: > > Greetings. I am writing a card game and I can load an im

Model Related Issue

2019-07-27 Thread Soumen Khatua
Hi Folks, I created one Address model and I extended Profile model by using OnetoOneField of User and this Address model. But in get method I want to provide User model email,username and Address model state and Profile model all details,How I can do that ny using Django Rest Framework. Please hel

Django Project Server not starting when running on linux server but running on local windows desktop

2019-07-27 Thread Top Dolla
Agreed. Make sure the Python and Django versions are identical. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To vie

Re: Overriding methods in models of other developers

2019-07-27 Thread Jani Tiainen
You can do that with proxy models which allows you to override and add methods. Of course if there is a need to really modify original model it gets tricky. la 27. heinäk. 2019 klo 10.49 אורי kirjoitti: > Hi, > > I had to change the following lines because tests failed: > > class Friend1(objec

Re: Overriding methods in models of other developers

2019-07-27 Thread אורי
Hi, I had to change the following lines because tests failed: class Friend1(object): def __str__(self): return "User {} is friends with {}".format(self.to_user, self.from_user) class FriendshipRequest1(object): def __str__(self): return "Friendship request from user {} t