Re: What is different about "./manage.py shell" vs. normal Python shell that makes this list comprehension not work anymore?

2021-09-29 Thread Christian Seberino
ppts if (a.service in *allowed*)] > El lunes, 20 de septiembre de 2021 a las 8:46:07 UTC-6, cseb...@gmail.com > escribió: > >> I noticed a list comprehension bombs in the "./manage.py shell" shell >> that I think would >> be ok in normal Python shell. What is dif

Re: What is different about "./manage.py shell" vs. normal Python shell that makes this list comprehension not work anymore?

2021-09-29 Thread Josué Alvarez
py shell" shell that > I think would > be ok in normal Python shell. What is different about "./manage.py shell" > that makes it not like certain list comprehensions? > > Here is the code erase that I run this way..."./manage.py shell < erase" > >

What is different about "./manage.py shell" vs. normal Python shell that makes this list comprehension not work anymore?

2021-09-20 Thread cseb...@gmail.com
I noticed a list comprehension bombs in the "./manage.py shell" shell that I think would be ok in normal Python shell. What is different about "./manage.py shell" that makes it not like certain list comprehensions? Here is the code erase that I run this way..."./manage.

Re: Question regarding Interactive Python shell response and django

2020-04-30 Thread Derek
The Django shell is meant for direct use by an administrator working on >>> the server. >>> >>> On Sunday, 26 April 2020 16:05:02 UTC+2, Michael Karikari wrote: >>>> >>>> So I find myself in a pickle. >>>> I'm using an external p

Re: Post user input to django python shell??

2020-04-29 Thread Michael Karikari
ril 2020 16:05 > *To: *Django users > *Subject: *Post user input to django python shell?? > > > > Looking for some clarity to issue I'm having. > > > > I have external python API I'm hitting via a view, but it requires an > interactive input that appears

Re: Question regarding Interactive Python shell response and django

2020-04-29 Thread Michael Karikari
, Michael Karikari wrote: >>> >>> So I find myself in a pickle. >>> I'm using an external python API with Django, and as part of that >>> interaction, it asks for an input from the Django python shell window. What >>> I am trying to figure out i

Re: Question regarding Interactive Python shell response and django

2020-04-28 Thread Michael Karikari
API with Django, and as part of that >> interaction, it asks for an input from the Django python shell window. What >> I am trying to figure out is how can I get form input from web application >> to push back to the shell window. Appreciate it if anyone has experience on >

Re: Question regarding Interactive Python shell response and django

2020-04-27 Thread Derek
> I'm using an external python API with Django, and as part of that > interaction, it asks for an input from the Django python shell window. What > I am trying to figure out is how can I get form input from web application > to push back to the shell window. Appreciate it if anyone h

RE: Post user input to django python shell??

2020-04-26 Thread Divash Singh
Hi, Did you solve your issue yet? Sent from Mail for Windows 10 From: Michael Karikari Sent: Sunday, 26 April 2020 16:05 To: Django users Subject: Post user input to django python shell?? Looking for some clarity to issue I'm having. I have external python API I'm hitting via a vi

Re: Question regarding Interactive Python shell response and django

2020-04-26 Thread Ryan Nowakowski
On Sun, Apr 26, 2020 at 05:43:33AM -0700, Michael Karikari wrote: > So I find myself in a pickle. > I'm using an external python API with Django, and as part of that > interaction, it asks for an input from the Django python shell window. What > I am trying to figure out is h

Question regarding Interactive Python shell response and django

2020-04-26 Thread Michael Karikari
So I find myself in a pickle. I'm using an external python API with Django, and as part of that interaction, it asks for an input from the Django python shell window. What I am trying to figure out is how can I get form input from web application to push back to the shell window. Apprecia

Post user input to django python shell??

2020-04-26 Thread Michael Karikari
Looking for some clarity to issue I'm having. I have external python API I'm hitting via a view, but it requires an interactive input that appears in the Django shell prompt. I'm wondering how I can have end-user send posts to that input request. See screenshot -- You received this message b

