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 #django

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

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

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

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

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 {}

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

2019-07-27 Thread Jorge Gimeno
On Fri, Jul 26, 2019, 8:22 PM Abhijith E wrote: > It's the latest version. > Also I am using Anaconda Distribution with Python 3.5 > > On Sat, Jul 27, 2019, 8:44 AM Jorge Gimeno wrote: > >> What version of Django are you running? >> >> On Fri, Jul 26, 2019, 7:34 AM abhijithez wrote: >> >>> Hi

Re: Problem with running Django with nginx and uwsgi in Ubuntu

2019-07-27 Thread אורי
Thanks for your suggestions, I'll try it. אורי u...@speedy.net > > -- 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.

Overriding methods in models of other developers

2019-07-27 Thread אורי
Django users, I want to override def __str__ of models I'm using, but the models are maintained by other developers. I think the __str__ is only used by the admin interface. I found out that I can do something like this: from django.contrib import admin from django.contrib.sites.models import