Re: syntax error while trying to run '$ django-admin startproject mysite' command on command terminal

2020-08-17 Thread coolguy
Hi Mike, since you didn't mention the exact error... just make sure you 
activated virtual environment and installed django in the directory you are 
in...

On Sunday, August 16, 2020 at 4:17:56 PM UTC-4, Michael O wrote:
>
> hello, i cd into the directory by cd\ to start a project and was welcomed 
> by the blinking '...'. i then typed $  $ django-admin startproject mysite 
> and I go syntax Error: invalid syntax. please help by pointing me in the 
> right direction so that I could continue to learn. Thank you.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9939f7c7-b789-4784-aef9-10ab9589b377o%40googlegroups.com.


Re: syntax error: export DJANGO_DEBUG=False

2019-10-12 Thread fishbite
Hi there,

Thank you for your answer, which is correct!

Much appreciated.

On Saturday, October 12, 2019 at 5:16:43 AM UTC+1, WD Wang wrote:
>
> hi,
>
> export DJANGO_DEBUG=False
> This is a shell command, you shouldn't add this to your settings.py.
>
> On Fri, Oct 11, 2019 at 9:51 PM fishbite > 
> wrote:
>
>> Hi there,
>>
>> My first post to this group!
>>
>> I've built the locallibrary project following the MDN tutorial and I'm 
>> now preparing to deploy the site on Heroku as described in the same 
>> tutorial and have added these lines to my settings.py file:
>>
>> *import os*
>> *SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', 
>> 'cg#p$g+j9tax!#a3cup@1$8obt2_++pmu)5%asj6yjpkag')*
>>
>>
>> export DJANGO_DEBUG=False
>>
>> I get:
>> SyntaxError: invalid syntax
>>
>> Has anyone else encountered this problem and / or know why it is occuring 
>> or how to resolve the issue?
>>
>> Thanks in advance for any help you can provide.
>>
>> -- 
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/779d99cf-2445-4dcf-9c37-e1f7d9ab7bf0%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6e585bf0-b9d7-4a59-a7ae-7df0c483a45e%40googlegroups.com.


Re: syntax error: export DJANGO_DEBUG=False

2019-10-11 Thread wd
hi,

export DJANGO_DEBUG=False
This is a shell command, you shouldn't add this to your settings.py.

On Fri, Oct 11, 2019 at 9:51 PM fishbite  wrote:

> Hi there,
>
> My first post to this group!
>
> I've built the locallibrary project following the MDN tutorial and I'm now
> preparing to deploy the site on Heroku as described in the same tutorial
> and have added these lines to my settings.py file:
>
> *import os*
> *SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', 
> 'cg#p$g+j9tax!#a3cup@1$8obt2_++pmu)5%asj6yjpkag')*
>
>
> export DJANGO_DEBUG=False
>
> I get:
> SyntaxError: invalid syntax
>
> Has anyone else encountered this problem and / or know why it is occuring
> or how to resolve the issue?
>
> Thanks in advance for any help you can provide.
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/779d99cf-2445-4dcf-9c37-e1f7d9ab7bf0%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABexzmi1SwbnXRGrYAm6OCxH3XO-%2B8mMj-pf2%3DUEjtDYpzgtcQ%40mail.gmail.com.


Re: Syntax Error django, python issue

2019-07-28 Thread Kean
Hi James,

Yes this worked. Thanks.

Best,

K
On 28 Jul 2019, at 19:45, James Schneider  wrote:

> 
> On Sun, Jul 28, 2019, 10:54 AM Kean  wrote:
> Hi Chetan
> 
> pls see setup below 
> 
> It looks like you may have copied in the ellipses (...) from the example. 
> Remove those lines and try again.
> 
> -James
> 
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CA%2Be%2BciWmVnVz8tckY1yf%3DU6nr2neZ_HbHK1K9pLc1NCkisCvGQ%40mail.gmail.com.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/B30771B5-DAFD-4E9B-BE92-1396485A0F0D%40gmail.com.


Re: Syntax Error django, python issue

2019-07-28 Thread James Schneider
On Sun, Jul 28, 2019, 10:54 AM Kean  wrote:

> Hi Chetan
>
> pls see setup below
>

It looks like you may have copied in the ellipses (...) from the example.
Remove those lines and try again.

-James

>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciWmVnVz8tckY1yf%3DU6nr2neZ_HbHK1K9pLc1NCkisCvGQ%40mail.gmail.com.


Re: Syntax Error django, python issue

2019-07-28 Thread Kean
Hi Chetan

pls see setup below settings.py



This is copied from 
https://django-allauth.readthedocs.io/en/latest/installation.html

Please can clarify in this context?

Best,

K




On 28 Jul 2019, at 18:46, Chetan Ganji  wrote:

> AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend',
> # your backends goes here,
> ]
> Regards,
> Chetan Ganji
> +91-900-483-4183
> ganji.che...@gmail.com
> http://ryucoder.in
> 
> 
> On Sun, Jul 28, 2019 at 11:12 PM Karreerchange  wrote:
> Hi,
> 
> Installing the authentication backend code in settings.py (copy paste..)
> server crashed after save reporting the following, 
> 
>   File "/Users/ProductionEnv/Desktop/devbnt/project/bnt/bnt/settings.py", 
> line 130
> 
> 'django.contrib.auth.backends.ModelBackend',
> 
>   ^
> 
> SyntaxError: invalid syntax
> 
> 
> Please can anyone help?
> 
> Thanks,
> 
> K
> 
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/8fce3582-f491-435e-93c1-73af137fff35%40googlegroups.com.
> 
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAMKMUjtVSrHBZ47bdpMECAhq%2B3EyKC5COtcz0xRwkjRr50TeRQ%40mail.gmail.com.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/877A5DF6-1FBD-4EEC-B273-6A28045BBF1B%40gmail.com.


Re: Syntax Error django, python issue

2019-07-28 Thread Chetan Ganji
AUTHENTICATION_BACKENDS

= ['django.contrib.auth.backends.ModelBackend',

# your backends goes here,

]

Regards,
Chetan Ganji
+91-900-483-4183
ganji.che...@gmail.com
http://ryucoder.in


On Sun, Jul 28, 2019 at 11:12 PM Karreerchange  wrote:

> Hi,
>
> Installing the authentication backend code in settings.py (copy paste..)
> server crashed after save reporting the following,
>
>   File "/Users/ProductionEnv/Desktop/devbnt/project/bnt/bnt/settings.py",
> line 130
>
> 'django.contrib.auth.backends.ModelBackend',
>
>   ^
>
> SyntaxError: invalid syntax
>
> Please can anyone help?
>
> Thanks,
>
> K
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/8fce3582-f491-435e-93c1-73af137fff35%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMKMUjtVSrHBZ47bdpMECAhq%2B3EyKC5COtcz0xRwkjRr50TeRQ%40mail.gmail.com.


