Re: Debugging Django with Debug set to False

2016-01-05 Thread Web Architect
Thanks all for the responses and I would certainly consider them for production level debugging. I understand that application level debugging could be achieved by various logging mechanisms or tools. But one of my main concern is the platform level debugging where in if anything goes wrong wit

How to show a list of products as checkboxes?

2016-01-05 Thread Michael Molloy
My model: class Product(models.Model): descr = models.CharField(max_length=100) cost = models.DecimalField(max_digits=5, decimal_places=2) For every row stored in the table represented by this model, in the template I would like to render the description and a checkbox so that the user

how to set up jenkin's 'GitHub Pull Request Builder Plugin' for django ?

2016-01-05 Thread Abraham Varricatt
Hello everyone, I've got a very simple django project hosted on github ( https://github.com/abrahamvarricatt/TDDwithPython ; yes, it's based on the book ) and I'm trying to figure out how to configure a jenkins CI server to run tests based on pull requests. My end objective is to get a system

Re: Drop down dependent on two other form fields

2016-01-05 Thread Billu
Think you have to use jQuery (or any other JS framework) on this one to send the values back to server. An example would be http://jsfiddle.net/dKMzk . But with this, you have to pull all values prior to loading the drop-downs. With this example, you

Re: Django imports models for apps that aren't enabled?

2016-01-05 Thread Stodge
Carl, thanks. You were right - I was experiencing "b". Thanks again Mike On Tuesday, 5 January 2016 11:02:24 UTC-5, Carl Meyer wrote: > > Hi Stodge, > > On 01/05/2016 08:57 AM, Stodge wrote: > > I'm using Django 1.6.9. When the dev server (and hence Apache) starts, > > is Django supposed to im

Re: Django imports models for apps that aren't enabled?

2016-01-05 Thread Carl Meyer
Hi Stodge, On 01/05/2016 08:57 AM, Stodge wrote: > I'm using Django 1.6.9. When the dev server (and hence Apache) starts, > is Django supposed to import models for apps that exist on disk, but > aren't enabled in the settings? I'm seeing this behaviour and I wasn't > expecting it. Thanks Django s

Django imports models for apps that aren't enabled?

2016-01-05 Thread Stodge
I'm using Django 1.6.9. When the dev server (and hence Apache) starts, is Django supposed to import models for apps that exist on disk, but aren't enabled in the settings? I'm seeing this behaviour and I wasn't expecting it. Thanks -- You received this message because you are subscribed to the

Re: "last_login", null=True not migrated

2016-01-05 Thread 술욱
Of course! Thanks for pointing it out :-) 2016-01-05 12:19 GMT-03:00 Tim Graham : > You initial migration must have a state with the field as null=False so > that Django can detect it has changed between migration 1 and 2. It sounds > like you may have gotten that incorrect. > > On Tuesday, Jan

Re: "last_login", null=True not migrated

2016-01-05 Thread Tim Graham
You initial migration must have a state with the field as null=False so that Django can detect it has changed between migration 1 and 2. It sounds like you may have gotten that incorrect. On Tuesday, January 5, 2016 at 9:00:05 AM UTC-5, Norberto Bensa wrote: > > BTW, I just discovered: > > $ ./m

Re: Django + Ckeditor

2016-01-05 Thread Dheerendra Rathor
Adding to whycrying's method, you can use {{ content|safe }} to escape things as well. On Sun, 3 Jan 2016 at 19:13 whycrying wrote: > Hi, David, > > You can close the auto-escaping behavior like this :: > > {% autoescape off %} > {{ content }} > {% endautoescape %} > > ref: > https

Re: "last_login", null=True not migrated

2016-01-05 Thread 술욱
BTW, I just discovered: $ ./manage.py sqlmigrate accounts 0002 $ In other words, empty. Bug? 2016-01-05 9:29 GMT-03:00 Norberto Bensa : > Hello, > > I have a project originally developed using Django 1.5 but upgraded up to > 1.9.1. It uses a custom user model (from AbstractUser). > > Yester

JSON serializer is not working for subset of fields.

2016-01-05 Thread sonu kumar
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 = serializers.seria

Re: JSON serializer is not working for subset of fields.

2016-01-05 Thread sonu kumar
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): > name = models.CharField(ma

JSON serializer is not working for subset of fields.

2016-01-05 Thread sonu kumar
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 JSO

"last_login", null=True not migrated

2016-01-05 Thread Norberto Bensa
Hello, I have a project originally developed using Django 1.5 but upgraded up to 1.9.1. It uses a custom user model (from AbstractUser). Yesterday I had to create a user and Django replied with an exception. After some googling, this exception was caused because last_login can now be None whil

JSON serializers not workinf for some of subset of fields.

2016-01-05 Thread sonu kumar
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 fix

Re: Django/djcelery 1.8.2 AppRegistryNotReady: Translation infrastructure cannot be initialized

2016-01-05 Thread Dilshad Abdulla
Hi Manas, I go this error on one of my script I wrote a few months ago, I delete some data from my database by mistake when I re-run the script I got the error you wrote or maybe similar. The error is a bit longer than but I input a few line here: File "/home/dilmac/workplace/alfaenv/local/li

Re: Error: NoReverseMatch at / Reverse for 'submit' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried:[u'$submit'/]

2016-01-05 Thread James Schneider
> def submit(request, laser_id): > > try: > oLED = IoFLED() > btnSubmit = request.POST['btnSubmit'] > laserid = request.POST['laser_id'] > > The other poster reminded me, you'll want to remove the laser_id reference in your submit() signature

Re: Error: NoReverseMatch at / Reverse for 'submit' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried:[u'$submit'/]

2016-01-05 Thread James Schneider
> > The error I am getting now is: > > > > > NoReverseMatch at / Reverse for 'submit' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried:[u'$submit'/] > > And the following is highlighted in my index file: > > > > > My code is below: > > > > iofppysite/iofppysite/url

Re: Debugging Django with Debug set to False

2016-01-05 Thread Remco Gerlich
If it is the exception tracebacks you are after, consider setting up a Sentry ( https://getsentry.com/ ) server to send the error / exception logs of all your sites to. Whenever something bad happens, it'll show up there, with full tracebacks. Greetings, Remco Gerlich On Mon, Jan 4, 2016 at 6:33

Re: Debugging Django with Debug set to False

2016-01-05 Thread Abraham Varricatt
Technically speaking, setting DEBUG=False on a production system does not render it un-debuggable. You can still debug and work with such deployments but expect resistance. An ancient approach to debugging ANY production environment is to liberally sprinkle printf (or the django log equivalent)

Re: There's any framework for "bussiness app (ERP)" built in Django?

2016-01-05 Thread Abraham Varricatt
Would a CMS work? Like, http://www.django-cms.org/en/ or http://mezzanine.jupo.org/ -Abraham V. On Tuesday, 5 January 2016 03:33:00 UTC+5:30, Fellipe Henrique wrote: > > Thanks for all replies.. > > But, I'm looking for a framework, not a finished ERP like Odoo... > > Need to be web, so, try