a very simple beginners question

2012-05-02 Thread alon
running

$python manager.py shell

opens a python shell
is there any way (a parameter) to make the manager run a python file
with my commands??

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: multiple managers in admin for same model

2008-07-20 Thread Alon Levy



On Jul 11, 3:30 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Thu, 2008-07-10 at 04:32 -0700,AlonLevy wrote:
>
> [...]
>
> > So does anyone know of a simple way to get two different manager views
> > in admin?
>
> [...]
>
> solution is to create a subclass of both managers. If you want two
> different admin views, one for each manager, the solution is
> newforms-admin where the "admin" concept isn't tied to as a single thing
> per model.
>

Thanks, that's what I wanted. So I'll go the newforms-admin route
(hope it doesn't turn out to be too much work - I'm already at rev
7500~).

Alon
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



multiple managers in admin for same model

2008-07-10 Thread Alon Levy

Hi All,

 I've grepped this in this group and couldn't find any answer to this
question: I have a single model with two different managers, the
default manager and another custom manager:

class MyManager(models.Manager):
 def get_query_set(self):
  return AModel.objects.filter(id=1)

class AModel(models.Model):
 objects = models.Manager()
 some = MyManager()
 class Admin:
  manager = objects

I want to have both in admin. Basically I'd love to do something like
this:
class AModel
..
 class Admin:
  manager = [objects, some]

But of course that isn't supported in current (svn) django.

So does anyone know of a simple way to get two different manager views
in admin?

Thanks
Alon

--~--~-~--~~~---~--~~
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: Uncaught TypeError: Cannot read property 'value' of null

2015-03-18 Thread Alon Nisser
Does the browser support getElementById? old browsers don't support it.. If 
not the your aren't really adding the input tag in the same page where you 
run the js script. The js by it self is valid (if an element with this id 
exists, and only one of course)..


On Tuesday, March 17, 2015 at 5:47:03 PM UTC+2, elcaiaimar wrote:
>
> Hello
>
> I wonder if somebody knows how to solve the next:
>
> I want to send a value from the template to a script and it seems it works 
> but I get an error: Uncaught TypeError: Cannot read property 'value' of null
>
> Below it is my code:
>
> *Template:*
>
> 
>
> {{ obra.id }} is an object sended from views.py
>
> *Javascript:*
>
> var idobra = document.getElementById("idobra").value;
> console.log(idobra);
>
> And I don't know what I'm doing wrong. I would like to know if there is 
> another way to send objects directly from django to javascript or if I'm 
> doing well like that, but solving the problem.
>
> Thank you very much!
>
>

-- 
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/cf463ac8-9fe7-4b1d-8f48-b51b39efe5c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to get get-pip.py

2015-06-04 Thread Alon Nisser
1. Please, This is an open source community, with people answering 
questions here on their free time (no one here is getting payed to answer). 
 so no need for the BOLD Frustrated type.

2. Specifying you are on windows from the beginning would help, Lots of us 
are using different flavors of windows.

3. The error you are getting is proving that the path etc isn't set up 
correctly to support python install , shoot up a terminal and type python 
and hit enter - do you get a running python interpreter or the same error 
as pip? are the folders where python.exe and pip.exe are added to your 
windows path? (you can check where the binaries are with your favorite file 
explorer tool)  if not , you should add them. if they are did you add them 
to the path while the terminal you are using now was already active? if so 
you should try from another terminal ('cmd') instance

4. A final advice on python environments - make it a habit to use 
virtualenv (pip install virtualenv) and don't use global installs of 
packages

Good luck!

