Re: Weird error like tickets 8892 and 10811

2014-06-25 Thread Lachlan Musicman
ergh. Rookie error. Subtle bug in the Job class - see the save override: def save(self, *args, **kwargs): if not self.slug: self.slug = self.job_number super(Job, self).save(*args, **kwargs) Note that the call to super is only reachedwhen there is no slug. The fix is simple:

Re: Using Sum function in Models.py

2014-06-25 Thread Lachlan Musicman
I recommend you send through the code for model you are talking about - since it doesn't make sense to have a sum of a single field of a model. Do you really want to keep the sum in the DB and not calculate it as needed? Maybe if you told us what your desired end point is, we could suggest best

Using Sum function in Models.py

2014-06-25 Thread Amitt Bhardwj
I want to define a field in models.py which contains sum of a other field in same model class. I tried importing sum function in models but it gave errors. Please help me. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from thi

Re: Weird error like tickets 8892 and 10811

2014-06-25 Thread Lachlan Musicman
Ok, I now understand why this happens: >>> x == j True >>> j == x True >>> j.findings 'data' >>> x.findings u'' https://docs.djangoproject.com/en/dev/ref/models/instances/#eq "with the same primary key value and the same concrete class are considered equal. " (no docs in 1.6, but I presume that

Re: page not found errors for most urls but main landing page displaying okay

2014-06-25 Thread Kelvin Wong
If you have access to your logs, check your logs to figure out where those requests are going. You can also SSH into the server and temporarily turn on the DEBUG=True, TEMPLATE_DEBUG=True and let Django tell you what is going on. Without seeing your fcgi script, my guess is that it is Apache no

Weird error like tickets 8892 and 10811

2014-06-25 Thread Lachlan Musicman
I have run up against this bug before: https://code.djangoproject.com/ticket/8892 Recently, it was updated to "duplicate of" https://code.djangoproject.com/ticket/10811 The TL;DR is Sometimes when you have models with O2O or FK you can lose data if the models are saved in the wrong order. I'm

Re: How to store/model reachable data in django.

2014-06-25 Thread Mario Gudelj
You don't want to use a csv. Store them in a db table cell. Even if you have a million entries you'll be surprised how quick it will be. On 26/06/2014 12:45 am, "Subodh Nijsure" wrote: > Hello > > I have need to store data that can be graphed. Example I have mobile app > that collects temperature

Re: page not found errors for most urls but main landing page displaying okay

2014-06-25 Thread Lee
Thanks - it must be a problem with the site accessing templates but I can't figure it out. This django project works on another server but I have copied it to a shared host webserver (Bluehost) and am running it with fcgi so maybe the problem is in the setup. I am focusing on one url and templ

Re: Time Zone Problem when following on tutorial

2014-06-25 Thread Mike Dewhirst
Jerry I just figured it out and it is simple. Time is constant and all you need to do is decide how* you want to display it. The TIME_ZONE setting tells the server. An event happens at the same time everywhere in the universe (there may be Einsteinian exceptions to this) and you can store tha

Handling checkbox inputs

2014-06-25 Thread Saloni Baweja
I'm building a small app that at first displays the form containing the checkboxes and asks the user to select one or more of them and then displays the name of only selected ones. This works fine. Now, I want to display the data only corresponding to the fields that the user has checked or sel

Re: on manage.py migrate appname I get: AttributeError: 'module' object has no attribute 'Migration'

2014-06-25 Thread Michael Lind Hjulskov
Hi Erik I solved it.. You vere right I should check again the files in migration folder It was my IDE (Pycharm) which for some reason sometimes fail on uploading files. So there was missing a few files, in a migrations folder Sorry I didnt know that - Pycharm is still new for me. I'm use to Filezi

Re: on manage.py migrate appname I get: AttributeError: 'module' object has no attribute 'Migration'

2014-06-25 Thread Michael Lind Hjulskov
hmm could it be: I run my local development env with a sqlite3 as database when I launch to deployment, I use mysql as db But doesnt South produce the same result when i run schemamigration, nomatter what db I'm using ? Hope You undderstand what I mean *Med venlig hilsen* Michael Hjulskov Mobi

Re: on manage.py migrate appname I get: AttributeError: 'module' object has no attribute 'Migration'

2014-06-25 Thread Michael Lind Hjulskov
> > Den 25/06/2014 kl. 21.30 skrev Michael Lind Hjulskov >: > > > Hi Erik > > > > Thank You > > > > I tried ./manage.py migrate myappname --traceback > > Still the same error message and no more info available than before. > > Check your migrations folder and make sure you only have South migratio

Re: on manage.py migrate appname I get: AttributeError: 'module' object has no attribute 'Migration'

