Re: help with ManyToMany

2016-02-02 Thread dave.l
Hi Peter, Thank you -- that's perfect! On Monday, February 1, 2016 at 6:49:31 AM UTC, Peter of the Norse wrote: > > I hope you forgive me skipping all of that getattr nonsense. > > others = Studio.objects.filter(studio_group__in = > choice.studio_group_set.all()).exclude(pk=choice.pk) > > On

Re: How do I monitor views.py running

2016-02-02 Thread Liu Duan
Thank you for your help. Here is what I figured out: Anytime when views.py is changed it will run once, and the results will be shown on the server terminal window. But each function runs only the function is called. When a function is modified, the Class will run again.

Re: Django opportunity at UCL in Belgium

2016-02-02 Thread Rafael E. Ferrero
Too bad that this isn't for an Remote Work :'( Rafael E. Ferrero 2016-02-02 18:15 GMT-03:00 Hildeberto Mendonça : > For those living in Belgium, > > we are hiring a Django developer to work full time on open source projects > on GitHub for at least one year, extensible to

Django opportunity at UCL in Belgium

2016-02-02 Thread Hildeberto Mendonça
For those living in Belgium, we are hiring a Django developer to work full time on open source projects on GitHub for at least one year, extensible to another year.

Re: How to limit ForeignKey field to another model FK depending on value

2016-02-02 Thread Ahmad Zoughbi
Just for reference: i could get it to work by passing limit_choices_to to the "province" in Project model. class Project(models.Model): project_name = models.CharField(max_length=100) province = models.ForeignKey(Province, limit_choices_to={"country": 1}) -- You received this message

Re: Unintuitive behaviour of management commands with multiple databases

2016-02-02 Thread 'Vinay Sajip' via Django users
Dear Carl, On Tuesday, February 2, 2016 at 7:51:20 PM UTC, Carl Meyer wrote: > > > There's nothing wrong with connections[options.get('database')] if you > want to get a specific database connection object; that's public API and > you can use it. In the case of the built-in commands, that's

Re: Unintuitive behaviour of management commands with multiple databases

2016-02-02 Thread Carl Meyer
Hi Vinay, On 02/02/2016 12:14 PM, 'Vinay Sajip' via Django users wrote: > I'm not arguing for any particular different routing scheme to be > included - only for management commands to be able to be written to > respect --data arguments passed to them, and which can easily treat the > passed

Re: Unintuitive behaviour of management commands with multiple databases

2016-02-02 Thread 'Vinay Sajip' via Django users
Dear Carl, On Tuesday, February 2, 2016 at 6:23:34 PM UTC, Carl Meyer wrote: > > For this scenario, I would use a different settings file (which can all > "inherit" the same common settings via the `from common_settings import > *` trick) for each "customer", with a different default database

Re: How do I monitor views.py running

2016-02-02 Thread James Schneider
On Tue, Feb 2, 2016 at 9:52 AM, Liu Duan wrote: > If I insert a line in views.py like: > > Print “Hello world.” > > Is there a way I can see the result? > > > In other words, how do I monitor views.py running? > > > The preferred method is to use logging:

Re: Unintuitive behaviour of management commands with multiple databases

2016-02-02 Thread Carl Meyer
Hi Vinay, On 02/02/2016 10:56 AM, 'Vinay Sajip' via Django users wrote: > On Tuesday, February 2, 2016 at 5:08:40 PM UTC, Carl Meyer wrote: > > You can't (well, you might be able to by poking around in the internals > of the django.db.connections object, but I'd strongly advise against

How do I monitor views.py running

2016-02-02 Thread Liu Duan
If I insert a line in views.py like: Print “Hello world.” Is there a way I can see the result? In other words, how do I monitor views.py running? Thank you. -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Django installation guide on windows is not correct

2016-02-02 Thread Luis Zárate
did you have installed pip ? https://pip.pypa.io/en/stable/installing/ what version of pip do you have? -- 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: Unintuitive behaviour of management commands with multiple databases

2016-02-02 Thread 'Vinay Sajip' via Django users
Dear Carl, On Tuesday, February 2, 2016 at 5:08:40 PM UTC, Carl Meyer wrote: > > You can't (well, you might be able to by poking around in the internals > of the django.db.connections object, but I'd strongly advise against > that). The proper (and thread-safe) way to achieve the equivalent is

