After lots of debug and digging inside local middleware I have fixed this.
To solve this I had to add LOCALE_PATH in settings file.
On Friday, July 22, 2016 at 6:41:44 PM UTC+5:30, Sonu Kumar wrote:
>
> Hi there,
> I would like to add a custom language to support for i18n. You can che
Hi there,
I would like to add a custom language to support for i18n. You can check
my question
here
http://stackoverflow.com/questions/38511925/add-custom-language-for-localization-in-django-app.
I have followed all the steps mentioned
here
Thanks James,
We have consider database and updated sites using django-visits. Building
such a full proof system will take longer time.
Regars,
Sonu
On Monday, February 8, 2016 at 2:29:46 PM UTC+5:30, James Schneider wrote:
>
>
> On Feb 7, 2016 7:03 PM, "sonu kumar"
Hi all,
We have develop a site where we need to maintain page view count like SO,
Quora,YouTube etc. Current approach is based on number of retrieval using
view this leads to problem to user that they are seeing that when a page is
reloaded then count get's incremented see here
gt; On Wed, Jan 20, 2016 at 8:00 PM, sonu kumar <sonunit...@gmail.com> wrote:
>
>> SO link:
>> http://stackoverflow.com/questions/34894964/why-counter-tag-is-not-working-as-expected-in-django
>>
>> I am using two for loop one is for main question and another one
than one questions so one outer for loop is
running for main question and another one is sub questions.
On Thursday, January 21, 2016 at 3:33:42 AM UTC+5:30, James Schneider wrote:
>
>
>
> On Wed, Jan 20, 2016 at 6:14 AM, sonu kumar <sonun...@gmail.com
> > wrote:
>
>&
https://djangosnippets.org/snippets/2619/
According to above snippet if we access {{ counter_var }} in template after
initializing it should return previous count. But in my case it does not
return anything.
template code
Q{% counter %}. ...var
no_of_questions={{ counter_var }}
Template
Models
class Country(models.Model):
country = CountryField()
class City(models.Model):
name = models.CharField(max_length=1000)
country = models.ForeignKey(Country)
country = request.POST['country']
country = get_object_or_404(Country, country=country)
cities =
country = request.POST['country']
country = get_object_or_404(Country, country=country)
On Tuesday, January 5, 2016 at 6:02:28 PM UTC+5:30, sonu kumar wrote:
>
> Models
>
> class Country(models.Model):
> country = CountryField()
>
> class City(models.Model):
>
Models
class Country(models.Model):
country = CountryField()
class City(models.Model):
name = models.CharField(max_length=1000)
country = models.ForeignKey(Country)
cities = serializers.serialize("json", country.city_set.all(), fields=('name',
'id'))
In this it should return
cities = serializers.serialize("json", country.city_set.all(), fields=('name',
'id'))
In this it should JSON object with only name and id field but it returns
[{"fields": {"name": "Chennai"}, "model": "job.city", "pk": 1}] where as it
should return [{"name": "Chennai", "id": 1}].
How to
wrote:
>
> Hello,
>
> Are you sure they're using the same template? (If you change something
> does it actually affect both views?)
>
> Is one of the views using mark_safe?
>
> Collin
>
> On Tuesday, October 27, 2015 at 9:29:02 PM UTC+1, sonu kumar wrote:
>>
>
, November 5, 2015 at 2:44:22 AM UTC+5:30, Daniel Roseman wrote:
>
> On Wednesday, 4 November 2015 20:51:53 UTC, sonu kumar wrote:
>>
>> class based views are as below
>>
>> class TagList(TemplateView):
>>
>> def get_context_data(self, **kwargs
class based views are as below
class TagList(TemplateView):
def get_context_data(self, **kwargs):
...
qlist = QueList.as_view()(self.request, **kwargs)
print qlist
...
class QueListView(ListView):
def get_context_data(self, **kwargs):
I am having two views both are extending from same base.html and both of
them have loaded same template tags, but one is escaping string using safe
and other is not what could be
Code
view 1
{% extends 'base.html' %}
{% load inplace_edit mezzanine_tags rating_tags keyword_tags comment_tags
I have installed third party app(Mezzanine) whose urls are configured to
use their view functions not View Class. Source code from
mezzanine.blog.urls
urlpatterns = patterns("mezzanine.blog.views",16
16 matches
Mail list logo