Re: Django

2014-04-19 Thread Srinivasulu Reddy
Hello mark, 

 I got suggestion what you all mention was great to me. I did 
poll application and have some basic view on django, but thing I have to 
mention here is there are so many module how learn all these in effective 
way. Like for example take 'django.templates' , it contain different fields 
and modules , functions like RequestContext ,loader . How do i learn these 
in useful way . 

On Saturday, April 19, 2014 11:37:38 AM UTC+5:30, Srinivasulu Reddy wrote:
>
>
> Hello folks,
>  I am new to python/django . i am earning myself i want to 
> know effective way of learning python / django . i am following django book 
> for django .  Light bird apps also.
>
> So please anyone can help me to find the good way learn the python / 
> django . I love to learn the python / django .
>
>

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/30190042-c97c-49c6-be07-399fc5e7c54c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django

2014-04-19 Thread Mario Gudelj
Two scoops is not a beginner's book. Start with tutorials. The one on
django site is a must, but there are lots of other tuts as well on the net.
Tango with django is a good one. Also django book is awesome resource
although somewhat outdated now. But I'd read first 7 chapters anyway
On 20/04/2014 1:04 am, "John DeRosa"  wrote:

>
> On Apr 19, 2014, at 8:02 AM, Mark Phillips 
> wrote:
>
> > "Two Scoops of Django" is also very good.
> >
> >
>
> +1 for TSoD. Super book!
>
> --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/B5D083F9-F9D1-4C02-9517-C8AB1A569B7F%40ipstreet.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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHqTbjnza25h8w-O9r-gZ3E1NBOYDxLmdWdHOBYHpJyPJoVNWA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Please help me out, I tried to get sync for whole day @@

2014-04-19 Thread Mike Dewhirst

On 20/04/2014 1:11 AM, Toan ComS wrote:





 DATABASES = {
  'default': {
  'ENGINE': 'django.db.backends.sqlite3',
  #'NAME': 'mysite'),
  'NAME': 'mysite',
  }
 }



Is it wrong?


I think so. Try removing the parens afte 'mysite'



--
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/fb92204d-f2a7-4e40-87b8-e85c13a9bbaf%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/535336A0.1030501%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.


Re: Please help me out, I tried to get sync for whole day @@

2014-04-19 Thread voger
If there is a space in front of DATABASES then yes it is wrong. Python 
doesn't forgive lousy indentation


On 04/19/2014 06:11 PM, Toan ComS wrote:




DATABASES = {
 'default': {
 'ENGINE': 'django.db.backends.sqlite3',
 'NAME': 'mysite'),
 }
}


Is it wrong?

--
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/fb92204d-f2a7-4e40-87b8-e85c13a9bbaf%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5352954A.3010808%40yahoo.gr.
For more options, visit https://groups.google.com/d/optout.


Re: Please help me out, I tried to get sync for whole day @@

2014-04-19 Thread Toan ComS



> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.sqlite3',
> 'NAME': 'mysite'),
> }
> }
>

Is it wrong?  

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fb92204d-f2a7-4e40-87b8-e85c13a9bbaf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django

2014-04-19 Thread John DeRosa

On Apr 19, 2014, at 8:02 AM, Mark Phillips  wrote:

> "Two Scoops of Django" is also very good.
> 
> 

+1 for TSoD. Super book!

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/B5D083F9-F9D1-4C02-9517-C8AB1A569B7F%40ipstreet.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django

2014-04-19 Thread Mark Phillips
"Two Scoops of Django" is also very good.

I would suggest following the tutorial from start to finish and build the
poll app. This will give you a hands on over view of the basics.

After the poll app, come up with a project of your own and start building
it. Use a virtual environment, git, south, wsgi, apache and fabrik to
develop on one machine using runserver and deploy the app to an Apache
server on another machine. There is lots of online documentation on how to
set all this up. You will spend some time on just getting the
development/deployment environment working, which is also a good learning
experience. As you come up with ideas along the lines of "How would I make
my app do ..", search the documentation and THEN ask specific
questions. Be creative and have some fun!

Good luck!

Mark


On Sat, Apr 19, 2014 at 7:52 AM, François Schiettecatte <
fschietteca...@gmail.com> wrote:

> The tutorial on the django site is very good, and there is a wealth of
> documentation. That is how I learnt django.
>
> And the OReilly books for python are great, as is Dive Into Python by
> Pilgrim.
>
> François
>
> On Apr 19, 2014, at 2:07 AM, Srinivasulu Reddy 
> wrote:
>
> >
> > Hello folks,
> >  I am new to python/django . i am earning myself i want
> to know effective way of learning python / django . i am following django
> book for django .  Light bird apps also.
> >
> > So please anyone can help me to find the good way learn the python /
> django . I love to learn the python / django .
> >
> >
> > --
> > 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 http://groups.google.com/group/django-users.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/00b6b705-9442-44a1-b61e-968ccab6ee1f%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEqej2OrhU_GWJCeD%2BXmBL87g%3De5zydf%3Dkk75CSCJR1jLzSWjA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django