Re: django-cms apphook urls don't work with reverse() using Python shell

2014-08-19 Thread Ramiro Morales
On Tue, Aug 19, 2014 at 8:14 AM, Philipp wrote: > [...] > > This is my urls.py file: > > urlpatterns = patterns('', > url(r'^(?P[\w\-]+)?', ArticleView.as_view(), > name='article-by-slug'), > ) > > [...] reverse('article_app:article-by-slug', kwargs={'slug': a.slug}) Try with:: reve

django-cms apphook urls don't work with reverse() using Python shell

2014-08-19 Thread Philipp
Hi everyone, I've created a django CMS apphook. Unfortunately I'm not able to reverse apphook urls using the Python shell. The cms_app.py file looks like: class ArticleApp (CMSApp): name = _('Article App') app_name = 'article_app' urls = ['art

Re: Python shell displays Segmentation Fault: 11 after upgrade to Mavericks OS

2013-10-25 Thread joel spencer
s/irking/working/ :) On Saturday, October 26, 2013 4:49:37 PM UTC+11, joel spencer wrote: > > i had this same problem after i upgraded my MBA to Mavericks. The > solution contained here works beautifully! > > The other thing that happened is that Mavericks completely wiped out all > my Python

Re: Python shell displays Segmentation Fault: 11 after upgrade to Mavericks OS

2013-10-25 Thread joel spencer
i had this same problem after i upgraded my MBA to Mavericks. The solution contained here works beautifully! The other thing that happened is that Mavericks completely wiped out all my Python libraries. I just restored them using time machine and they are irking fine again. And, yeah, i have

Re: Python shell displays Segmentation Fault: 11 after upgrade to Mavericks OS

2013-10-24 Thread donarb
On Thursday, October 24, 2013 2:34:13 PM UTC-7, Don Fox wrote: > > > > python manage.py shell > > Python 2.7.5 (v2.7.5:ab05e7dd2788, May 13 2013, 13:18:45) > > [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin > > Type "help", "copyright", "credits" or "license" for more information. >

Re: Python shell displays Segmentation Fault: 11 after upgrade to Mavericks OS

2013-10-24 Thread Thomas Lockhart
On 10/24/13 2:34 PM, Don Fox wrote: ... Segmentation fault: 11 This type of thing just started after upgrade. I assume there's a connection. I found a similar symptom with another application after doing piecemeal updates in MacPorts packages, and my problems went away with a more rigoro

Python shell displays Segmentation Fault: 11 after upgrade to Mavericks OS

2013-10-24 Thread Don Fox
python manage.py shell Python 2.7.5 (v2.7.5:ab05e7dd2788, May 13 2013, 13:18:45) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> from polls.models import Poll, Choice >>> Poll.objects

Re: Python shell doesn't launch

2012-12-26 Thread Ramiro Morales
hat I assume is the one you are following) when talking about running manage.py shell: "Now, let's hop into the interactive Python shell and play around with the free API Django gives you. To invoke the Python shell, use this command: python manage.py shell " ( https://docs.d

Re: Python shell doesn't launch

2012-12-26 Thread Ryan Blunden
Glad to be able to help. I've got a few tips too :) - Use the excellent Django Extensions app which once you add it to your INSTALLED_APPS tuple, will allow you to run python manage.py shell_plus, which automatically imports all of the models for apps. This is great as it's not often that yo

Re: Python shell doesn't launch

2012-12-26 Thread rkturn49
You know what? I didn't "expect" anything because I HAVEN'T DONE THIS BEFORE That is why I am doing an introductory tutorial. Thanks, Ramiro - highly intelligent answer. Ryan - you are a professional. On Wednesday, December 26, 2012 5:05:10 PM UTC-5, rktu...@gmail.com wrote: > > Whenever I

Re: Python shell doesn't launch

2012-12-26 Thread Gerald Klein
@cramm0 obviously new to the game, cut him a break. On Wed, Dec 26, 2012 at 4:11 PM, Ramiro Morales wrote: > On Dec 26, 2012 7:05 PM, wrote: > > > > Whenever I run "python manage.py shell," I don't get any errors, but I > get the following: > > > > C:\Python27\Lib\site-packages\django\bin\mysi

Re: Python shell doesn't launch

2012-12-26 Thread Ryan Blunden
That's Python's standard output when starting an interactive session. On 26/12/2012, at 2:05 PM, rktur...@gmail.com wrote: > Whenever I run "python manage.py shell," I don't get any errors, but I get > the following: > > C:\Python27\Lib\site-packages\django\bin\mysite>python manage.py shell >

Re: Python shell doesn't launch

2012-12-26 Thread Ramiro Morales
On Dec 26, 2012 7:05 PM, wrote: > > Whenever I run "python manage.py shell," I don't get any errors, but I get the following: > > C:\Python27\Lib\site-packages\django\bin\mysite>python manage.py shell > Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win > 32 > Type "

Python shell doesn't launch

2012-12-26 Thread rkturn49
Whenever I run "python manage.py shell," I don't get any errors, but I get the following: *C:\Python27\Lib\site-packages\django\bin\mysite>python manage.py shell* *Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win* *32* *Type "help", "copyright", "credits" or "lic

Re: Calling "manage.py shell" from the Python Shell in Tutorial Part 1

2012-02-27 Thread Sami Balbaky
Thanks everyone. Your inputs were a tremendous help. I'm slowly, but surely, getting the hang of Django. Best, S On Wed, Feb 22, 2012 at 9:19 AM, Bill Freeman wrote: > 1. There is more information in that traceback (that you didn't > include) that could help > you find your indentation error.