On Thursday, June 4, 2015 at 9:53:36 PM UTC+3, Steve Burrus wrote:
>
>
> *"Which version of Python did you install?" well up until last nite I was 
> using some flavor of Python 3.5. But someone suggested that I get the 3.4 
> version of it so I did. I have all of the environment varianbles set 
> correctly. I did the ez_install.py thing right. And you would think that I 
> could easily do the "pip install django" ri ght but it fails.*
>
>
> *On Thu, Jun 4, 2015 at 1:37 PM, Michael Manfre  > wrote:*
>>
>> *"sudo apt-get install ..." is a command that works on Ubuntu and a few 
>> other flavors of linux. It does not work on Windows.*
>>
>>
>> *Which version of Python did you install? If it's Python 3.4 or newer, 
>> pip is bundled. Python 3.4 is installed to "C:\Python34\" as the 
>> default. To use pip, you would execute "C:\Python34\python -m pip install 
>> PACKAGE_NAME" without the surrounding quotes. *
>> *To avoid having to type the full path all the time, you will need to add 
>> it to your path. Please read 
>> https://docs.python.org/3.4/using/windows.html#excursus-setting-environment-variables
>>  
>> *
>>
>>
>> *If you are using a version of Python earlier than 3.4, follow the 
>> instructions found at https://pip.pypa.io/en/latest/installing.html 
>> *
>>
>> *Regards,*
>>
>>
>> *Michael ManfreOn Thursday, June 4, 2015 at 1:33:47 PM UTC-4, Steve 
>> Burrus wrote:*
>>>
>>> *I am sorry Dhavi but your command didmn't work! Now I don't think you 
>>> know  that I am on a Windows system and that "sudo" command do esn't work 
>>> on windows. Any other ideas for me? *
>>>
>>>
>>> *On Thu, Jun 4, 2015 at 3:04 AM, DHaval Joshi  
>>> wrote:*



 *try this sudo apt-get install python-pip*



 *On Thu, Jun 4, 2015 at 8:54 AM, Steve Burrus  
 wrote:*