2014-04-19 Thread François Schiettecatte
The tutorial on the django site is very good, and there is a wealth of 
documentation. That is how I learnt django.

And the OReilly books for python are great, as is Dive Into Python by Pilgrim.

François

On Apr 19, 2014, at 2:07 AM, Srinivasulu Reddy  
wrote:

> 
> Hello folks,
>  I am new to python/django . i am earning myself i want to 
> know effective way of learning python / django . i am following django book 
> for django .  Light bird apps also.
> 
> So please anyone can help me to find the good way learn the python / django . 
> I love to learn the python / django .
> 
> 
> -- 
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/00b6b705-9442-44a1-b61e-968ccab6ee1f%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Please help me out, I tried to get sync for whole day @@

2014-04-19 Thread voger
There it says "unexpected indent" and points to the DATABASES in your 
settings.py. Check to see if it is indented properly.


On 04/19/2014 05:02 PM, Toan ComS wrote:




--
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/e0144498-2204-47bf-b3d1-da229dc7f8ed%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/53528BC6.5080107%40yahoo.gr.
For more options, visit https://groups.google.com/d/optout.


Re: Please help me out, I tried to get sync for whole day @@

2014-04-19 Thread Andrew Farrell
This looks like you have an index error in your settings.py file. Probably
an extra space at the start of line 58.

If you run python settings.py, you probably get the same error.


On Sat, Apr 19, 2014 at 10:02 AM, Toan ComS  wrote:

> 
>
>  --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e0144498-2204-47bf-b3d1-da229dc7f8ed%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2By5TLbdF%3DUK6wswnrbLEco6wzxZmhvKmg9piNXg1vDzJ3ck-w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Please help me out, I tried to get sync for whole day @@

2014-04-19 Thread Toan ComS




-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e0144498-2204-47bf-b3d1-da229dc7f8ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


windows service for django debug server

2014-04-19 Thread Mark Mikofski
I know this is a bad idea, but in case anyone was looking for a windows 
service for the django debug server (runserver.py) here is a hack ported 
from Trac:

http://poquitopicante.blogspot.com/2014/04/django-debug-server-windows-service.html

It depends on Mark Hammond's PyWin32 
(http://sourceforge.net/projects/pywin32/)

enjoy!

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/86127345-c4ac-4efb-bc86-5df21c47fe41%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django

2014-04-19 Thread Srinivasulu Reddy

Hello folks,
 I am new to python/django . i am earning myself i want to 
know effective way of learning python / django . i am following django book 
for django .  Light bird apps also.

So please anyone can help me to find the good way learn the python / django 
. I love to learn the python / django .

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/00b6b705-9442-44a1-b61e-968ccab6ee1f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to use custom widgets with dojango?

2014-04-19 Thread voger
I want to move my project from jquery to dojo toolkit and I see that 
there is a dojango project that integrates dojo with django. The 
instructions are simple enough and I already managed to run the sample 
project provided. Unfortunately I need to use some custom dojo widgets 
that I already have made. I don't know how to integrate them in my project.


I found this blog post 
http://uxebu.com/blog/2008/09/09/dojo-namespacing-with-dojango/ but it 
is from 2008 and since then many changes are introduced to both django 
and dojo. That blog post uses many functions that are now deprecated.


Let's assume that my apps directory tree looks like this

├── __init__.py
├── __init__.pyc
├── admin.py
├── models.py
├── models.pyc
├── static
│   └── widgets
│   ├── FloatingWindow.js
│   ├── Taskbar.js
│   ├── css
│   │   ├── floatingwindow.css
│   │   ├── icons
│   │   │   ├── gridcontainer_grip.gif
│   │   │   ├── grip_bg.gif
│   │   │   ├── pixel.gif
│   │   │   ├── resize.png
│   │   │   ├── resizeRtl.png
│   │   │   ├── rotator.png
│   │   │   ├── splitterToggleH.png
│   │   │   └── splitterToggleV.png
│   │   └── taskbar.css
│   ├── images
│   └── templates
│   └── Taskbar.html
├── templates
│   └── index.html
├── tests.py
├── views.py
└── views.pyc

can someone please provide some instructions how to use those custom 
widgets in a django template?


--
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/535263C2.6090504%40yahoo.gr.
For more options, visit https://groups.google.com/d/optout.


Production django server : NoReverseMatch: Reverse for 'login' with arguments '()' and keyword arguments '{}' not found.

2014-04-19 Thread 董健
i got NoReverseMatch when deloy cartridge to the webfaction.  i can not not 
figure out what happened. the problem annoyed me for two days. any help 
will be precious. 

below it is the whole debug information.


 mod_wsgi (pid=4764): Exception occurred processing WSGI script 
'/home/victoria88/webapps/cartridge/cartridge/wsgi.py'.
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1] Traceback (most 
recent call last):
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1]   File 
"/home/victoria88/webapps/cartridge/lib/python2.7/django/core/handlers/wsgi.py",
 