Re: How to know our Django version

2016-02-02 Thread James Bennett
As long as you have access to a shell, you can do python manage.py shell Then in the interpreter, do import django print(django.get_version()) On Tue, Feb 2, 2016 at 6:59 AM, wrote: > Hello all, > > thanks in advance for your help. > > i'm just integrating

How to know our Django version

2016-02-02 Thread communication
Hello all, thanks in advance for your help. i'm just integrating new office and they actually have a website based on Django. but we have no more contact with the web agency who developp this site. So i wanted to know what is the version of Django used by our site ? Could you please

Re: Unintuitive behaviour of management commands with multiple databases

2016-02-02 Thread Carl Meyer
Hi Vinay, On 02/02/2016 09:52 AM, 'Vinay Sajip' via Django users wrote: > > On Tuesday, February 2, 2016 at 3:27:10 PM UTC, Carl Meyer wrote: > > Nothing in your code ever "overrides" settings.DATABASES['default']. > > > Dear Carl, > > Thanks for the quick response. I /had/ thought of

Re: Unintuitive behaviour of management commands with multiple databases

2016-02-02 Thread 'Vinay Sajip' via Django users
On Tuesday, February 2, 2016 at 3:27:10 PM UTC, Carl Meyer wrote: > > Nothing in your code ever "overrides" settings.DATABASES['default']. > Dear Carl, Thanks for the quick response. I *had* thought of that, and tried adding the statement settings.DATABASES['default'] =

Re: Unintuitive behaviour of management commands with multiple databases

2016-02-02 Thread Carl Meyer
Hi Vinay, On 02/02/2016 08:11 AM, 'Vinay Sajip' via Django users wrote: > I've set up a simple project using with two databases, foo and bar in > settings.py: > > | > DATABASES ={ > 'foo':{ > 'ENGINE':'django.db.backends.sqlite3', > 'NAME':os.path.join(BASE_DIR,'foo.sqlite'),

Unintuitive behaviour of management commands with multiple databases

2016-02-02 Thread 'Vinay Sajip' via Django users
I've set up a simple project using with two databases, foo and bar in settings.py: DATABASES = { 'foo': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'foo.sqlite'), }, 'bar': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME':

Re: Re: help with the django tutorial part 1

2016-02-02 Thread Russell Stanfield
yes, that was it, thanks it's running now On Tuesday, February 2, 2016 at 2:16:45 PM UTC, 林攀 wrote: > > url(r'^/$, views.index, name='index'), > > > > > > -- > *林攀* > > At 2016-02-02 20:35:58,"Bipul Raj" wrote: > > >> url(r'^$, views.index, name='index'), > > Are you

Re: Re: help with the django tutorial part 1

2016-02-02 Thread Sergiy Khohlov
SHould be url(r'^$', views.index , name='index') you have missed ' Many thanks, Serge +380 636150445 skype: skhohlov On Tue, Feb 2, 2016 at 3:58 PM, 林攀 <18610710...@163.com> wrote: > url(r'^/$, views.index, name='index'), > > > > > > -- > *林攀* > > At 2016-02-02 20:35:58,"Bipul Raj"

Re:Re: help with the django tutorial part 1

2016-02-02 Thread 林攀
url(r'^/$, views.index, name='index'), -- 林攀 At 2016-02-02 20:35:58,"Bipul Raj" wrote: >> url(r'^$, views.index, name='index'), Are you sure if you have closing single quote with r'^$ ? I do not see it in error. On 2 February 2016 at 17:00, Russell Stanfield