> *Well Mikea I hardly did it the first time that I  tried but I was 
> able to get Python 3.4 installed ! And I also got that ez-setup installed 
> okay. But where do I go from here to get pip going okay?  incidentally I 
> tried doing step 5 "C:\users\steve\pip install django" but that didn't 
> work! There must be another path to the django install.*
>
> *  
>  Steve Burrus  *
>
>
> *On Wed, Jun 3, 2015 at 9:04 PM, Mike Dewhirst  
> wrote:*
>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *Sorry Steve I didn't realise you needed help to get Django 
>> installed. You said you were having a problem with pip. Generally the 
>> best 
>> way to get help is to explain exactly what you have done and detail the 
>> error messages generated. Putting your message in bold doesn't help. I 
>> just 
>> checked my sent messages and see that I replied to you a couple of days 
>> ago 
>> at which time you said you had Django working. I can understand that you 
>> are having problems in a Windows environment because I am forced to use 
>> it 
>> myself and I too have to cope with its idiosyncrasies. I didn't know 
>> there 
>> is a Windows version 10 and I see from Tuesday's post you say it is a 
>> beta 
>> version. If you have no other choice of platform you should expect a 
>> beta 
>> version of any operating system to have problems which the supplier 
>> really 
>> wants to hear about so they can sort it out. So, to help Microsoft out I 
>> suggest the following: 1. Uninstall Django and Python 2. Install Python 
>> 3.4 
>> for Windows (3.5 is quite

Re: can i use sqlite for big project?

2015-06-26 Thread Alon Nisser
Using sqlite would bite you in many way, not really transactional for 
example, some features (such as certain variation of ```distinct```) not 
supported etc. Use Postgresql, If you find it hard to setup you can use RDS 
(that has amazon web services offer of postgresql) or heroku postgresql - 
both have a basic free tier and take care of all the setup for you.. 



On Thursday, June 25, 2015 at 5:08:32 PM UTC+3, Arindam sarkar wrote:
>
> i need to develop a job portal . is there any problem if i use sqlite ? 
> coz i am having problem to setup mysql or postgresql . please help.
>
> -- 
> Regards,
>
> Arindam
>
> Contact no. 08732822385
>
>
>  

-- 
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/9aae55d4-4c58-441a-949b-ebaac116396e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django 1.7 opening one database connection for each request

2014-09-10 Thread Alon Nisser
First of all - I would advice you to downgrade your production site back to 
the working django version you know and *after that , Check your 
site compatibility (including all third party libs and apps) *to django 
upgrade in a staging environment.. 

On Wednesday, September 10, 2014 8:32:24 AM UTC+3, Mauro Alexandre wrote:
>
> Please help, i have a problems in my production enviromet.
>
> After Django update when my database stopping by "Too many open 
> connections".
>
> I use mariadb and, i tried set explict 'CONN_MAX_AGE'  to 0, but now 
> solved.
>
> I'm desperate, I do not know what to do with the production environment.
>

-- 
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/0439fcf2-7c58-478c-a2d5-9950f82b8858%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Need to search through several tables using one model

2014-12-13 Thread Alon Nisser
You could also create a model that foreign keys to all the relevant models, 
and filter on that.. 
Buy first you need to clarify (for your self..) The exact use case: is it 
search? if so better use haystack with some search backend (elasticsearch 
would be a great choice), Is it to choose something in a form? something 
else? 

The technical details should be derived from the problem you are trying to 
solve.. 

On Friday, December 12, 2014 5:09:30 PM UTC+2, Damjan Dimitrioski wrote:
>
> Hi,
>
> Is there a way to make a model that links several db tables in one model, 
> so that can be used in a change list view ?
> Most importantly, I need to be able to use the search field, can this be 
> accomplished ?
>
> 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/235267f4-1851-4464-9426-b63dc074d671%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[HELP] Custom 2 step authentication where the user's password is a public key

2015-01-09 Thread Alon Muroch
Hey everyone, i've been thinking of implementing the following custom 
authentication scheme:

   1. User generates a public and private key pair
   2. when creating a new user, the user name is as usual but the password 
   is the public key (in clear hex)
   3. For login:
  1. the user asks the server to generate a challenge string
  2. the user signs the challenge string and passes it to the server
  3. the user is considered logged in if the returned signed challenge 
  can be verified by the server.
   
*How i propose to do that:* The user sends a GET request for the server 
which returns a randomly generated challenge and saves it in relation to 
the requesting user. The user then sends a login request, with the 
difference that the password param is the signed challenge. 
*Problems with what i propose:* How do i verify that who ever requests to 
generate the challenge is the actual user ?

Will be happy for suggestions on how to go about doing this.
Alon.

-- 
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/bccd4331-90d3-442c-a0e3-0a541f45843e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [HELP] Custom 2 step authentication where the user's password is a public key

2015-01-09 Thread Alon Muroch
Hey Eric, thanks for your reply.
The scheme will work as a restfull service (i use tastypie) and is designed 
specifically to work for a bitcoin cloud backup service. The reason we want 
to implement such a scheme is so if the password is compromised, an 
attacker cant download the encrypted data stored on the server. Basically 
its a privacy driven solution not a security one because the data stored on 
the server (which can be downloaded once the user is logged in) is 
encrypted.

-- 
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/723436fc-0ca4-489d-9d8f-4df562d6b6f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django with rabbit (but without async celery) - can be done?

2014-02-25 Thread Alon Nisser
I need to implement a quite simple Django server that server some http 
requests *and *listens to a rabbitmq message queue that streams information 
into the Django app (that should be written to the db). the data *must* be 
written to the db in a synchronized order , So I can't use the obvious 
celery/rabbit configuration.  I was told that there is no way to do this in 
the same Django project. since Django would listen to http requests on It's 
process. and It can't handle another process to listen for Rabbit - forcing 
me to to add Another python/django project for the rabbit/db writes part - 
working with the same models The http bound django project works with.. You 
can smell the trouble with this config from here. .. Any Ideas how to solve 
this?

Thanks!

-- 
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/794bf8ca-a15b-40da-97c2-b3a416a35fe0%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django with rabbit (but without async celery) - can be done?

2014-02-26 Thread Alon Nisser
thanks for your response: to clarify:
ordered execution of writes
and the sending process isn't python (so I can't use eager celery for that)

