Migrations and FileField storage

2014-11-12 Thread Nico Benitez
I have a question about storage objects in a migration enabled project. I have a project that uses a file system storage backend for storing certain model FileFields, but the location is dependent on the deployment and stored in the settings module. For example, for testing locally I have the

Re: Modifying a ModelAdmin instance at runtime

2014-11-12 Thread Peter Sagerson
> Your analysis is entirely correct, as far as I can tell. Setting > attributes on `self` in a per-request method of a `ModelAdmin` is not > concurrency-safe, and it should not be recommended or demonstrated in > the docs. If you'd be willing to file a bug (or, better, a PR) to fix > this

Re: Modifying a ModelAdmin instance at runtime

2014-11-12 Thread Carl Meyer
Hi Peter, On 11/12/2014 10:59 PM, Peter Sagerson wrote: > I agree that setting self.exclude will set the instance attribute, > thus hiding the class attribute of the same name. However, it appears > that a given AdminSite instantiates each registered ModelAdmin once > at registration time.[1] The

Re: moving existing django projects

2014-11-12 Thread Carl Meyer
Hi Malik, On 11/12/2014 08:27 PM, Malik Rumi wrote: > Q: This is a ‘help me understand how this works / what it does’ question > rather than a ‘help me I’m stuck’ question. I have an existing Django > project I wanted to get on Heroku. I created a new site on Heroku, > uploaded my project, and

Re: Django + Database Connections

2014-11-12 Thread Edward Armes
Hi Russell, Thank you for your response it has mainly answered my questions as well as given me areas to think about where to insert the asynchronous layer. Edward On Tuesday, 11 November 2014 21:25:44 UTC, Russell Keith-Magee wrote: > > Hi Edward, > > On Tue, Nov 11, 2014 at 12:30 AM,

Re: Retrieving other fields along with ValueQueryset

2014-11-12 Thread Collin Anderson
Hello, I feel like this sort of query comes up a lot and there isn't a good solution. One option would be to somehow do a _second_ query that gets all of the Batting objects for each of the year, score pairs. Or, you could a query for each year and sort by score. Or, it might be possible to

Re: Modifying a ModelAdmin instance at runtime

2014-11-12 Thread Peter Sagerson
I agree that setting self.exclude will set the instance attribute, thus hiding the class attribute of the same name. However, it appears that a given AdminSite instantiates each registered ModelAdmin once at registration time.[1] The default AdminSite itself is a module global. Thus, any

Re: Chrome Desktop Notification for Django

2014-11-12 Thread Collin Anderson
Hello, >From a front-end standpoint, I personally like EventSource for this, though you could also use websockets or polling (checking every few minutes/seconds). https://developer.mozilla.org/en-US/docs/Web/API/EventSource http://en.wikipedia.org/wiki/Server-sent_events Collin On Tuesday,

Re: Modifying a ModelAdmin instance at runtime

2014-11-12 Thread Collin Anderson
On Tuesday, November 11, 2014 3:24:48 PM UTC-5, Peter Sagerson wrote: > > The documentation of ModelAdmin.get_form()[1] demonstrates modifying > self.exclude in order to modify the add/change form on a per-request basis. > However, looking at django.contrib.admin, it seems clear that ModelAdmin

Re: Where does django store auth migrations?

