Re: using historic changes from django-admin to templates?

2014-08-17 Thread Collin Anderson
Or, is the data on the admin "history" page good enough? You could just import LogEntry and start querying it. The model is undocumented and not guaranteed to be a stable API, but you can see the model here: https://github.com/django/django/blob/master/django/contrib/admin/models.py -- You rec

Re: Multilingual search with Haystack

2014-08-17 Thread Collin Anderson
Could you simply have a field to record the language, and then filter by that language when searching? -- 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-us

Re: Desperatly seeking help with ALLOWED_HOSTS

2014-08-17 Thread Cal Leeming [iops.io]
Beautiful, glad you got it sorted out, and thanks for sharing the fix! Cal On Sun, Aug 17, 2014 at 8:57 PM, Subodh Nijsure wrote: > Thank you SO MUCH for that suggestion for logger. I have some compress > tags in my templates, but I guess I haven't configured that correctly. > And I was gettin

Re: Desperatly seeking help with ALLOWED_HOSTS

2014-08-17 Thread Subodh Nijsure
Thank you SO MUCH for that suggestion for logger. I have some compress tags in my templates, but I guess I haven't configured that correctly. And I was getting following error. File "/home/ubuntu/.virtualenvs/myvirt/lib/python2.7/site-packages/compressor/base.py", line 121, in get_filename

Re: Should I use generic foreign key, and how?

2014-08-17 Thread Amirouche Boubekki
2014-08-17 11:24 GMT+02:00 Vladimir Chukharev : > > > On Saturday, August 16, 2014 10:46:33 PM UTC+3, Aaron Law wrote: >> >> >> Hi all, >> >> I have php web programming background, and new to Django. I am helping my >> brother to build an online system to manage inventory, and I've got a >> datab

Re: Desperatly seeking help with ALLOWED_HOSTS

2014-08-17 Thread Cal Leeming [iops.io]
Interesting, you could try removing the 400.html and allow it to raise the original exception that caused it. You could also try using a different WSGI server, such as uWSGI or gunicorn, as it could be a problem with that. Another option would be to use something like Sentry to capture the errors

Re: Desperatly seeking help with ALLOWED_HOSTS

2014-08-17 Thread Subodh Nijsure
Unfortunately I don't see traceback neither in my nginx log or my apache log that is what is making it very confusing and difficult to debug... -Subodh On Sun, Aug 17, 2014 at 11:37 AM, Cal Leeming [iops.io] wrote: > Can you please send us the traceback of the error generated? (assuming there >

Re: using historic changes from django-admin to templates?

2014-08-17 Thread Cal Leeming [iops.io]
Several projects have attempted this, though personally I don't feel any of them are the right solution; https://www.djangopackages.com/grids/g/model-audit/ Django reversion is probably your best bet, and although I don't agree with the approach, it gets the job done; https://github.com/etianen/dj

Re: Desperatly seeking help with ALLOWED_HOSTS

2014-08-17 Thread Cal Leeming [iops.io]
Can you please send us the traceback of the error generated? (assuming there is one) Cal On Sun, Aug 17, 2014 at 7:25 PM, Subodh Nijsure wrote: > I am totally stumped why I can't get my site to work when DEBUG=False. > > I have entered my domain name and IP address in the ALLOWED_HOSTS > > I e

Desperatly seeking help with ALLOWED_HOSTS

2014-08-17 Thread Subodh Nijsure
I am totally stumped why I can't get my site to work when DEBUG=False. I have entered my domain name and IP address in the ALLOWED_HOSTS I even tried putting '*' in my ALLOWED_HOST but when DEBUG=False I always get my 400.html page served to me. As soon as DEBUG=True everything works great. I ha

Re: Efficient way to perform many queries

2014-08-17 Thread 9devmail
Thank you, it works perfectly :) -- 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 post to this group, send email to

using historic changes from django-admin to templates?

2014-08-17 Thread somenxavier
Hi, I just ask if it's possible (and how) to use the "historic changes" of django-admin interface to templates for showing what changes I've made in my models in my site. Can anyone follow the Poll examples of the tutorial. Thanks in advance, Xan -- You received this message because you are

Re: Push like notifications app