Re: Calling "manage.py shell" from the Python Shell in Tutorial Part 1

2012-02-22 Thread Bill Freeman
1. There is more information in that traceback (that you didn't include) that could help you find your indentation error. 2. It is quite useful, presuming that you are also a python beginner, to do the tutorial at: http://docs.python.org/tutorial/index.html Bill On Tue, Feb 21, 2012 at 6:4

Re: Calling "manage.py shell" from the Python Shell in Tutorial Part 1

2012-02-21 Thread kalyani ram
Hey I am a begginer too and i went tru the same tutorial and trust me i had so many errors and i just struggled tru.. now indentation errors are quite common. what u need to do is, go to u models.py, admin.py, views.py or any other .py file for which ever the code is written, and plz try using pyth

Re: Calling "manage.py shell" from the Python Shell in Tutorial Part 1

2012-02-21 Thread Furbee
Python is indentation-specific. It determines the semantics of your code by it's levels of indentation. For instance: # print False if False: print "false" print "done" if False: print "false" else: print "true" Note that inside the if block, all lines which are indented belong to th

Calling "manage.py shell" from the Python Shell in Tutorial Part 1

2012-02-21 Thread Django_for_SB
Django Gurus, I'm an absolute beginner using Python in Django. I'm currently going through the tutorial, part 1, on the djangoproject.com main website: https://docs.djangoproject.com/en/1.3/intro/tutorial01/. I keep trying to complete part 1 of the tutorial, step by step, meaning, I'll go through

Re: Python Shell

2011-08-28 Thread j0ker
trick. On 28 Aug., 15:17, Kheyreddine Hadri wrote: > when I use Python shell to work with Django I allways get an error > when I use "def" or "for" or "while" : >   File "", line 2 >     pass >        ^ > IndentationError: expected an

Python Shell

2011-08-28 Thread Kheyreddine Hadri
when I use Python shell to work with Django I allways get an error when I use "def" or "for" or "while" : File "", line 2 pass ^ IndentationError: expected an indented block and when I create a template on the IDLE I get this message: Trac

Re: Different model behaviour in template tag and python shell?

2010-04-13 Thread Sven Richter
Haha, just like always, short after mailing it flashed to my mind. I named the class Business the same like the model Business, which of course, clashes with each other. Greetings Sven On Tue, Apr 13, 2010 at 11:09 PM, Sven Richter wrote: > Hi everybody, > > i have some problem i just dont under

Different model behaviour in template tag and python shell?

2010-04-13 Thread Sven Richter
Hi everybody, i have some problem i just dont understand. I have a business model (derived from django namespace): class Business(models.Model): business = models.ForeignKey("self", related_name="other_business") name = models.CharField(max_length=50, unique=True) ... objects = Busines

Re: Browsing Django modules from interactive python shell

2009-12-02 Thread Kenny Meyer
ore .) > > On Wed, Dec 2, 2009 at 11:14 AM, Kenny Meyer > wrote: > > Hi guys, > > > > I have some strange behaviour in my interactive python shell, when > > trying to browse Django modules... > > > > Example: > > > >>>> import django &g