Re: help with the django tutorial part 1

2016-02-02 Thread Bipul Raj
>> url(r'^$, views.index, name='index'), Are you sure if you have closing single quote with *r'^$* ? I do not see it in error. On 2 February 2016 at 17:00, Russell Stanfield wrote: > Hi, > > at this page: > >

Re: NameError: name 's' is not defined

2016-02-02 Thread Michal Petrucha
On Mon, Feb 01, 2016 at 07:39:48PM -0800, Murray Baker wrote: > *```* > *Murrays-MacBook-Pro:mysite MurrayBaker89$ python manage.py sqlmigrate > polls 0001* > *Traceback (most recent call last):* > * File "manage.py", line 10, in * > *execute_from_command_line(sys.argv)* > * File >

help with the django tutorial part 1

2016-02-02 Thread Russell Stanfield
Hi, at this page: https://docs.djangoproject.com/en/1.9/intro/tutorial01/ I have got this far in the tutorial: In the polls/urls.py file include the following code: polls/urls.py from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='index'),]

NameError: name 's' is not defined

2016-02-02 Thread Murray Baker
*```* *Murrays-MacBook-Pro:mysite MurrayBaker89$ python manage.py sqlmigrate polls 0001* *Traceback (most recent call last):* * File "manage.py", line 10, in * *execute_from_command_line(sys.argv)* * File

Re: How to implement read only permissions on models for django 1.8 ?

2016-02-02 Thread Ezequiel Bertti
Hi Deshraj, For django admin? Try this: http://stackoverflow.com/questions/8265328/readonly-models-in-django-admin-interface On Tue, Feb 2, 2016 at 7:50 AM, Deshraj Yadav wrote: > Hi everyone, > > I need help to build the read only permission in the default permissions

How to implement read only permissions on models for django 1.8 ?

2016-02-02 Thread Deshraj Yadav
Hi everyone, I need help to build the read only permission in the default permissions list in django. Please help. Thanks in advance. Regards, Deshraj -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: How to limit ForeignKey field to another model FK depending on value

2016-02-02 Thread Ahmad Zoughbi
Thanks James. But i think this solution will apply also on both models (WorkArea and Project) right? while i want to get it to work only on the field province of model *Project . * On Tuesday, February 2, 2016 at 12:22:20 AM UTC+2, James Schneider wrote: > > The question: In the model Project

Re: Django formtools wizard produces blank page (No error returned)

2016-02-02 Thread Martín Torre Castro
Yes, those two templates are both entirely the code posted. On 2 February 2016 at 10:07, James Schneider wrote: > > > On Tue, Feb 2, 2016 at 12:26 AM, Martín Torre Castro < > martin.torre.cas...@gmail.com> wrote: > >> I have DEBUG = True in my settings. When making the

Re: Django formtools wizard produces blank page (No error returned)

2016-02-02 Thread James Schneider
On Tue, Feb 2, 2016 at 12:26 AM, Martín Torre Castro < martin.torre.cas...@gmail.com> wrote: > I have DEBUG = True in my settings. When making the request the 200 http > code appears. The 500 "Internal server error" code only appears when trying > to obtain info through the django-debug-toolbar >

Re: Kind'a TL, but please DR - Need your thoughts

2016-02-02 Thread James Schneider
On Mon, Feb 1, 2016 at 10:49 PM, Mario R. Osorio wrote: > y So this is effectively a feed aggregation engine. I would recommend >> having a separate daemon running per media source, so that issues with one >> media source do not affect the operations of another. >> > > I

Re: Django formtools wizard produces blank page (No error returned)

2016-02-02 Thread Martín Torre Castro
I have DEBUG = True in my settings. When making the request the 200 http code appears. The 500 "Internal server error" code only appears when trying to obtain info through the django-debug-toolbar On 2 February 2016 at 00:06, James Schneider wrote: > > On Sun, Jan 31,