Re: Upgrade Confusion with ForeignKey

2015-06-05 Thread Stephen J. Butler
I don't know if this is the problem, but... On Fri, Jun 5, 2015 at 4:44 PM, Tim Sawyer wrote: > class Venue(models.Model): > """ > A venue for a contest > """ > last_modified = > models.DateTimeField(default=datetime.now,editable=False) > created = models.DateTimeField(default

Re: how to get get-pip.py

2015-06-05 Thread Steve Burrus
*to everyone concerned : It's all goo d now! I not only got pip installed I also managed to upgrade it and got django going, and connected to the Server, synched my new database. So that is just about all the help which I require for now.* *On Fri, Jun 5, 2015 at 9:10 PM, dvdhbs > wrote:* > > >

Re: how to get get-pip.py

2015-06-05 Thread dvdhbs
Steve, Try this at a command prompt: py -3.4 -m pip install --upgrade pip You can't upgrade pip using pip directly on Windows. Best, Dave -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving email

Re: how to get get-pip.py

2015-06-05 Thread Russell Keith-Magee
On Fri, Jun 5, 2015 at 4:51 PM, Steve Burrus wrote: > Okay Monte I will certsainly "man up" and start over and try to do what > you said. > Hi Steve, A quick aside: I'm sure you didn't intend any offence, but using language like "man up" isn't something we support in the Django community. We as

Re: Upgrade Confusion with ForeignKey

2015-06-05 Thread Carl Meyer
Hi Tim, On 06/05/2015 04:26 PM, Tim Sawyer wrote: > Thanks. :-) > > Did that, read the release notes, made sure it worked after each upgrade > stage. This is an esoteric corner of my app, and I didn't notice it not > working. The other foreign key stuff I have seems to work ok. Ah, good! In th

Re: Upgrade Confusion with ForeignKey

2015-06-05 Thread Tim Sawyer
Thanks. :-) Did that, read the release notes, made sure it worked after each upgrade stage. This is an esoteric corner of my app, and I didn't notice it not working. The other foreign key stuff I have seems to work ok. Looks like I have more investigation to do...any more clues over what *co

Re: how to get get-pip.py

2015-06-05 Thread Gergely Polonkai
So it doesn’t work :) I’m not very familiar with Python on Windows (or Windows, in general), but this really seems to be a problem related to this. Have you also checked the permissions on the directory mentioned in the PermissionDenied message? 2015-06-05 23:53 GMT+02:00 Steve Burrus : > oh I t

Re: Upgrade Confusion with ForeignKey

2015-06-05 Thread Carl Meyer
Hi Tim, On 06/05/2015 03:44 PM, Tim Sawyer wrote: > I've just upgraded from a very old version of Django (1.4) up to 1.7.8, > and some behaviour isn't how I expect. I may have missed something - > I've not been keeping an eye on the framework changes. I would strongly recommend that you upgrade

Re: how to get get-pip.py

2015-06-05 Thread Steve Burrus
oh I thought tha t I told you thsat I *was *able to make python/pip work! It's just this little thing about not being able to upgrade pip which bothers me, just a little bit. and I am not trying to run pip with any other User other than myself. On Fri, Jun 5, 2015 at 1:50 PM, Gergely Polonkai wro

Upgrade Confusion with ForeignKey

2015-06-05 Thread Tim Sawyer
I've just upgraded from a very old version of Django (1.4) up to 1.7.8, and some behaviour isn't how I expect. I may have missed something - I've not been keeping an eye on the framework changes. Two models, Venue and VenueAlias. VenueAlias has a ForeignKey to Venue, one venue has many VenueA

Re: django subprocess doesnt like sleep

2015-06-05 Thread dk
some one put in contab -e ** * * * * systemctl resetart httpd* means that every minute the apache server is restarting and killing everything. that's why non of the script where working =( now that I commented that line from cron tab its working =). -- You received this message b

Re: django subprocess doesnt like sleep

2015-06-05 Thread Tom Lockhart
> On Jun 5, 2015, at 8:44 AM, dk wrote: > > I created a website that can reboot a machine. basically subprocess a script > that lunch the reboot command in Linux. > after that I need to run some other operations. after that I wait 1 minute > before start pinging the machine to see if its back

Re: how to get get-pip.py