Re: Browsing Django modules from interactive python shell

2009-12-02 Thread Frank DiRocco
Hello Kenny, As Bill mentioned in this threads parallel thread, you are prolly just entring the python shell like thiis $ python Instead try this from you projects directory (django_site\mysite) $ python manage.py shell As bill mentioned all kindsa magical cool stuff happens... fdiro

Re: Browsing Django modules from interactive python shell

2009-12-02 Thread Kenny Meyer
, 'template', 'utils', 'views'] > >>> dir(django.core) > ['__builtins__', '__doc__', '__file__', '__name__', '__package__', > '__path__', 'cache', 'exceptions', '

Re: Browsing Django modules from interactive python shell

2009-12-02 Thread Bill Freeman
ady caused django.core to be imported, so it's available. (And Frank was probably using the manage.py shell, thus finding that he didn't have to separately import django.core .) On Wed, Dec 2, 2009 at 11:14 AM, Kenny Meyer wrote: > Hi guys, > > I have some strange behaviour i

Re: Browsing Django modules from interactive python shell

2009-12-02 Thread Frank DiRocco
;__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', 'cache', 'exceptions', 'files', 'management', 'signals', 'urlresolvers'] On Dec 2, 2009, at 11:

Browsing Django modules from interactive python shell

2009-12-02 Thread Kenny Meyer
Hi guys, I have some strange behaviour in my interactive python shell, when trying to browse Django modules... Example: >>> import django >>> dir(django.core) AttributeError: 'module' object has no attribute 'core' >>> import django.core

Re: mymodel.save() does not work in django but works in python shell

2009-05-11 Thread Karen Tracey
On Mon, May 11, 2009 at 1:22 PM, NoviceSortOf wrote: > Now get this -- if I add a 'return' to the end of the function it adds > the rows -- why is this? > This, combined with the sequence number increasing but being unable to actually see rows added, makes me think perhaps without the return wher

Re: mymodel.save() does not work django view but works in python shell

2009-05-11 Thread NoviceSortOf
> Michael I appreciate your answer... I omited in my code example was the assert False that was being used to debug the problem, so intuitively you were right something was wrong with the code With the assert False though it was bringing up the debugger and I could view the variables. Without t

Re: mymodel.save() does not work in django but works in python shell

2009-05-11 Thread NoviceSortOf
rding seeing what is in the database via django and python over the last 5 months, including ; additions to registration table and profile entries, adding tables via manage.py and about ever other function I can imagine. I'm baffled why my own attempts to add data to the tables is not worki

Re: mymodel.save() does not work django view but works in python shell

2009-05-11 Thread Michael
On Mon, May 11, 2009 at 11:05 AM, NoviceSortOf wrote: > > from views.py > > def testit(): >from myproject.models import NewCust >p1 = NewCust() ## Create blank instance >p1.zipcode = '222' ## Load something into it. >p1.last_name = 'Smith' >p1.save()

Re: mymodel.save() does not work in django but works in python shell