2014-06-25 Thread Erik Cederstrand
Den 25/06/2014 kl. 21.30 skrev Michael Lind Hjulskov : > Hi Erik > > Thank You > > I tried ./manage.py migrate myappname --traceback > Still the same error message and no more info available than before. Check your migrations folder and make sure you only have South migration files in there. A

Re: page not found errors for most urls but main landing page displaying okay

2014-06-25 Thread Michael Lind Hjulskov
Hi I had the exact same problem a few days ago. It was one of my templates that suddenntly was emty. very spooky Or maybe you have an "extends" somewhere that is not correct I would debug by looking in the relevant view and see which template is called, and the simplify that template to test if

Re: on manage.py migrate appname I get: AttributeError: 'module' object has no attribute 'Migration'

2014-06-25 Thread Michael Lind Hjulskov
Hi Erik Thank You I tried ./manage.py migrate myappname --traceback Still the same error message and no more info available than before. PS I see You are from DK - I'm from Aalborg, You? Michael 2014-06-25 20:31 GMT+02:00 Erik Cederstrand : > Den 25/06/2014 kl. 16.19 skrev Michael Lind Hjuls

page not found errors for most urls but main landing page displaying okay

2014-06-25 Thread Lee
I have copied a Django project to my web server from a repo and am getting the correct initial landing page for the website with the right styling when I go to the main URL. Most other urls give "page not found" errors. This includes the divs that are called on to make menus on the main page so

testing equality in template tag

2014-06-25 Thread Lee Hinde
with view code like so: import calendar months_choices = [] for i in range(1,13): months_choices.append((i, calendar.month_name[i])) context['months'] = months_choices and context['default_month'] = today.month I have this snippet in a template (my f

Re: on manage.py migrate appname I get: AttributeError: 'module' object has no attribute 'Migration'

2014-06-25 Thread Erik Cederstrand
Den 25/06/2014 kl. 16.19 skrev Michael Lind Hjulskov : > Hi there :) > > I'm stuck with this problem > when I run python manage.py migrate myappname i get the following error: > AttributeError: 'module' object has no attribute 'Migration' > > I remember I had this problem before, and I remember

Re: Copied django project to shared host from repo - can't import settings

2014-06-25 Thread Lee
This worked, thank you! I don't understand why it worked, but pleased that it did. Lee On Wednesday, June 25, 2014 11:14:46 AM UTC-4, sacrac wrote: > > ok i make different configuration > > #!/home5/myorg/.virtualenvs/mydjango/bin/python > import sys, os > > # Add a custom Python path. > sys.pat

Re: Criar slideShow

2014-06-25 Thread Carlos Andre
Valeu marco aurélio! obrigado! 2014-06-25 9:29 GMT-03:00 Sandro Dutra : > Você está em uma lista de discussão internacional, se espera alguma > resposta, escreva em inglês. > > You're on international group, if you expect some answer, write in english. > > > 2014-06-24 21:50 GMT-03:00 Carlos And

Re: Copied django project to shared host from repo - can't import settings

2014-06-25 Thread carlos
ok i make different configuration #!/home5/myorg/.virtualenvs/mydjango/bin/python import sys, os # Add a custom Python path. sys.path.insert(0, "/home//projects/") sys.path.insert(0, "/home//projects/yourproyect") from flup.server.fcgi import WSGIServer os.environ['DJANGO_SETTINGS_MODULE'] = '.s

Re: Django Login/Session Not Sticking

2014-06-25 Thread LaPerl
Hello all, I'm not sure if you discovered the problem, but if you have different types of authentication backends, maybe the problem is on the session objects. Did you do a delete?. See the NOTE in this chapter: https://docs.djangoproject.com/en/1.6/topics/auth/customizing/#specifying-authenti

How to store/model reachable data in django.

2014-06-25 Thread Subodh Nijsure
Hello I have need to store data that can be graphed. Example I have mobile app that collects temperature every 30 seconds for say 5 min and uploads these samples via REST api to my database. I happen to be using django for visualization. Question I am pondering is what is the best way to store th

Re: on manage.py migrate appname I get: AttributeError: 'module' object has no attribute 'Migration'

2014-06-25 Thread Michael Lind Hjulskov
Hi Here's a bit more info about the error this is the line where it fails in south Hope to get help Thanks Den onsdag den 25. juni 2014 16.19.08 UTC+2 skrev Michael Lind Hjulskov: > > Hi there :) > > I'm stuck with

Re: Howto update a package in venv