2015-06-05 Thread Gergely Polonkai
It seems the very first thing you should do is make pip (and with that, Python) work. For this, you may want to go to a Python related mailing list, although I’m sure there are many overlapping between the Django list and that one. 2015-06-05 20:05 GMT+02:00 Steve Burrus : > well tqhat's okay. I

Re: Heisenbug to do with self.client losing its sessionstore

2015-06-05 Thread Peter Bengtsson
No :( It's still a mystery. It's really annoying. It resurfaced again about 2 weeks ago and it caused several test failures that I could never reproduce locally. I have some tests that look like this: class TestCase(DjangoTestCase): def setUp(self): super(TestCase, self).setUp()

Re: Bug in 1.7-1.8 migrations

2015-06-05 Thread Carl Meyer
Hi! On 06/05/2015 05:29 AM, Владислав Пискунов wrote: > In 1.7 auto-created migration with makemigrations. it contains: > > | > related_name=b'' > | > > Now in 1.8 while migrate, django tries Render model state and fails with: > [snip] > File > "/home/vladislav/.virtualenvs/furskru/local/li

Re: how to get get-pip.py

2015-06-05 Thread Steve Burrus
well tqhat's okay. I was absolutely struggling to get pip installed correctly for quite a long time! I need to see more videos on how to start to work with Django. You have any tips about t hat? On Fri, Jun 5, 2015 at 12:43 PM, DHaval Joshi wrote: > sry dear i don't know about windows installati

Re: how to get get-pip.py

2015-06-05 Thread DHaval Joshi
sry dear i don't know about windows installation. On Fri, Jun 5, 2015 at 10:20 PM, Gergely Polonkai wrote: > Hello, > > it seems that the user running pip doesn’t have write access to the temp > directory. You should check the permissions of > C:\Users\SteveB\AppData\Local\Temp and its subdi

Re: how to get get-pip.py

2015-06-05 Thread Gergely Polonkai
Hello, it seems that the user running pip doesn’t have write access to the temp directory. You should check the permissions of C:\Users\SteveB\AppData\Local\Temp and its subdirectories as you can see in the PermissionError line (just change the double backslashes (\\) to single ones (\). Is it po

Re: django subprocess doesnt like sleep

2015-06-05 Thread Vijay Khemlani
I don't think you should be doing that kind of work in the web server process. If you want to run a task that may take a long time to finish then use celery or something like that. On Fri, Jun 5, 2015 at 1:34 PM, dk wrote: > this is what I got from putting > *time.sleep(60)* > *print "s

Re: how to get get-pip.py

2015-06-05 Thread Steve Burrus
well moknte I got good/bad news for you! The GOOD news is that I finally got pip installed successfully but the BAD news is that I wasn't able to upgrade pip. Here is the resulting error when I tried to do that : "C:\Users\SteveB>pip install --upgrade pip You are using pip version 6.0.8, however v

Re: django subprocess doesnt like sleep

2015-06-05 Thread dk
this is what I got from putting *time.sleep(60)* *print "sleeped for 60secs"* *print 6* directly in the view. and this is what the httpd log gave me. *[Fri Jun 05 11:31:02.034913 2015] [mpm_prefork:notice] [pid 33231] AH00170: caught SIGWINCH, shutting down gracefully[Fri Jun 05 1

Re: how to get get-pip.py

2015-06-05 Thread Steve Burrus
Okay Monte I will certsainly "man up" and start over and try to do what you said. Incidentally I have done the "Add python.exe to the PATH" thing that you suggested but it still failed! I have done all of the configuration the right way but I still simply cannot type "pip" [into the command line

django subprocess doesnt like sleep

2015-06-05 Thread dk
I created a website that can reboot a machine. basically subprocess a script that lunch the reboot command in Linux. after that I need to run some other operations. after that I wait 1 minute before start pinging the machine to see if its back online. the funny thing my script doesn't work, and

Re: Heisenbug to do with self.client losing its sessionstore

2015-06-05 Thread mlpizarro
Hi, I am facing a similar issue and have not found any solution yet. I was wondering if you had been able to fix this? On Tuesday, 31 March 2015 22:27:32 UTC+2, Peter Bengtsson wrote: > > I have this code that looks something like this (django 1.6.11): > > def test_something(self): > url = so

Re: Implementing multiple user types with Django 1.7

2015-06-05 Thread Andreas Kuhne
Hi again Marcelle, It really depends on how you want to implement it. Here is one example which I think is pretty good: http://scopyleft.fr/blog/2013/django-model-advanced-user-inheritance/ This way you create a new model for each type you want (Handler, Employee and Client), and then you can ch

Re: Implementing multiple user types with Django 1.7

2015-06-05 Thread marcelle Kouam
thanks for your responses I read the tutos that you have sended me andreas but it just implement one user. but I want to have a structure which implements 3 types of users( handler, employee and client). can you give a clear example to do this. thank for your help Le vendredi 5 juin 2015 05:31:1

Re: Reduce number of calls to database

2015-06-05 Thread Cherie Pun
Thanks! On Friday, 5 June 2015 08:53:48 UTC+1, kel...@ist-total.org wrote: > > On Fri Jun 5 08:32:52 2015 GMT+0100, Cherie Pun wrote: > > > > Thanks! Would this still give 404 errors when a certain object does not > > exist? > > Nope, but if you really need to ensure all ids exist in the datab

Re: Is it possible to connect django to apache derby as a database?

2015-06-05 Thread Florian Apolloner
If it speaks SQL you can just write your own backend for it, but that is probably a bit of work. On Friday, June 5, 2015 at 2:05:40 PM UTC+1, Uk Jo wrote: > > I am a newbie about Django and Python. But I attended the basic lecture of > python. So I will implement my web application. > I want to

Is it possible to connect django to apache derby as a database?

2015-06-05 Thread Uk Jo
I am a newbie about Django and Python. But I attended the basic lecture of python. So I will implement my web application. I want to use apache derby. Is is possible? I am proud of being one of member in this group. Thanks. -- You received this message because you are subscribed to the Google G

Bug in 1.7-1.8 migrations

2015-06-05 Thread Владислав Пискунов
In 1.7 auto-created migration with makemigrations. it contains: related_name=b'' Now in 1.8 while migrate, django tries Render model state and fails with: File "/home/vladislav/.virtualenvs/furskru/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_fr

I need ur help.

2015-06-05 Thread Wandy Lau
I am new to django. I want to write some templates for my app. And write it. But It is seems not loaded. The structure of the template is below: mysite/templates/admin is for overriding the admin mysite/myapp/templates/myapp/* is for my app. So far it works well. But it just loads the template

Re: Django vs ExtJS

2015-06-05 Thread Antonio Saponara
Hi I am developing my REST proxy for Sencha, I have tested with ExtJS and Sencha Touch frameworks and it does support, pagination, remote filters, remote sorting and so on. It's developed with Zend Framework 2 and can support different DB types on the same installation. Have a look at: http:/

Re: Implementing multiple user types with Django 1.7

2015-06-05 Thread Daniel França
You can define different groups for each role and assign the users to the groups. Em sex, 5 de jun de 2015 às 11:24, Andreas Kuhne escreveu: > Hi Marcelle, > > You should not use the user profile solution anymore, because you can now > create a custom User model instead. Check for example: > htt

Re: Implementing multiple user types with Django 1.7

2015-06-05 Thread Andreas Kuhne
Hi Marcelle, You should not use the user profile solution anymore, because you can now create a custom User model instead. Check for example: http://www.lasolution.be/blog/creating-custom-user-model-django-16-part-1.html This way you can add fields that are needed for your user solutions in your

Re: Reduce number of calls to database

2015-06-05 Thread kelvan
On Fri Jun 5 08:32:52 2015 GMT+0100, Cherie Pun wrote: > > Thanks! Would this still give 404 errors when a certain object does not > exist? Nope, but if you really need to ensure all ids exist in the database, compare the length of your level_ids with levels.count() Make sure there are no dupli

Re: Reduce number of calls to database

2015-06-05 Thread Cherie Pun
Thanks! Would this still give 404 errors when a certain object does not exist? On Tuesday, 2 June 2015 17:07:49 UTC+1, Simon Charette wrote: > > Hi Cherie, > > A `id__in` queryset lookup should issue a single query. > > levels = Level.objects.filter(id__in=level_ids) > > Cheers, > Simon > > Le m