2009-05-11 Thread Karen Tracey
On Mon, May 11, 2009 at 11:32 AM, NoviceSortOf wrote: > > > An observation I've made it that django does update the related > sequence_id table of the table but does not add a row to the table. > How are you deciding it's not working? Are you seeing errors? Does the object have a pk assigned af

Re: mymodel.save() does not work in django but works in python shell

2009-05-11 Thread NoviceSortOf
An observation I've made it that django does update the related sequence_id table of the table but does not add a row to the table. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to th

mymodel.save() does not work django view but works in python shell

2009-05-11 Thread NoviceSortOf
.save() is not working for me either with models or with forms in django. I'll start with a simple example, on a single non related table. from views.py def testit(): from myproject.models import NewCust p1 = NewCust() ## Create blank instance p1.zipcode = '222' ##

Re: Upload an ImageField from the Python shell

2009-03-24 Thread Matías Costa
On Tue, Mar 24, 2009 at 4:10 PM, Rit wrote: > > How can I set an ImageField of a model from within the Python shell? > > > ImageField and FileField are just strings. They get special treatment in forms, OK, but your model instance attribute i

Upload an ImageField from the Python shell

2009-03-24 Thread Rit
How can I set an ImageField of a model from within the Python shell? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegro

Re: DJANGO_SETTINGS_MODULE ERROR using Django models from python shell

2007-08-07 Thread Bruno Tikami
Hi everybody (specially Malcom), After a long period, I had time to delte the unecessary variables and test it. So, finally, the goes the list of settigns you must include on you default settings file in order to use you application models outside Django web context (a python server side script fo

Re: DJANGO_SETTINGS_MODULE ERROR using Django models from python shell

2007-05-11 Thread Bruno Tikami
Malcolm, it works Thanks a lot, I shall delete the unecessary global settings. TKS!!! Tkm On 5/11/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > > Hi Bruno, > > On Fri, 2007-05-11 at 11:11 -0300, Bruno Tikami wrote: > > Hello Malcolm > > > > Thanks for you fast reply > > > > I'

Re: DJANGO_SETTINGS_MODULE ERROR using Django models from python shell

2007-05-11 Thread Malcolm Tredinnick
Hi Bruno, On Fri, 2007-05-11 at 11:11 -0300, Bruno Tikami wrote: > Hello Malcolm > > Thanks for you fast reply > > I'll try to put the missing settings on my project.settings . Do I > have to call configure() in some diferent way after I do that? I mean, > if my settings have all the global

Re: DJANGO_SETTINGS_MODULE ERROR using Django models from python shell

2007-05-11 Thread Bruno Tikami
Hello Malcolm Thanks for you fast reply I'll try to put the missing settings on my project.settings . Do I have to call configure() in some diferent way after I do that? I mean, if my settings have all the global settings... On 5/11/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > > On

Re: DJANGO_SETTINGS_MODULE ERROR using Django models from python shell

2007-05-11 Thread Malcolm Tredinnick
On Fri, 2007-05-11 at 22:53 +1000, Malcolm Tredinnick wrote: [...] > Manual configuration isn't really designed to make it trivial to specify > your normal settings file and some overrides like you are trying to do > here. I should point out that there wasn't really any technical reason for this

Re: DJANGO_SETTINGS_MODULE ERROR using Django models from python shell

2007-05-11 Thread Malcolm Tredinnick
On Fri, 2007-05-11 at 09:41 -0300, Bruno Tikami wrote: > Hi! > > I'm trying to use Django models from a python script and I'm having > some settings problem. Even though I called settings.configure, it > keeps ordering for some other setting parameter. The error is listed > below. Any idea? > >

DJANGO_SETTINGS_MODULE ERROR using Django models from python shell

2007-05-11 Thread Bruno Tikami
Hi! I'm trying to use Django models from a python script and I'm having some settings problem. Even though I called settings.configure, it keeps ordering for some other setting parameter. The error is listed below. Any idea? $ python >>> import recorder >>> import recorder.settings >>> from dja