2014-06-25 Thread Michael Lind Hjulskov
Thanks Lachlan Good to know Python and Django is so cool and full of fancy stuff. Have a good day Den søndag den 22. juni 2014 13.07.20 UTC+2 skrev Lachlan Musicman: > > I'm a big fan of pip-tools: > > pip install pip-tools > > Once installed, you can do: > > pip-review --interactive > > which

Re: Howto update a package in venv

2014-06-25 Thread Michael Lind Hjulskov
That did the trick Tom Thanks alot for spending Your time on me. Cheers Den lørdag den 21. juni 2014 23.29.24 UTC+2 skrev Tom Evans: > > On Sat, Jun 21, 2014 at 4:57 PM, Michael Lind Hjulskov > > wrote: > > Hi > > > > Im relative new to Django and Linux commands etc. > > I hope to get help in

on manage.py migrate appname I get: AttributeError: 'module' object has no attribute 'Migration'

2014-06-25 Thread Michael Lind Hjulskov
Hi there :) I'm stuck with this problem when I run python manage.py migrate myappname i get the following error: AttributeError: 'module' object has no attribute 'Migration' I remember I had this problem before, and I remember that I solved it by deleting all pyc files - I tried that - still e

Re: apps for hotel site

2014-06-25 Thread Sithembewena Lloyd Dube
That really depends on what functionality you want. Booking? Reporting? etc ... On Wed, Jun 25, 2014 at 3:41 PM, ngangsia akumbo wrote: > please what are the basic apps i need to include in my hotel website? > > > -- > You received this message because you are subscribed to the Google Groups >

django not reconnecting to database after mysql server restart

2014-06-25 Thread cercatrova2
Dear django'ers: Configuration: django 1.6.5, mysql connector/python 1.2.2, mysql server 5.5.37, apache worker 2.2.22 with mod_fastcgi, and python 3.3.5 on an otherwise stock and up-to-date ubuntu 12.04 setup. Problem: django is not reconnecting to the

apps for hotel site

2014-06-25 Thread ngangsia akumbo
please what are the basic apps i need to include in my hotel website? -- 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.

Re: Using session data to populate multiple forms

2014-06-25 Thread Aaron Reabow
haha - okay *model_instance.participant = request.session.get('participant')* works perfectly. I thought the incorrect use of objects was just the start :) Thanks Daniel, much appreciated. On Wednesday, 25 June 2014 11:07:19 UTC+2, Daniel Roseman wrote: > > On Wednesday, 25 June 2014 08:58:05

Re: admin generated form, change dropdown with selction from popup menu

2014-06-25 Thread Derek
Yes, you will need to use a third-party app such as django-selectable (http://django-selectable.readthedocs.org/en/v0.8.X/admin.html) On Wednesday, 25 June 2014 07:43:16 UTC+2, Aeh. ABID wrote: > > Is there a way to display a field value other than id in the textbox > > On Wednesday, June 25, 201

Re: WANTED: Photo Contest Package

2014-06-25 Thread tinkert
Photologue might be useful as part of the solution - I used it on a previous project some time ago, but it looks like it's still actively maintained: https://github.com/jdriscoll/django-photologue On Tuesday, 24 June 2014 13:31:15 UTC+1, André Meyer-Vitali wrote: > > Hi all > > I'm organising a

Re: Criar slideShow

2014-06-25 Thread Sandro Dutra
Você está em uma lista de discussão internacional, se espera alguma resposta, escreva em inglês. You're on international group, if you expect some answer, write in english. 2014-06-24 21:50 GMT-03:00 Carlos Andre : > Olá pessoal, tudo bem com todos? > Gostaria de uma solução que permita referen

Re: Using session data to populate multiple forms

2014-06-25 Thread Daniel Roseman
On Wednesday, 25 June 2014 08:58:05 UTC+1, Aaron Reabow wrote: > > Perhaps I should be more specific. > > How do i populate some fields in a table from a form, and other fields > from session variables in the view (or the template or the model if that > was more appropriate) > > many thanks, > >

Re: Using session data to populate multiple forms

2014-06-25 Thread Aaron Reabow
Perhaps I should be more specific. How do i populate some fields in a table from a form, and other fields from session variables in the view (or the template or the model if that was more appropriate) many thanks, aaron On Tuesday, 24 June 2014 18:21:02 UTC+2, Aaron Reabow wrote: > > Hi Dani

Re: Time Zone Problem when following on tutorial

2014-06-25 Thread miked
It respects the settings.py time zone not the system locale. This means your question needs to be addressed by someone smarter than me. Sorry Mike On 2014-06-25 16:42, mi...@dewhirst.com.au wrote: On 25/06/2014 7:44 AM, Jerry Wu wrote:> Thanks, Mike. I still have a question. In your code,