On Tuesday, February 25, 2014 6:12:32 PM UTC+2, Carlos Daniel Ruvalcaba 
Valenzuela wrote:
>
> I'm still not sure of what you need, so there is something (a process) 
> sending a message through rabbitmq with data that needs to be written to 
> the DB, now, this needs to be synchronized, sync with what? an http 
> request? ordered execution of writes?
>
> Regards,
> Carlos Ruvalcaba
>
> On Tue, Feb 25, 2014 at 8:28 AM, Alon Nisser 
> > wrote:
>
>> I need to implement a quite simple Django server that server some http 
>> requests *and *listens to a rabbitmq message queue that streams 
>> information into the Django app (that should be written to the db). the 
>> data *must* be written to the db in a synchronized order , So I can't 
>> use the obvious celery/rabbit configuration.  I was told that there is no 
>> way to do this in the same Django project. since Django would listen to 
>> http requests on It's process. and It can't handle another process to 
>> listen for Rabbit - forcing me to to add Another python/django project for 
>> the rabbit/db writes part - working with the same models The http bound 
>> django project works with.. You can smell the trouble with this config from 
>> here. .. Any Ideas how to solve this?
>>
>> Thanks!
>>
>> -- 
>> 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 http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/794bf8ca-a15b-40da-97c2-b3a416a35fe0%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
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/1a68a44b-4bf1-4d53-b222-54e49a6e8eea%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django with rabbit (but without async celery) - can be done?

2014-02-26 Thread Alon Nisser
I *could *do that (and would fall back to this if needed) but it's 
suboptimal to say the least. celery does this somehow (run inside djano 
context but from without the django process. listen to rabbitmq, etc) so I 
guess it can be done. Looking for an Idea how

On Tuesday, February 25, 2014 6:10:50 PM UTC+2, jondbaker wrote:
>
> Could you write a RESTful API in your Django project, and then issue POST 
> requests to that from a middleman script that the mq could communicate with?
>
> JDB
>
>
> On Tue, Feb 25, 2014 at 8:28 AM, Alon Nisser 
> > wrote:
>
>> I need to implement a quite simple Django server that server some http 
>> requests *and *listens to a rabbitmq message queue that streams 
>> information into the Django app (that should be written to the db). the 
>> data *must* be written to the db in a synchronized order , So I can't 
>> use the obvious celery/rabbit configuration.  I was told that there is no 
>> way to do this in the same Django project. since Django would listen to 
>> http requests on It's process. and It can't handle another process to 
>> listen for Rabbit - forcing me to to add Another python/django project for 
>> the rabbit/db writes part - working with the same models The http bound 
>> django project works with.. You can smell the trouble with this config from 
>> here. .. Any Ideas how to solve this?
>>
>> Thanks!
>>
>> -- 
>> 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 http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/794bf8ca-a15b-40da-97c2-b3a416a35fe0%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>
>  

-- 
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/76ffde98-558f-4f06-baf9-d81fd12143a7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Using Redis as a DB backend for some models (not a caching backend!)

2014-03-14 Thread Alon Nisser
Can I use redis as a django database for some of my models? I'm aware (and 
using) caching with django and redis, but I'm looking for something else 
here: Something I can use at least some of the orm features with, handle a 
django Model, etc.  I found 
django-redis-enginebut it 
doesn't look like an active project (pre alpha commits 3 years ago) 
and django-nonrel  which doesn't 
support redis and is actually a django fork and not Django proper. Any 
ideas how to proceed from here? Thanks!

-- 
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/33b35731-711b-4730-bda5-0a1d9c0ffc81%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2014-04-21 Thread Alon Nisser
Why did you specify production server? does the code work correctly on a 
staging/development server? Is this error only in the production server? If 
so, probably a configuration Issue

On Saturday, April 19, 2014 2:25:04 PM UTC+3, 董健 wrote:
>
> 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/d

Stuck on Tutorial-- can't import Question

2014-05-05 Thread Alon Nisser
 Try to import Question from the shell. 
python manage.py shell
>>from polls.models import Question
I guess you have a typo in the model that raises the import error. If it does 
import in shell then you have some other issue

-- 
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/a51a6ad3-e147-42d2-ba07-370d31c82175%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.