Re: syntax error

2018-07-25 Thread deepali pandey
The problem was I was using code in command prompt instead of windows
powershell.. now the code is working when I am using it in shell

On Wed 25 Jul, 2018, 5:09 PM akash kandpal, <
9654263057akashkand...@gmail.com> wrote:

> In the she'll try this
> python
> import django
> print (django.VERSION)
>
>
> On Wed, Jul 25, 2018, 4:54 PM Akhil Reddy 
> wrote:
>
>> So what is the solution for this pblm..
>>
>>
>> On Wed 25 Jul, 2018 7:38 am deepali pandey, 
>> wrote:
>>
>>> $ python -m django --version showing syntax error? also i am unable to
>>> create a file.. i am using python 3.7 and django is already installed in my
>>> system, version of django is 2.0.7(which is compatible with python 3.7
>>>
>>> --
>>> 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 this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/efd25b07-1df8-49a6-adcf-ff658c480dd7%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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 this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAMeUrx_Qia08dttTnNd7ZZ9%3DRXegXVyHc9N00O6K8owhf%2BMHfw%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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 this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPND-h7fpu%3D8c9mW27uiGBqt5yn-uKfj4GgKk0fcSB%3Dsbb2ryA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAAp1KqXjdfQ5Tc5g_Jq7fdcYjtHgdKQ5VJKqBkfO2MNFz6pj5Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: syntax error

2018-07-25 Thread akash kandpal
In the she'll try this
python
import django
print (django.VERSION)


On Wed, Jul 25, 2018, 4:54 PM Akhil Reddy  wrote:

> So what is the solution for this pblm..
>
>
> On Wed 25 Jul, 2018 7:38 am deepali pandey, 
> wrote:
>
>> $ python -m django --version showing syntax error? also i am unable to
>> create a file.. i am using python 3.7 and django is already installed in my
>> system, version of django is 2.0.7(which is compatible with python 3.7
>>
>> --
>> 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 this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/efd25b07-1df8-49a6-adcf-ff658c480dd7%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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 this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMeUrx_Qia08dttTnNd7ZZ9%3DRXegXVyHc9N00O6K8owhf%2BMHfw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPND-h7fpu%3D8c9mW27uiGBqt5yn-uKfj4GgKk0fcSB%3Dsbb2ryA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: syntax error

2018-07-25 Thread Akhil Reddy
So what is the solution for this pblm..


On Wed 25 Jul, 2018 7:38 am deepali pandey, 
wrote:

> $ python -m django --version showing syntax error? also i am unable to
> create a file.. i am using python 3.7 and django is already installed in my
> system, version of django is 2.0.7(which is compatible with python 3.7
>
> --
> 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 this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/efd25b07-1df8-49a6-adcf-ff658c480dd7%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMeUrx_Qia08dttTnNd7ZZ9%3DRXegXVyHc9N00O6K8owhf%2BMHfw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Syntax error

2018-05-30 Thread Caleb Bryson
it did thanks :). and changing the { to ( helped also for anyone view for 
future reference
. 

On Wednesday, May 30, 2018 at 8:48:53 PM UTC-4, Michael MacIntosh wrote:
>
> Hi Caleb,
>
> I think there should be a comma here 
>
> basic.html' {'content'
>
> so it should be
>
> basic.html', {'content'
> Hope that helps!
>
> On 5/30/2018 5:45 PM, Caleb Bryson wrote:
>
> I can not seem to figure out what the syntax error is in line 7 of this 
> code, can anyone help 
>
> from django.shortcuts import render
> def index(request):
> return render(request, 'hybridair/home.html')
> def contact(request):
> return render(request, 'hybridair/basic.html' {'content' : ['contact the 
> team at', 'mar...@flymat21.com ']})
> -- 
> 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...@googlegroups.com .
> To post to this group, send email to django...@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/efe2686c-1e4d-477e-8057-90a81b1bef00%40googlegroups.com
>  
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
> -- 
> This message has been scanned for viruses and dangerous content by 
> *E.F.A. Project* , and is believed to be 
> clean. 
> Click here to report this message as spam. 
> 
>  
>
>
>

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5131b543-4ac1-49a9-8bc2-4bed615606d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Syntax error

2018-05-30 Thread Michael MacIntosh

Hi Caleb,

I think there should be a comma here

basic.html' {'content'

so it should be

basic.html', {'content'

Hope that helps!

On 5/30/2018 5:45 PM, Caleb Bryson wrote:
I can not seem to figure out what the syntax error is in line 7 of 
this code, can anyone help


from django.shortcuts import render
def index(request):
return render(request, 'hybridair/home.html')
def contact(request):
return render(request, 'hybridair/basic.html' {'content' : ['contact 
the team at', 'mar...@flymat21.com']})

--
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 this group, send email to django-users@googlegroups.com 
.

Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/efe2686c-1e4d-477e-8057-90a81b1bef00%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.

--
This message has been scanned for viruses and dangerous content by
*E.F.A. Project* , and is believed to be 
clean.
Click here to report this message as spam. 
 



--
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 this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f0630b9d-7eb2-b919-5cbe-1fdb1695e551%40linear-systems.com.
For more options, visit https://groups.google.com/d/optout.


Re: Syntax Error when trying to migrate to Postgresql

2018-02-17 Thread PASCUAL Eric
Office oriented editors tend to take initiatives for making the text prettier 
(at least, according to their "standards" ).


For programming tasks, you'd better use real programming editors. There are a 
lot of very good ones which are free, and even full IDEs. I'd strongly suggest 
PyCharm Community Edition in this category (I'm not endorsed by JetBrain and 
have no connection at all with them, apart from being a very happy user of 
their products).


Best


Eric

From: django-users@googlegroups.com <django-users@googlegroups.com> on behalf 
of Joe <joe.tennis6...@gmail.com>
Sent: Thursday, February 15, 2018 4:12:54 AM
To: Django users
Subject: Re: Syntax Error when trying to migrate to Postgresql

The problem was with the quotes being weird format, had to copy and paste the 
correct quotes in for it.  Thanks for the help!!

On Wednesday, February 14, 2018 at 9:59:06 PM UTC-5, Joe wrote:
I used TextEdit on Mac to edit the files, maybe using a different editor would 
work better.

On Wednesday, February 14, 2018 at 5:41:24 PM UTC-5, larry@gmail.com wrote:
On Wed, Feb 14, 2018 at 5:32 PM, Joe <joe.ten...@gmail.com> wrote:
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.postgresql',
> 'NAME': ‘postgres’,
> 'USER': ‘postgres’,
> 'PASSWORD': ‘*’,
> 'HOST': ‘localhost’,
> 'PORT': ‘8000’,
> }
> }

Looks like the quotes around the values are some non ascii character.
On my screen I see this:

‘

Change it to ' or "

Did you copy/paste that from Word perhaps?

--
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<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to 
django-users@googlegroups.com<mailto:django-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/872de896-e541-466b-a158-5bcc59e7914b%40googlegroups.com<https://groups.google.com/d/msgid/django-users/872de896-e541-466b-a158-5bcc59e7914b%40googlegroups.com?utm_medium=email_source=footer>.
For more options, visit https://groups.google.com/d/optout.

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/AM5P193MB0083482D171A3461E8EA184C8CCA0%40AM5P193MB0083.EURP193.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


Re: Syntax Error when trying to migrate to Postgresql

2018-02-14 Thread Joe
The problem was with the quotes being weird format, had to copy and paste 
the correct quotes in for it.  Thanks for the help!!

On Wednesday, February 14, 2018 at 9:59:06 PM UTC-5, Joe wrote:
>
> I used TextEdit on Mac to edit the files, maybe using a different editor 
> would work better.
>
> On Wednesday, February 14, 2018 at 5:41:24 PM UTC-5, larry@gmail.com 
> wrote:
>>
>> On Wed, Feb 14, 2018 at 5:32 PM, Joe  wrote: 
>> > 
>> > DATABASES = { 
>> > 'default': { 
>> > 'ENGINE': 'django.db.backends.postgresql', 
>> > 'NAME': ‘postgres’, 
>> > 'USER': ‘postgres’, 
>> > 'PASSWORD': ‘*’, 
>> > 'HOST': ‘localhost’, 
>> > 'PORT': ‘8000’, 
>> > } 
>> > } 
>>
>> Looks like the quotes around the values are some non ascii character. 
>> On my screen I see this: 
>>
>> ‘ 
>>
>> Change it to ' or " 
>>
>> Did you copy/paste that from Word perhaps? 
>>
>

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/872de896-e541-466b-a158-5bcc59e7914b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Syntax Error when trying to migrate to Postgresql

2018-02-14 Thread Joe
I used TextEdit on Mac to edit the files, maybe using a different editor 
would work better.

On Wednesday, February 14, 2018 at 5:41:24 PM UTC-5, larry@gmail.com 
wrote:
>
> On Wed, Feb 14, 2018 at 5:32 PM, Joe  
> wrote: 
> > 
> > DATABASES = { 
> > 'default': { 
> > 'ENGINE': 'django.db.backends.postgresql', 
> > 'NAME': ‘postgres’, 
> > 'USER': ‘postgres’, 
> > 'PASSWORD': ‘*’, 
> > 'HOST': ‘localhost’, 
> > 'PORT': ‘8000’, 
> > } 
> > } 
>
> Looks like the quotes around the values are some non ascii character. 
> On my screen I see this: 
>
> ‘ 
>
> Change it to ' or " 
>
> Did you copy/paste that from Word perhaps? 
>

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/92f1bbad-512c-439d-bc4a-d5ae68d41d32%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Syntax Error when trying to migrate to Postgresql

2018-02-14 Thread Larry Martell
On Wed, Feb 14, 2018 at 5:32 PM, Joe  wrote:
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.postgresql',
> 'NAME': ‘postgres’,
> 'USER': ‘postgres’,
> 'PASSWORD': ‘*’,
> 'HOST': ‘localhost’,
> 'PORT': ‘8000’,
> }
> }

Looks like the quotes around the values are some non ascii character.
On my screen I see this:

‘

Change it to ' or "

Did you copy/paste that from Word perhaps?

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACwCsY4Dsr54goCOTKfDJLm%2B5mfX5ZEVDvBv9_Xq%2BEyhAafNTQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Syntax Error when trying to migrate to Postgresql

2018-02-14 Thread Joe

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': ‘postgres’,
'USER': ‘postgres’,
'PASSWORD': ‘*’,
'HOST': ‘localhost’,
'PORT': ‘8000’,
}
}

On Wednesday, February 14, 2018 at 3:58:59 AM UTC-5, Andy wrote:
>
> Could you post a few more lines of this settings.py? Preferably the whole 
> DATABASES definition.
>
> Just in case there actually is a weird invisible character try retyping 
> 'postgresql', but more likely it looks as if you are using wrong quotation 
> marks other than ' or ". I dont even have on my keyboard whats in your 
> error message.
>
>
> Am Mittwoch, 14. Februar 2018 01:17:43 UTC+1 schrieb Joe:
>>
>> I have installed django, Postgresql, and psycopg2 and went to migrate a 
>> project to a new database I created on postgresql, This is the error 
>> message I got. 
>>
>> Traceback (most recent call last):
>>
>>   File "manage.py", line 15, in 
>>
>> execute_from_command_line(sys.argv)
>>
>>   File 
>> "/Users/JosephConrad/Desktop/Joetestsite/lib/python3.6/site-packages/django/core/management/__init__.py",
>>  
>> line 371, in execute_from_command_line
>>
>> utility.execute()
>>
>>   File 
>> "/Users/JosephConrad/Desktop/Joetestsite/lib/python3.6/site-packages/django/core/management/__init__.py",
>>  
>> line 317, in execute
>>
>> settings.INSTALLED_APPS
>>
>>   File 
>> "/Users/JosephConrad/Desktop/Joetestsite/lib/python3.6/site-packages/django/conf/__init__.py",
>>  
>> line 56, in __getattr__
>>
>> self._setup(name)
>>
>>   File 
>> "/Users/JosephConrad/Desktop/Joetestsite/lib/python3.6/site-packages/django/conf/__init__.py",
>>  
>> line 43, in _setup
>>
>> self._wrapped = Settings(settings_module)
>>
>>   File 
>> "/Users/JosephConrad/Desktop/Joetestsite/lib/python3.6/site-packages/django/conf/__init__.py",
>>  
>> line 106, in __init__
>>
>> mod = importlib.import_module(self.SETTINGS_MODULE)
>>
>>   File 
>> "/Users/JosephConrad/Desktop/Joetestsite/lib/python3.6/importlib/__init__.py",
>>  
>> line 126, in import_module
>>
>> return _bootstrap._gcd_import(name[level:], package, level)
>>
>>   File "", line 978, in _gcd_import
>>
>>   File "", line 961, in _find_and_load
>>
>>   File "", line 950, in 
>> _find_and_load_unlocked
>>
>>   File "", line 655, in _load_unlocked
>>
>>   File "", line 674, in exec_module
>>
>>   File "", line 781, in get_code
>>
>>   File "", line 741, in 
>> source_to_code
>>
>>   File "", line 205, in 
>> _call_with_frames_removed
>>
>>   File 
>> "/Users/JosephConrad/Desktop/Joetestsite/MySite/BudgetSite/settings.py", 
>> line 77
>>
>> ‘postgresql’: {
>>
>>^
>>
>> SyntaxError: invalid character in identifier
>>
>>
>>
>> I am able to migrate with sqllite but I can't migrate to postgresql.
>>
>

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/05c0666e-af6c-483e-9aca-a5730e210506%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Syntax Error when trying to migrate to Postgresql

2018-02-14 Thread Andy
Could you post a few more lines of this settings.py? Preferably the whole 
DATABASES definition.

Just in case there actually is a weird invisible character try retyping 
'postgresql', but more likely it looks as if you are using wrong quotation 
marks other than ' or ". I dont even have on my keyboard whats in your 
error message.


Am Mittwoch, 14. Februar 2018 01:17:43 UTC+1 schrieb Joe:
>
> I have installed django, Postgresql, and psycopg2 and went to migrate a 
> project to a new database I created on postgresql, This is the error 
> message I got. 
>
> Traceback (most recent call last):
>
>   File "manage.py", line 15, in 
>
> execute_from_command_line(sys.argv)
>
>   File 
> "/Users/JosephConrad/Desktop/Joetestsite/lib/python3.6/site-packages/django/core/management/__init__.py",
>  
> line 371, in execute_from_command_line
>
> utility.execute()
>
>   File 
> "/Users/JosephConrad/Desktop/Joetestsite/lib/python3.6/site-packages/django/core/management/__init__.py",
>  
> line 317, in execute
>
> settings.INSTALLED_APPS
>
>   File 
> "/Users/JosephConrad/Desktop/Joetestsite/lib/python3.6/site-packages/django/conf/__init__.py",
>  
> line 56, in __getattr__
>
> self._setup(name)
>
>   File 
> "/Users/JosephConrad/Desktop/Joetestsite/lib/python3.6/site-packages/django/conf/__init__.py",
>  
> line 43, in _setup
>
> self._wrapped = Settings(settings_module)
>
>   File 
> "/Users/JosephConrad/Desktop/Joetestsite/lib/python3.6/site-packages/django/conf/__init__.py",
>  
> line 106, in __init__
>
> mod = importlib.import_module(self.SETTINGS_MODULE)
>
>   File 
> "/Users/JosephConrad/Desktop/Joetestsite/lib/python3.6/importlib/__init__.py",
>  
> line 126, in import_module
>
> return _bootstrap._gcd_import(name[level:], package, level)
>
>   File "", line 978, in _gcd_import
>
>   File "", line 961, in _find_and_load
>
>   File "", line 950, in 
> _find_and_load_unlocked
>
>   File "", line 655, in _load_unlocked
>
>   File "", line 674, in exec_module
>
>   File "", line 781, in get_code
>
>   File "", line 741, in 
> source_to_code
>
>   File "", line 205, in 
> _call_with_frames_removed
>
>   File 
> "/Users/JosephConrad/Desktop/Joetestsite/MySite/BudgetSite/settings.py", 
> line 77
>
> ‘postgresql’: {
>
>^
>
> SyntaxError: invalid character in identifier
>
>
>
> I am able to migrate with sqllite but I can't migrate to postgresql.
>

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4a39755e-c408-4f6f-93a2-bde83fbc2bbd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Syntax Error at requested method GET !!!

2011-06-13 Thread Gagan (GPS)
Yes... Thank You...

On Jun 10, 6:22 pm, Tom Evans  wrote:
> On Fri, Jun 10, 2011 at 7:27 AM, Gagan (GPS)  wrote:
> > I have experienced this error on my Ubuntu 11.04. I am unable to even
> > view the / page on this site. Kindly help. I was trying to learn
> > Django by following the video regarding creating a wiki on
> > showmedo.com . The link to the video is:
> >http://showmedo.com/videotutorials/video?name=110=110
>
> > Kindly Help.
>
> > Following is the Traceback for reference.
>
> > Environment:
> >  18.   (r'^wikicamp/(?[^/]+)/save/$',
> >  245.         raise error, v # invalid expression
>
> This re is invalid, specifically "(?[^/]+)". I presume you
> meant "(?P[^/]+)".
>
> Cheers
>
> Tom

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Syntax Error at requested method GET !!!

2011-06-10 Thread Tom Evans
On Fri, Jun 10, 2011 at 7:27 AM, Gagan (GPS)  wrote:
> I have experienced this error on my Ubuntu 11.04. I am unable to even
> view the / page on this site. Kindly help. I was trying to learn
> Django by following the video regarding creating a wiki on
> showmedo.com . The link to the video is:
> http://showmedo.com/videotutorials/video?name=110=110
>
> Kindly Help.
>
> Following is the Traceback for reference.
>
> Environment:
>  18.   (r'^wikicamp/(?[^/]+)/save/$',
>  245.         raise error, v # invalid expression

This re is invalid, specifically "(?[^/]+)". I presume you
meant "(?P[^/]+)".

Cheers

Tom

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Syntax Error

2011-01-04 Thread hank23
OK. There were some problems with my django installation, due to the
OS upgrade on my machine, and things which were missing in at least
one environment variable. Since correcting these problems the basic
functionality of my tutorial site appears to be working again. Now I
appear to have at least one problem in my views.py file. Thanks for
the suggestion. It did helpme find the problem(s).

hank23

On Jan 4, 11:16 am, cewing  wrote:
> Is it possible that the problem is not in this urls.py, but rather in
> 'polls.urls'?
>
> I'd check line 20 there, just to see if there's an obvious python
> syntax error.
>
> HTH
>
> c
>
> On Jan 4, 8:08 am, hank23  wrote:
>
>
>
> > After removing the commented code, saving urls.py, restarting the
> > server and then requesting the sites admin page now I get the admin
> > login screen. But after I type in my username and pw then it again
> > gives me the following screen:
>
> > TemplateSyntaxError at /admin/
> > Caught SyntaxError while rendering: invalid syntax (urls.py, line
> > 20)Request Method: GET
> > Request URL:http://127.0.0.1:8000/admin/
> > Django Version: 1.2.3
> > Exception Type: TemplateSyntaxError
> > Exception Value: Caught SyntaxError while rendering: invalid syntax
> > (urls.py, line 20)
> > Exception Location: C:\Python27\lib\site-packages\django\utils
> > \importlib.py in import_module, line 35
> > Python Executable: C:\Python27\python.exe
> > Python Version: 2.7.1
> > Python Path: ['C:\\Documents and Settings\\hversemann\\djangoprojects\
> > \mysite', 'C:\\WINDOWS\\system32\\python27.zip', 'C:\\Python27\\DLLs',
> > 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\
> > \lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages']
> > Server time: Tue, 4 Jan 2011 09:45:54 -0600
>
> > and still references the same line in urls.py, which is confusing
> > because now it shouldn't have a line 20. Here's what urls.py currently
> > looks like:
>
> > from django.conf.urls.defaults import *
>
> > # Uncomment the next two lines to enable the admin:
> > from django.contrib import admin
> > admin.autodiscover()
>
> > urlpatterns = patterns('',
> >     (r'^polls/', include('polls.urls')),
> >     (r'^admin/', include(admin.site.urls)),
> > )
>
> > Could this problem be related to windows 7 environment variables not
> > being set properly? I ask because I was upgraded recently from Win XP
> > to Windows 7 and have been working to set up my environment variables
> > back to where they should be. I thought I had previously fixed all of
> > them, but maybe I missed something. Please advise. Thanks.
>
> > On Jan 4, 9:36 am, Piotr Zalewa  wrote:
>
> > > what happens if you'remove the commented lines?
>
> > > On 01/04/11 15:22, hank23 wrote:
>
> > > > Can someone explain to me what the following error is trying to tell
> > > > me:
>
> > > > SyntaxError at /polls/1
> > > > invalid syntax (urls.py, line 20)Request Method: GET
> > > > Request URL:http://127.0.0.1:8000/polls/1
> > > > Django Version: 1.2.3
> > > > Exception Type: SyntaxError
> > > > Exception Value: invalid syntax (urls.py, line 20)
> > > > Exception Location: C:\Python27\lib\site-packages\django\utils
> > > > \importlib.py in import_module, line 35
> > > > Python Executable: C:\Python27\python.exe
> > > > Python Version: 2.7.1
> > > > Python Path: ['C:\\Documents and Settings\\hversemann\\djangoprojects\
> > > > \mysite', 'C:\\WINDOWS\\system32\\python27.zip', 'C:\\Python27\\DLLs',
> > > > 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\
> > > > \lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages']
> > > > Server time: Tue, 4 Jan 2011 09:12:32 -0600
>
> > > > The urls.py module that it is referring to looks like this:
>
> > > > from django.conf.urls.defaults import *
>
> > > > # Uncomment the next two lines to enable the admin:
> > > > from django.contrib import admin
> > > > admin.autodiscover()
>
> > > > #urlpatterns = patterns('',
> > > >     # Example:
> > > >     # (r'^mysite/', include('mysite.foo.urls')),
> > > >     # Uncomment the admin/doc line below to enable admin
> > > > documentation:
> > > >     # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
> > > >     # Uncomment the next line to enable the admin:
> > > >     # (r'^admin/', include(admin.site.urls)),    (r'^polls/$',
> > > > 'polls.views.index'),
> > > > #    (r'^polls/(?P\d+)/$', 'polls.views.detail'),
> > > > #    (r'^polls/(?P\d+)/results/$', 'polls.views.results'),
> > > > #    (r'^polls/(?P\d+)/vote/$', 'polls.views.vote'),
> > > > #    (r'^admin/', include(admin.site.urls)),
> > > > #)
>
> > > > urlpatterns = patterns('',
> > > >     (r'^polls/', include('polls.urls')),
> > > >     (r'^admin/', include(admin.site.urls)),
> > > > )
>
> > > > and I thought it had previously worked ok when I last tried to use it
> > > > back on the 23rd. I would appreciate any help or direction in
> > > > debugging this since 

Re: Syntax Error

2011-01-04 Thread cewing
Is it possible that the problem is not in this urls.py, but rather in
'polls.urls'?

I'd check line 20 there, just to see if there's an obvious python
syntax error.

HTH

c

On Jan 4, 8:08 am, hank23  wrote:
> After removing the commented code, saving urls.py, restarting the
> server and then requesting the sites admin page now I get the admin
> login screen. But after I type in my username and pw then it again
> gives me the following screen:
>
> TemplateSyntaxError at /admin/
> Caught SyntaxError while rendering: invalid syntax (urls.py, line
> 20)Request Method: GET
> Request URL:http://127.0.0.1:8000/admin/
> Django Version: 1.2.3
> Exception Type: TemplateSyntaxError
> Exception Value: Caught SyntaxError while rendering: invalid syntax
> (urls.py, line 20)
> Exception Location: C:\Python27\lib\site-packages\django\utils
> \importlib.py in import_module, line 35
> Python Executable: C:\Python27\python.exe
> Python Version: 2.7.1
> Python Path: ['C:\\Documents and Settings\\hversemann\\djangoprojects\
> \mysite', 'C:\\WINDOWS\\system32\\python27.zip', 'C:\\Python27\\DLLs',
> 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\
> \lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages']
> Server time: Tue, 4 Jan 2011 09:45:54 -0600
>
> and still references the same line in urls.py, which is confusing
> because now it shouldn't have a line 20. Here's what urls.py currently
> looks like:
>
> from django.conf.urls.defaults import *
>
> # Uncomment the next two lines to enable the admin:
> from django.contrib import admin
> admin.autodiscover()
>
> urlpatterns = patterns('',
>     (r'^polls/', include('polls.urls')),
>     (r'^admin/', include(admin.site.urls)),
> )
>
> Could this problem be related to windows 7 environment variables not
> being set properly? I ask because I was upgraded recently from Win XP
> to Windows 7 and have been working to set up my environment variables
> back to where they should be. I thought I had previously fixed all of
> them, but maybe I missed something. Please advise. Thanks.
>
> On Jan 4, 9:36 am, Piotr Zalewa  wrote:
>
>
>
> > what happens if you'remove the commented lines?
>
> > On 01/04/11 15:22, hank23 wrote:
>
> > > Can someone explain to me what the following error is trying to tell
> > > me:
>
> > > SyntaxError at /polls/1
> > > invalid syntax (urls.py, line 20)Request Method: GET
> > > Request URL:http://127.0.0.1:8000/polls/1
> > > Django Version: 1.2.3
> > > Exception Type: SyntaxError
> > > Exception Value: invalid syntax (urls.py, line 20)
> > > Exception Location: C:\Python27\lib\site-packages\django\utils
> > > \importlib.py in import_module, line 35
> > > Python Executable: C:\Python27\python.exe
> > > Python Version: 2.7.1
> > > Python Path: ['C:\\Documents and Settings\\hversemann\\djangoprojects\
> > > \mysite', 'C:\\WINDOWS\\system32\\python27.zip', 'C:\\Python27\\DLLs',
> > > 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\
> > > \lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages']
> > > Server time: Tue, 4 Jan 2011 09:12:32 -0600
>
> > > The urls.py module that it is referring to looks like this:
>
> > > from django.conf.urls.defaults import *
>
> > > # Uncomment the next two lines to enable the admin:
> > > from django.contrib import admin
> > > admin.autodiscover()
>
> > > #urlpatterns = patterns('',
> > >     # Example:
> > >     # (r'^mysite/', include('mysite.foo.urls')),
> > >     # Uncomment the admin/doc line below to enable admin
> > > documentation:
> > >     # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
> > >     # Uncomment the next line to enable the admin:
> > >     # (r'^admin/', include(admin.site.urls)),    (r'^polls/$',
> > > 'polls.views.index'),
> > > #    (r'^polls/(?P\d+)/$', 'polls.views.detail'),
> > > #    (r'^polls/(?P\d+)/results/$', 'polls.views.results'),
> > > #    (r'^polls/(?P\d+)/vote/$', 'polls.views.vote'),
> > > #    (r'^admin/', include(admin.site.urls)),
> > > #)
>
> > > urlpatterns = patterns('',
> > >     (r'^polls/', include('polls.urls')),
> > >     (r'^admin/', include(admin.site.urls)),
> > > )
>
> > > and I thought it had previously worked ok when I last tried to use it
> > > back on the 23rd. I would appreciate any help or direction in
> > > debugging this since I'm relatively new to both django and python.
> > > Thanks.
>
> > --
> > blog  http://piotr.zalewa.info
> > jobs  http://webdev.zalewa.info
> > twit  http://twitter.com/zalun
> > face  http://facebook.com/zaloon-Hide quoted text -
>
> > - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Syntax Error

2011-01-04 Thread hank23
After removing the commented code, saving urls.py, restarting the
server and then requesting the sites admin page now I get the admin
login screen. But after I type in my username and pw then it again
gives me the following screen:

TemplateSyntaxError at /admin/
Caught SyntaxError while rendering: invalid syntax (urls.py, line
20)Request Method: GET
Request URL: http://127.0.0.1:8000/admin/
Django Version: 1.2.3
Exception Type: TemplateSyntaxError
Exception Value: Caught SyntaxError while rendering: invalid syntax
(urls.py, line 20)
Exception Location: C:\Python27\lib\site-packages\django\utils
\importlib.py in import_module, line 35
Python Executable: C:\Python27\python.exe
Python Version: 2.7.1
Python Path: ['C:\\Documents and Settings\\hversemann\\djangoprojects\
\mysite', 'C:\\WINDOWS\\system32\\python27.zip', 'C:\\Python27\\DLLs',
'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\
\lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages']
Server time: Tue, 4 Jan 2011 09:45:54 -0600

and still references the same line in urls.py, which is confusing
because now it shouldn't have a line 20. Here's what urls.py currently
looks like:

from django.conf.urls.defaults import *

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
(r'^polls/', include('polls.urls')),
(r'^admin/', include(admin.site.urls)),
)


Could this problem be related to windows 7 environment variables not
being set properly? I ask because I was upgraded recently from Win XP
to Windows 7 and have been working to set up my environment variables
back to where they should be. I thought I had previously fixed all of
them, but maybe I missed something. Please advise. Thanks.



On Jan 4, 9:36 am, Piotr Zalewa  wrote:
> what happens if you'remove the commented lines?
>
> On 01/04/11 15:22, hank23 wrote:
>
>
>
>
>
> > Can someone explain to me what the following error is trying to tell
> > me:
>
> > SyntaxError at /polls/1
> > invalid syntax (urls.py, line 20)Request Method: GET
> > Request URL:http://127.0.0.1:8000/polls/1
> > Django Version: 1.2.3
> > Exception Type: SyntaxError
> > Exception Value: invalid syntax (urls.py, line 20)
> > Exception Location: C:\Python27\lib\site-packages\django\utils
> > \importlib.py in import_module, line 35
> > Python Executable: C:\Python27\python.exe
> > Python Version: 2.7.1
> > Python Path: ['C:\\Documents and Settings\\hversemann\\djangoprojects\
> > \mysite', 'C:\\WINDOWS\\system32\\python27.zip', 'C:\\Python27\\DLLs',
> > 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\
> > \lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages']
> > Server time: Tue, 4 Jan 2011 09:12:32 -0600
>
> > The urls.py module that it is referring to looks like this:
>
> > from django.conf.urls.defaults import *
>
> > # Uncomment the next two lines to enable the admin:
> > from django.contrib import admin
> > admin.autodiscover()
>
> > #urlpatterns = patterns('',
> >     # Example:
> >     # (r'^mysite/', include('mysite.foo.urls')),
> >     # Uncomment the admin/doc line below to enable admin
> > documentation:
> >     # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
> >     # Uncomment the next line to enable the admin:
> >     # (r'^admin/', include(admin.site.urls)),    (r'^polls/$',
> > 'polls.views.index'),
> > #    (r'^polls/(?P\d+)/$', 'polls.views.detail'),
> > #    (r'^polls/(?P\d+)/results/$', 'polls.views.results'),
> > #    (r'^polls/(?P\d+)/vote/$', 'polls.views.vote'),
> > #    (r'^admin/', include(admin.site.urls)),
> > #)
>
> > urlpatterns = patterns('',
> >     (r'^polls/', include('polls.urls')),
> >     (r'^admin/', include(admin.site.urls)),
> > )
>
> > and I thought it had previously worked ok when I last tried to use it
> > back on the 23rd. I would appreciate any help or direction in
> > debugging this since I'm relatively new to both django and python.
> > Thanks.
>
> --
> blog  http://piotr.zalewa.info
> jobs  http://webdev.zalewa.info
> twit  http://twitter.com/zalun
> face  http://facebook.com/zaloon- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Syntax Error

2011-01-04 Thread Piotr Zalewa
what happens if you'remove the commented lines?

On 01/04/11 15:22, hank23 wrote:
> Can someone explain to me what the following error is trying to tell
> me:
> 
> SyntaxError at /polls/1
> invalid syntax (urls.py, line 20)Request Method: GET
> Request URL: http://127.0.0.1:8000/polls/1
> Django Version: 1.2.3
> Exception Type: SyntaxError
> Exception Value: invalid syntax (urls.py, line 20)
> Exception Location: C:\Python27\lib\site-packages\django\utils
> \importlib.py in import_module, line 35
> Python Executable: C:\Python27\python.exe
> Python Version: 2.7.1
> Python Path: ['C:\\Documents and Settings\\hversemann\\djangoprojects\
> \mysite', 'C:\\WINDOWS\\system32\\python27.zip', 'C:\\Python27\\DLLs',
> 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\
> \lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages']
> Server time: Tue, 4 Jan 2011 09:12:32 -0600
> 
> The urls.py module that it is referring to looks like this:
> 
> from django.conf.urls.defaults import *
> 
> # Uncomment the next two lines to enable the admin:
> from django.contrib import admin
> admin.autodiscover()
> 
> #urlpatterns = patterns('',
> # Example:
> # (r'^mysite/', include('mysite.foo.urls')),
> # Uncomment the admin/doc line below to enable admin
> documentation:
> # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
> # Uncomment the next line to enable the admin:
> # (r'^admin/', include(admin.site.urls)),(r'^polls/$',
> 'polls.views.index'),
> #(r'^polls/(?P\d+)/$', 'polls.views.detail'),
> #(r'^polls/(?P\d+)/results/$', 'polls.views.results'),
> #(r'^polls/(?P\d+)/vote/$', 'polls.views.vote'),
> #(r'^admin/', include(admin.site.urls)),
> #)
> 
> urlpatterns = patterns('',
> (r'^polls/', include('polls.urls')),
> (r'^admin/', include(admin.site.urls)),
> )
> 
> 
> and I thought it had previously worked ok when I last tried to use it
> back on the 23rd. I would appreciate any help or direction in
> debugging this since I'm relatively new to both django and python.
> Thanks.
> 
> 


-- 
blog  http://piotr.zalewa.info
jobs  http://webdev.zalewa.info
twit  http://twitter.com/zalun
face  http://facebook.com/zaloon

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



RE: syntax error what am i doing wrong???

2009-10-26 Thread Vincent Jones

Thanks...it worked.

-Original Message-
From: django-users@googlegroups.com [mailto:django-us...@googlegroups.com]
On Behalf Of Daniel Roseman
Sent: Monday, October 26, 2009 7:01 PM
To: Django users
Subject: Re: syntax error what am i doing wrong???


On Oct 26, 10:35 pm, "jon...@cox.net" <jon...@cox.net> wrote:
> SyntaxError at /
>
> ('invalid syntax', ('c:\\Users\\Vincent\\Documents\\django_bookmarks\
> \..\\django_bookmarks\\bookmarks\\views.py', 15, 20, 'return Http
> Response(output)\n'))
>
> SCRIPT FROM VIEWS.PY
>
> from django.http import HttpResponse
> def main_page(request) :
>    output = '''
>   
>      %s
>      
>         %s%s
>      
>   
> ''' % (
>       'Django Bookmarks',
>       'Welcome to Django Bookmarks',
>       'Where you can store and share bookmarks!'
> )
> return HttpResponse(output)

Looks like your final line is not properly indented - should be lined
up with 'output', not 'def'.
--
DR.


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: syntax error what am i doing wrong???

2009-10-26 Thread Daniel Roseman

On Oct 26, 10:35 pm, "jon...@cox.net"  wrote:
> SyntaxError at /
>
> ('invalid syntax', ('c:\\Users\\Vincent\\Documents\\django_bookmarks\
> \..\\django_bookmarks\\bookmarks\\views.py', 15, 20, 'return Http
> Response(output)\n'))
>
> SCRIPT FROM VIEWS.PY
>
> from django.http import HttpResponse
> def main_page(request) :
>    output = '''
>   
>      %s
>      
>         %s%s
>      
>   
> ''' % (
>       'Django Bookmarks',
>       'Welcome to Django Bookmarks',
>       'Where you can store and share bookmarks!'
> )
> return HttpResponse(output)

Looks like your final line is not properly indented - should be lined
up with 'output', not 'def'.
--
DR.
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: syntax error what am i doing wrong???

2009-10-26 Thread Antoni Aloy

2009/10/26 jon...@cox.net :
>
> SyntaxError at /
>
> ('invalid syntax', ('c:\\Users\\Vincent\\Documents\\django_bookmarks\
> \..\\django_bookmarks\\bookmarks\\views.py', 15, 20, 'return Http
> Response(output)\n'))
>
> SCRIPT FROM VIEWS.PY
>
> from django.http import HttpResponse
> def main_page(request) :
>   output = '''
>  
>     %s
>     
>        %s%s
>     
>  
> ''' % (
>      'Django Bookmarks',
>      'Welcome to Django Bookmarks',
>      'Where you can store and share bookmarks!'
> )
> return HttpResponse(output)
>
> >
>

At first sight: you need triple quote string not single.

-- 
Antoni Aloy López
Blog: http://trespams.com
Site: http://apsl.net

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Syntax error

2009-09-15 Thread Maksymus007

On Tue, Sep 15, 2009 at 1:28 PM, Gonzalo Delgado
 wrote:
> El Tue, 15 Sep 2009 12:49:02 +0200
> Maksymus007  escribió:
>
>> {% if gates.forms %}
>>
>>     {% for form in gates.forms %}
>>
>>         {% if forloop.first %}
>>
>>         {% else %}
>>
>>         {% endif %}
>>
>>
>>     {% endfor $} < ?
>>
>>
>> >> {% else %}
>>
>> {% endif %}
>
>
> --
> P.U. Gonzalo Delgado 
> http://gonzalodelgado.com.ar/
>

Silly me :D Thanks!

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Syntax error

2009-09-15 Thread Gonzalo Delgado
El Tue, 15 Sep 2009 12:49:02 +0200
Maksymus007  escribió:

> {% if gates.forms %}
> 
>     {% for form in gates.forms %}
> 
>         {% if forloop.first %}
> 
>         {% else %}
> 
>         {% endif %}
> 
> 
>     {% endfor $} < ?
> 
> 
> >> {% else %}
> 
> {% endif %}


-- 
P.U. Gonzalo Delgado 
http://gonzalodelgado.com.ar/


pgpybCgIPfG82.pgp
Description: PGP signature


Re: Syntax error: "can't assign to operator"

2008-07-07 Thread bruno desthuilliers


On 5 juil, 04:33, Leaf <[EMAIL PROTECTED]> wrote:
> Okay. I'll run a quick find-and-replace to set all my identifiers to
> use underscores instead of hyphens. I'm not that familiar with Python,
> so I assumed that it would recognize hyphens as a seperator and not a
> minus sign.

There are very few programming languages that allow hyphens or other
special chars in identifiers.

(snip)
> > > class Style(models.Model):
> > > Style-Name = models.CharField("Style Name", Max_length = 32,
> > > Default = "Styles Upon Styles", Help_text = "A user-friendly name for
> > > the style.")

And while we're at it, the naming conventions in Python are
"all_lower_with_underscore" for anything else than class names.
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Syntax error: "can't assign to operator"

2008-07-04 Thread Leaf

Okay. I'll run a quick find-and-replace to set all my identifiers to
use underscores instead of hyphens. I'm not that familiar with Python,
so I assumed that it would recognize hyphens as a seperator and not a
minus sign.

Regards,
Leaf

On Jul 4, 10:27 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Fri, 2008-07-04 at 19:24 -0700, Leaf wrote:
> > I'm still working on the models.py for Dj Styles. I'm trying to create
> > a "Style" class, and the part of my code in question looks something
> > like this:
>
> > class Style(models.Model):
> >     Style-Name = models.CharField("Style Name", Max_length = 32,
> > Default = "Styles Upon Styles", Help_text = "A user-friendly name for
> > the style.")
>
> > Before resyncing the database, I hit the "Check Syntax" button in
> > PythonWin, and it returned "syntax error - can't assign to operator
> > (models.py, line 37)". Line 37 is the one beginning with Style-Name. I
> > tried searching the Internet for the syntax error, but couldn't find
> > anything that was particularly helpful. Does anyone know what's wrong
> > with my code that could be causing this error?
>
> Python thinks "Style-Name" is "Style - Name". You cannot use hyphens in
> identifiers. Looks like you need to slow down and take care that your
> Python is valid when you see these sorts of error messages.
>
> Malcolm
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Syntax error: "can't assign to operator"

2008-07-04 Thread Malcolm Tredinnick


On Fri, 2008-07-04 at 19:24 -0700, Leaf wrote:
> I'm still working on the models.py for Dj Styles. I'm trying to create
> a "Style" class, and the part of my code in question looks something
> like this:
> 
> class Style(models.Model):
> Style-Name = models.CharField("Style Name", Max_length = 32,
> Default = "Styles Upon Styles", Help_text = "A user-friendly name for
> the style.")
> 
> Before resyncing the database, I hit the "Check Syntax" button in
> PythonWin, and it returned "syntax error - can't assign to operator
> (models.py, line 37)". Line 37 is the one beginning with Style-Name. I
> tried searching the Internet for the syntax error, but couldn't find
> anything that was particularly helpful. Does anyone know what's wrong
> with my code that could be causing this error?

Python thinks "Style-Name" is "Style - Name". You cannot use hyphens in
identifiers. Looks like you need to slow down and take care that your
Python is valid when you see these sorts of error messages.

Malcolm



--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Syntax Error (line out of range), get_callable, urlresolvers

2007-12-30 Thread l5x

On Dec 31, 12:19 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote:

> Is 534 one past the last line of views.py?

Yes.

> I expect you have a syntax error
> such as a missing closing paren or bracket in your views.py file, which is
> causing the parser to keep scanning until it reaches the end of the file and
> then report the error on one line past the end of the file.  The error is
> probably near the end of the file.  For syntax errors you often have to look
> a little above where the error is reported to see what is really causing the
> problem.
>

Yes, I know about it, but I deleted my new parts of code and it is
still the same result. My Eclipse+PyDev doesn't show any mistakes as
well. If there is no other suggestions - I will just check my code
line by line to check what it may be.

Thank you.

Best regards,
l.
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Syntax Error (line out of range), get_callable, urlresolvers

2007-12-30 Thread Karen Tracey
On Dec 30, 2007 5:42 PM, l5x <[EMAIL PROTECTED]> wrote:

> Hello,
>
> I get the following error:
>
> Django Version: 0.97-pre-SVN-6976
> Python Version: 2.5.1
> Exception Type: SyntaxError
> Exception Value:invalid syntax (views.py, line 534)
> Exception Location: /home/user/django_src/django/core/urlresolvers.py
> in get_callable, line 47
>
> Traceback:
> [snipped]
> Exception Type: SyntaxError at /
> Exception Value: invalid syntax (views.py, line 534)
>
> Interesting thing is that line (534) is out of range...
>

Is 534 one past the last line of views.py?  I expect you have a syntax error
such as a missing closing paren or bracket in your views.py file, which is
causing the parser to keep scanning until it reaches the end of the file and
then report the error on one line past the end of the file.  The error is
probably near the end of the file.  For syntax errors you often have to look
a little above where the error is reported to see what is really causing the
problem.

Karen

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Syntax error with render_to_response call

2007-01-25 Thread Tipan

Hi Christian,

I think you are right, I was using a PHP IDE as my editor and when I
reverted to Notepad, it showed a different layout. I modified it and it
worked fine. Really frustrating and such a waste of time.

Is there a popular IDE that makes editing quick and easy?

Tim


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Syntax error with render_to_response call

2007-01-25 Thread Christian Joergensen
Tipan wrote:
> def codeview(request):
> manipulator = CodeViewManipulator()
> if request.method == 'POST':
> new_data = request.POST.copy()
> errors = manipulator.get_validation_errors(new_data)
>   if not errors:
> 
>   return HttpResponseRedirect("/hive/codeoutput/")
> else:
> errors = new_data = {}
> code_list=CodeTest.objects.all()
> return render_to_response('codeview.html', {'code_list':code_list})
> 
> This always generates a Django Syntax Error on the return
> render_to_response line. I can define a new view with just the last two
> lines and it works fine. The function also runs if I substitute a
> return HttpResponse line instead of the render_to_response, but then it
> won't display my html template page.
> 
> Is there some ruling preventing me from using render_to_response in
> this way?
> 
> Any advice welcome - it's driving me crazy!

Could it be a case of tab vs. spaces indentation? What more that Syntax
Error does the django error page tell you?

-- 
Christian Joergensen | Linux, programming or web consultancy
http://www.razor.dk  | Visit us at: http://www.gmta.info



signature.asc
Description: OpenPGP digital signature


Re: syntax error with tutorial1 in "python manage.py sql polls" step

2006-03-25 Thread bruno modulix

maphew a écrit :
> Hi, at the ''python manage.py sql polls'' step of the
> [http://www.djangoproject.com/documentation/tutorial1/ poll tutorial] I
> get a syntax error:

(snip)
> mod = __import__('django.models.%s' % submodule, '', '', [''])
>   File "/home/matt/code/djtutor/../djtutor/polls/models/polls.py", line
> 12
> 
>   ^
> SyntaxError: invalid syntax
> 
(snip)
> 
> any idea what I've done wrong?

Not exactly, but the problem is about a syntax error near line 12 of 
file /home/matt/code/djtutor/../djtutor/polls/models/polls.py !-)

You could probably check this first, then post the relevant code if you 
can't find the problem ?




--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---