2014-11-12 Thread Collin Anderson
Hello, Just checking, do you have AUTH_USER_MODULE = 'emailcustomuser.User'? Did you mark emailcustomuser.User as "swappable" by chance? (I don't think you want to do that) Thanks, Collin On Monday, November 10, 2014 5:43:23 AM UTC-5, Dr Ed wrote: > > Hi Markus, > > I don't really think it's

Re: Newbie operational error with Django db tables

2014-11-12 Thread Collin Anderson
Hello, Very interesting. I wonder if the model isn't being noticed in syncdb because it's in models/downloads.py, and it's not referenced in models/__init__.py. Collin -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Re: Django auto fill recipient in Django_messages

2014-11-12 Thread Collin Anderson
Hello, What does your form_class look like? Thanks, Collin -- 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

Re: django 1.7 - help with change in "Save as new" behavior when related inlines are marked to be deleted

2014-11-12 Thread Collin Anderson
Hello, That does seem odd. Are you using a custom form or custom template at all? There shouldn't be a delete box for unsaved items, right? Collin -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Page reload hang using django (python 2.7 in linux)

2014-11-12 Thread Collin Anderson
Hello, My guess is the web app is stuck doing some IO or waiting for a subprocess. Collin -- 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

Re: HStoreField can't adapt type 'dict'

2014-11-12 Thread Collin Anderson
If anyone runs into this later, here's the ticket with the solution: https://code.djangoproject.com/ticket/23776 -- 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

Re: Using a foreign key id value triggers `refer_to_missing_field` error on migrate

2014-11-12 Thread Collin Anderson
Hello, You could try: ordering = ('rel__id',) Collin -- 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

Re: Beginner needs help with models.py for a Survey like Website

2014-11-12 Thread Collin Anderson
Hello, It seems to me you should merge your Picture and Collection model, right? because there's a collection of questions for each picture? So I thought that I need additional fields in the Picture class to safe the > average score, but what if my question list changes? Then I need to update

set the css class of a form widget based on the data

2014-11-12 Thread Michael
Hi, The ``attrs`` attribute of a widget allows to define the html attributes. For example, setting it to ``widget.attrs['class'] = 'class1 class2'`` will add ``class="class1 class2"`` on the rendered widget. However, how can I set them based on the data? I display an update form and I'd like

Re: django bulk sms

2014-11-12 Thread Collin Anderson
Hello, You may want to try the kannel mailing list. http://www.kannel.org/lists.shtml Collin -- 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

Re: Django and Ajax, Django not returning posted data.

2014-11-12 Thread Collin Anderson
Hello, In your first method (non-json), try console.log(data) in the success function. When you tried json, was there any other error in the console? What about the network tab? Collin -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Django expat error

2014-11-12 Thread Collin Anderson
Hello, Interesting. Could you post more of the traceback? Thanks, Collin -- 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

Re: geodjango application in rhel 6

2014-11-12 Thread Collin Anderson
Hello, It could help to post a traceback if you are still running into the problem. Thanks, Collin -- 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

Re: How do I migrate models from one app to another with django 1.7 migrations?

2014-11-12 Thread Collin Anderson
> > 2. I've moved my models to the new app but I have them using the tables > from the old app using Meta.db_table. How do I make migrations understand > what's going on and not try to delete my old tables? Once migrations gets > what's going on, how do I rename the old table so it fits the

moving existing django projects

2014-11-12 Thread Malik Rumi
Q: This is a ‘help me understand how this works / what it does’ question rather than a ‘help me I’m stuck’ question. I have an existing Django project I wanted to get on Heroku. I created a new site on Heroku, uploaded my project, and ran migrations. But all I have is a generic new, empty

Re: 1.7 migrations: problem with renamed upload_to function on FileField

2014-11-12 Thread Markus Holtermann
Hey Hans, As stated in the Docs (https://docs.djangoproject.com/en/1.7/topics/migrations/#historical-models) References to functions in field options such as upload_to and limit_choices_to are serialized in migrations, so the functions will need to be kept around for as long as there is a

1.7 migrations: problem with renamed upload_to function on FileField

2014-11-12 Thread Hans Lawrenz
I'm having a problem generating migrations after changing the function used for the upload_to parameter on a FileField. After removing the old function from my code and switching to using a closure to generate the function used by upload_to I get the following exception upon running

Re: Is django framework feasible for developing online LMS?

2014-11-12 Thread Aliane Abdelouahab
if you are planning to use a long opened connexion, you can check http://www.tornadoweb.org/en/stable/ it is easy, and you gonna like it, and it dont need a long learning curve, it has a templating engine like django. so, good luck :) Le mercredi 12 novembre 2014 08:20:22 UTC+1, Pradip Shahi a

Re: Is django framework feasible for developing online LMS?

2014-11-12 Thread Krishnakant Mane
I will recommend Django as the best for this kind of work. There is Meta studio which does exactly that and it is developed in Django. I suggest you go to www.gnowledge.org and see if you can find a link to the said project. happy hacking. Krishnakant. On 11/12/2014 07:42 PM, Avraham Serour

Re: Is django framework feasible for developing online LMS?

2014-11-12 Thread Scot Hacker
On Wednesday, November 12, 2014 8:11:16 AM UTC-8, Ari Davidow wrote: > > I am curious as to why you would write an LMS from scratch, rather than > use an existing framework--edX uses Django and that code is open-sourced > and available. Other open source possibilities, not relying on Django,

Re: Is django framework feasible for developing online LMS?

2014-11-12 Thread Scot Hacker
On Wednesday, November 12, 2014 7:54:18 AM UTC-8, Tom Evans wrote: > > > There is basically no difference between any web framework in terms of > features, so pick whichever one you want that is in the language you > know or wish to learn. > > Frameworks may all have roughly the same

Re: Is django framework feasible for developing online LMS?

2014-11-12 Thread Ari Davidow
I am curious as to why you would write an LMS from scratch, rather than use an existing framework--edX uses Django and that code is open-sourced and available. Other open source possibilities, not relying on Django, include Moodle and Sakai. Creating a professional environment that supports the

Re: Is django framework feasible for developing online LMS?

2014-11-12 Thread Tom Evans
On Wed, Nov 12, 2014 at 7:20 AM, Pradip Shahi wrote: > Hi everyone, I am new to Django web framework but familiar with python > programming. > I am planning to develop an online Learning Management system for a > college(client). > LMS covers online course and learning

Re: Issue in Django 1.7.1 with __unicode__ and admin site?

2014-11-12 Thread Arjan de Knegt
Thanks all, my problem solved and I gained some more knowledge on python 3 specifics. -- 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

modify attribute on a model based on the other attributes when it is added: model.clean method?

2014-11-12 Thread Michael
Hi, I would like to modify an attribute on a model based on the other attributes when it is added from the admin or elsewhere. For example: Model A: has FK to Model B has FK to Model C Model B: has FK to Model C When I create a Model A, I choose a Model B so I'd

Re: Looking for Django Python Developers to build Strong Application

2014-11-12 Thread Chetan Salvi
Hi Ankit, I will refer our own company Lotus Intelligent Systems which is progressing as start up Indian based company. We had developed many web applications in python using django. You can visit our website www.lotusintelligentsystems.com. Thanks Regards chetan salvi -- You received

Re: Is django framework feasible for developing online LMS?

2014-11-12 Thread Avraham Serour
what kind of answer do you expect asking if django is better than X on a django list? If you are already familiar with python it is worth to use a python based framework over something else you are not familiar with. But this is only one piece of the puzzle, you still need a deployment server,

How to keep backwards campabilities when upgradeing django to 1.7

2014-11-12 Thread Victor Liu
Hi all Considering that how much work will be done when upgrading our project from django 1.5 to django 1.7, I'd like to ask you guy some concerns. 1. The project structure are quite different between 1.5 and 1.7, what are careful points when doing this? 2. We use south, how do I keep

Is django framework feasible for developing online LMS?

2014-11-12 Thread Pradip Shahi
Hi everyone, I am new to Django web framework but familiar with python programming. I am planning to develop an online Learning Management system for a college(client). LMS covers online course and learning system. So, is it worth choosing django rather than other like Ruby on Rails or asp.net?

Re: how to test an application that's using a legacy database

2014-11-12 Thread David Palao
2014-11-12 0:25 GMT+01:00 Carl Meyer : > Hi David, > > On 11/11/2014 08:37 AM, dpalao.pyt...@gmail.com wrote: >> Dear Carl, >> >> Thank you for the answer. >> >> On Tuesday, November 11, 2014 3:13:18 PM UTC+1, Carl Meyer wrote: >> >> Hi David, >> >> On 11/11/2014 07:01

Re: Django + Database Connections

2014-11-12 Thread Edward Armes
HI guys, Thanks for your responses, they have indeed answered all my questions pretty much as I was mainly looking for information on how to modify how Django accesses it's ORM layer. However from your answer it seems that it would be better that I do it at the model layer. I apologize for being

Re: Issue in Django 1.7.1 with __unicode__ and admin site?

2014-11-12 Thread Leandro Zanuz
Don't do that, django recomends to use "python_2_unicode_compatible" decorator. https://docs.djangoproject.com/en/dev/topics/python3/#str-and-unicode-methods 2014-11-11 21:08 GMT-02:00 Mike Dewhirst : > On 12/11/2014 7:26 AM, Jorge Andrés Vergara Ebratt wrote: > >> When

Re: Import Error Module

2014-11-12 Thread Erik Cederstrand
> Den 12/11/2014 kl. 01.39 skrev Niall : > > Hi Erik, yes it is installed but it comes up with the following error when I > try to run the server again. > > I know that it is something simple like changing the PYTHONPATH so if you > could advise on why it is happening