2014-08-17 Thread Cal Leeming [iops.io]
That was strange, my email decided to send as I was typing the rest of my reply :X See in-line again. On Sun, Aug 17, 2014 at 3:53 PM, Cal Leeming [iops.io] wrote: > > > Cal > > > On Sun, Aug 17, 2014 at 1:07 PM, Guy Bowden wrote: > >> Hi, >> >> I'm looking for an app that will allow me to 'pu

Re: Push like notifications app

2014-08-17 Thread Cal Leeming [iops.io]
Cal On Sun, Aug 17, 2014 at 1:07 PM, Guy Bowden wrote: > Hi, > > I'm looking for an app that will allow me to 'push' notifications/messages > to a user / users / groups via the admin system. > > > examples: > show all users a notice about a new feature > show users a notice about planned main

Push like notifications app

2014-08-17 Thread Guy Bowden
Hi, I'm looking for an app that will allow me to 'push' notifications/messages to a user / users / groups via the admin system. examples: show all users a notice about a new feature show users a notice about planned maintenance and other such useful things! it would be able to have a 'dismiss'/

Re: Sequence of code validation

2014-08-17 Thread Malik Rumi
Thanks. Your answer led me straight to https://docs.python.org/2/tutorial/modules.html#packages and I am working my way through that now, but it looks promising. If I have more issues, I'll be back... On Sun, Aug 17, 2014 at 8:44 AM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > Hi Mal

Re: Sequence of code validation

2014-08-17 Thread Russell Keith-Magee
Hi Malik, Ah - in that case, you're not looking at anything special that Django is doing; you're just seeing the result of importing Python code. Running something like ./manage.py runserver sets of a sequence of complex code internally - effectively, all the code in your project (or, at least, a

Re: Sequence of code validation

2014-08-17 Thread Malik Rumi
Thanks for both the reply and it's speed. Yes, this looks to be part of what I am looking for. I say part because the link you gave does not specifically reference checking views and urls.py, but whatever check is being run for me is clearly looking there, too. I am using 1.7c1, and the reason I as

Re: Sequence of code validation

2014-08-17 Thread Russell Keith-Magee
HI Malik, It sounds like you might be referring to the validation/system check framework. In Django 1.6, this is implemented using a single huge method that looks for specific problems in your model definitions. This functionality isn't well documented, and isn't extensible as an end user. If you

Sequence of code validation

2014-08-17 Thread Malik Rumi
When you run python mange.py *, Django runs through your code and stops to point out errors instead of giving you runserver or shell or whatever you were trying to do. What is that sequence? Is it the same every time? Where can I find out more about it? I looked in the docs, but I couldn't find

Re: Should I use generic foreign key, and how?

2014-08-17 Thread Vladimir Chukharev
On Saturday, August 16, 2014 10:46:33 PM UTC+3, Aaron Law wrote: > > > Hi all, > > I have php web programming background, and new to Django. I am helping my > brother to build an online system to manage inventory, and I've got a > database design & coding problem recently. Needing help! > > Tha

Multilingual search with Haystack

2014-08-17 Thread Simon Bächler
Hi I need to set up a search server for our production servers. Each production server has multiple Django instances and every instance has multiple languages. As a search backend I'm leaning towards Elasticsearch because it is easier to add new sites to the index. Unfortunately Haystack asso

Re: Should I use generic foreign key, and how?

2014-08-17 Thread Amirouche Boubekki
2014-08-16 21:45 GMT+02:00 Aaron Law : > > Hi all, > > I have php web programming background, and new to Django. I am helping my > brother to build an online system to manage inventory, and I've got a > database design & coding problem recently. Needing help! > > That is, I have a set of tables of

Re: I can't load fixtures

2014-08-17 Thread Davide Scatto
when you run a test the django fixture discoverer search in all fixture subfolder in apps registered in settings.INSTALLED_APPS. you don't need __init__.py file nor FIXTURE_DIRS (fixture folder is a subfolder of app folder, isn't it?). did you add fixture param in yr test class? what version of

Re: Should I use generic foreign key, and how?

2014-08-17 Thread Davide Scatto
another way is not to use fk but generic field, where patent_id is a normal integer field. In a custom manager you have to manage the data content in this field with data content in table field to retrieve yr linked record. Il giorno sabato 16 agosto 2014 21:46:33 UTC+2, Aaron Law ha scritto: >