line 255, in __call__
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1] response = 
self.get_response(request)
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1]   File 
"/home/victoria88/webapps/cartridge/lib/python2.7/django/core/handlers/base.py",
 
line 178, in get_response
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1] response = 
self.handle_uncaught_exception(request, resolver, sys.exc_info())
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1]   File 
"/home/victoria88/webapps/cartridge/lib/python2.7/django/core/handlers/base.py",
 
line 224, in handle_uncaught_exception
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1] return 
callback(request, **param_dict)
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1]   File 
"/home/victoria88/webapps/cartridge/lib/python2.7/django/utils/decorators.py", 
line 91, in _wrapped_view
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1] response = 
view_func(request, *args, **kwargs)
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1]   File 
"/home/victoria88/webapps/cartridge/lib/python2.7/Mezzanine-3.0.9-py2.7.egg/mezzanine/core/views.py",
 
line 220, in server_error
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1] return 
HttpResponseServerError(t.render(context))
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1]   File 
"/home/victoria88/webapps/cartridge/lib/python2.7/django/template/base.py", 
line 140, in render
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1] return 
self._render(context)
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1]   File 
"/home/victoria88/webapps/cartridge/lib/python2.7/django/template/base.py", 
line 134, in _render
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1] return 
self.nodelist.render(context)
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1]   File 
"/home/victoria88/webapps/cartridge/lib/python2.7/django/template/base.py", 
line 830, in render
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1] bit = 
self.render_node(node, context)
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1]   File 
"/home/victoria88/webapps/cartridge/lib/python2.7/django/template/base.py", 
line 844, in render_node
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1] return 
node.render(context)
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1]   File 
"/home/victoria88/webapps/cartridge/lib/python2.7/django/template/loader_tags.py",
 
line 124, in render
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1] return 
compiled_parent._render(context)
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1]   File 
"/home/victoria88/webapps/cartridge/lib/python2.7/django/template/base.py", 
line 134, in _render
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1] return 
self.nodelist.render(context)
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1]   File 
"/home/victoria88/webapps/cartridge/lib/python2.7/django/template/base.py", 
line 830, in render
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1] bit = 
self.render_node(node, context)
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1]   File 
"/home/victoria88/webapps/cartridge/lib/python2.7/django/template/base.py", 
line 844, in render_node
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1] return 
node.render(context)
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1]   File 
"/home/victoria88/webapps/cartridge/lib/python2.7/Mezzanine-3.0.9-py2.7.egg/mezzanine/template/__init__.py",
 
line 85, in render
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1] args = 
(self.nodelist.render(context), context, token)
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1]   File 
"/home/victoria88/webapps/cartridge/lib/python2.7/django/template/base.py", 
line 830, in render
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1] bit = 
self.render_node(node, context)
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1]   File 
"/home/victoria88/webapps/cartridge/lib/python2.7/django/template/base.py", 
line 844, in render_node
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1] return 
node.render(context)
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1]   File 
"/home/victoria88/webapps/cartridge/lib/python2.7/django/template/loader_tags.py",
 
line 156, in render
[Sat Apr 19 10:15:32 2014] [error] [client 127.0.0.1] return 
self.render_template(self.template, context)
[Sat Apr 19 10:15

URL variables failed to be found from POST

2014-04-19 Thread nobody
Hi,

I set up an URL when cliking a submit button, I got 
http://myhost.com/user/?userid=5987.

If it is a REQEST, I can get useid = request.GET['userid']. But in POST, I 
could not get the variable from the POST, I could not even find the 
variable in POST, the following check userid in request.POST was false, and 
I cannot check if the syntax of next statement "userid = 
request.POST.get("userid", "")" is correct or not.

if userid in request.POST
userid = request.POST.get("userid", "")

 

Also, at the moment, I made a hard coded absolutely URL in the submit 
action:

http://myhost.com/user/?userid={{request.user_id 
}}">{% csrf_token %}

Is there a key word for current URL I can put it in the action, for 
example, like action = "{{ current_url }}/?userid={{ request.user_id }}"?

Thank you.

Kind regards.

  

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e004f4e7-1522-4d59-a207-5ddaaf6ca7ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


POST URL questions

2014-04-19 Thread nobody
Hi,

I set up an URL when cliking a submit button, I got 
http://myhost.com/user/?userid=5987.

In REQEST, I can get useid = request.GET['userid'], but in POST, I could 
not get the variable from the POST:

if userid in request.POST
userid = request.POST.get("userid", "")

Despite the userid=5987 was included in the URL, the above check failed, 
how can I get variables in URL from POST? Also, not sure if the userid = 
request.POST.get("userid", "")
 is the correct syntax to get variables from request.POST?

Also, at the moment, I made a hard coded absolutely URL in the submit 
action:

http://myhost.com/user/?userid={{ 
request.user_id }}">{% csrf_token %}

Is there a current URL I can put it in the action, for example, like action 
= "{{ current_url }}/?userid={{ request.user_id }}"?

Thank you.

Kind regards.

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6438db49-a616-48b0-ae16-dfaa51a2f70f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.