Re: django 1.4 : gunicorn can't find static files. settings option

2014-01-05 Thread Mahdi Mazaheri
Hi Huseyin,

I have the same problem as Bo but this again did not solve my problem. This 
works with django webserver (runserver) but not with gunicorn.
Any Ideas?

Thanks in advance
Mahdi

On Wednesday, May 16, 2012 10:38:39 AM UTC+4:30, huseyin yilmaz wrote:
>
> For development, you could add this to main urls.py like this. 
> (r'^static/(?P.*)$', 'django.views.static.serve', 
> {'document_root': settings.STATIC_ROOT, 'show_indexes':True}), 
>
> But for production use your web server to serve static files. 
>
> At least this is how I solved it. I hope that helps. 
>
> On May 16, 5:56 am, Bolang  wrote: 
> > Hi, 
> > I just started to using django 1.4 with gunicorn 0.14.3 
> > With ./manage.py runserver , i can start django properly and django can 
> > find my files in static directory. 
> > Then i use gunicorn and then gunicorn can't find my files in static 
> > directory. 
> > 
> > I have tried these combination 
> > gunicorn myproject.wsgi:application --settings myproject.settings 
> > gunicorn myproject.wsgi:application --settings 
> /absolute/path/to/settings.py 
> > ./manage.py run_gunicorn --settings=myproject.settings 
> > 
> > All of the commands can start django, but can't find my files in static 
> > directory 
> > 
> > I also found this issuehttps://github.com/benoitc/gunicorn/issues/322 
> > But, i can't find the solution from that page. 
> > 
> > Any kind of help will be appreciated 
> > 
> > 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/6e99aaf4-44e9-4fff-8ada-d5fc96e55d7b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: django 1.4 : gunicorn can't find static files. settings option

2014-01-05 Thread Denis Cornehl
Hi, 

if you don’t have a web server available (for example on some PaaS like 
Heroku), you can do two things for production-ready static file serving: 

- use an external service like Amazon S3 (with the help of django-storages)
- use dj-static, which uses an WSGI middleware to serve your static files and 
integrates into django (alternative is SharedDataMiddlware of werkzeug, used by 
flask)

Don’t forget that you have to run „./mange.py collectstatic“ to gather all the 
files in one directory. 

Am 05.01.2014 um 10:10 schrieb Mahdi Mazaheri :

> Hi Huseyin,
> 
> I have the same problem as Bo but this again did not solve my problem. This 
> works with django webserver (runserver) but not with gunicorn.
> Any Ideas?
> 
> Thanks in advance
> Mahdi
> 
> On Wednesday, May 16, 2012 10:38:39 AM UTC+4:30, huseyin yilmaz wrote:
> For development, you could add this to main urls.py like this. 
> (r'^static/(?P.*)$', 'django.views.static.serve', 
> {'document_root': settings.STATIC_ROOT, 'show_indexes':True}), 
> 
> But for production use your web server to serve static files. 
> 
> At least this is how I solved it. I hope that helps. 
> 
> On May 16, 5:56 am, Bolang  wrote: 
> > Hi, 
> > I just started to using django 1.4 with gunicorn 0.14.3 
> > With ./manage.py runserver , i can start django properly and django can 
> > find my files in static directory. 
> > Then i use gunicorn and then gunicorn can't find my files in static 
> > directory. 
> > 
> > I have tried these combination 
> > gunicorn myproject.wsgi:application --settings myproject.settings 
> > gunicorn myproject.wsgi:application --settings 
> > /absolute/path/to/settings.py 
> > ./manage.py run_gunicorn --settings=myproject.settings 
> > 
> > All of the commands can start django, but can't find my files in static 
> > directory 
> > 
> > I also found this issuehttps://github.com/benoitc/gunicorn/issues/322 
> > But, i can't find the solution from that page. 
> > 
> > Any kind of help will be appreciated 
> > 
> > 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/6e99aaf4-44e9-4fff-8ada-d5fc96e55d7b%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.



-- 
Freundliche Grüße

Denis Cornehl
Simon-Dach-Str. 7 / 10245 Berlin

M: +49 (151) 25 25 1450
@: denis.corn...@gmail.com

X: http://xing.to/dc

-- 
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/0776FEBD-5BA3-4E3C-B3B1-39836E2CF646%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


wait message

2014-01-05 Thread fabricio
I am needing to display a wait message while processing perform some 
process on the server anyone could help me

-- 
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/55a05de9-90bf-4905-a154-23a0043f983d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: wait message

2014-01-05 Thread Denis Chernoshchekov
Try using Ajax.


2014/1/5 fabricio 

> I am needing to display a wait message while processing perform some
> process on the server anyone could help me
>
> --
> 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/55a05de9-90bf-4905-a154-23a0043f983d%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/CA%2BX6QOXg3Y9XvDGic2Hr3Dys4Dmyz3mj-Jn9trU%3De4_o%3DiCGMA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Can't Install on Windows 8.1

2014-01-05 Thread Malik Rumi
This is just an update to all of you, and to anyone coming after me with 
similar problems. No, I did not get what I wanted for Christmas. It turns 
out distribute has been deprecated, and I should have gotten the "new" 
setuptools instead. It seems the brilliant minds behind distribute set up a 
'fake' setuptools and deleted pkg_resources. I can't begin to understand 
all that. But my upgrade, like so many other things in this project, has 
failed. I posted to their mailing list so we'll see what happens there. I 
do not have Django or any other accessory up and running.

I did move my install to c:\Python27, and that allowed me to get PIL, which 
had failed before, but then GAE decided to insist I use a python25.dll, 
which of course caused errors. It seems this is triggered if the python 
install is in the default place. How stupid is that? anyway, I got a patch 
(not from Google) and my GAE is fine again. Nevertheless, all this has 
eaten up a lot of time. 

When and if I ever get Django running I'll be back, but I don't expect to 
have any Windows problems anymore. Thanks. 

On Wednesday, December 25, 2013 4:02:52 PM UTC-6, Felipe Coelho wrote:
>
> 2013/12/25 Malik Rumi >
>
>> Ok, everything went smoothly and beautifully as promised. I got 
>> successful install messages for pip, distribute, virtualenv and django. So 
>> first, thank you both very much. 
>>
>> However, I seem to be stuck again. I am not sure how to get from my new 
>> virtualenv to django, and windows seems just as confused. When I tried 
>> startproject, windows suddenly wanted to know if I wanted to keep using 
>> python to open .py files, or use notepad or some other program? I said 
>> python, and then it hiccuped, like it was restarting Explorer, and the 
>> command line went back to the prompt with no evidence it executed the 
>> startproject command. I looked in the directory, but saw nothing to 
>> indicate there was a project started. Of course, never having worked with 
>> either django or virtualenv before, I could have missed it. So I tried 
>> again.
>>
>>  As before, a dialog window opened asking me what program I wanted to 
>> use. While I was taking a screenshot to save for these notes, the dialog 
>> went away and the cmd line reported back that access was denied. 
>>
>> Then I tried get_version and was told there was no module named django, 
>> even though just a few lines earlier I was told django was successfully 
>> installed.
>>
>> Here is that last portion from my command line window:
>>
>> *C:\Program Files\Ampps\python\Scripts>project_sl1\Scripts\activate*
>>
>> *(project_sl1) C:\Program Files\Ampps\python\Scripts>pip install django*
>>
>> *Downloading/unpacking django*
>>
>> *  Downloading Django-1.6.1.tar.gz (6.6MB): 6.6MB downloaded*
>>
>> *  Running setup.py egg_info for package django*
>>
>> *warning: no previously-included files matching '__pycache__' found *
>>
>> *under dir*
>>
>> *ectory '*'*
>>
>> *warning: no previously-included files matching '*.py[co]' found *
>>
>> *under direct*
>>
>> *ory '*'*
>>
>> *Installing collected packages: django*
>>
>> *  Running setup.py install for django*
>>
>> *warning: no previously-included files matching '__pycache__' found *
>>
>> *under dir*
>>
>> *ectory '*'*
>>
>> *warning: no previously-included files matching '*.py[co]' found *
>>
>> *under direct*
>>
>> *ory '*'*
>>
>> *Successfully installed django*
>>
>> *Cleaning up...*
>>
>>
>> *(project_sl1) C:\Program Files\Ampps\python\Scripts>django-admin.py *
>>
>>
>> *startproject*
>>
>> * project_sl1*
>>
>>
>> *(project_sl1) C:\Program Files\Ampps\python\Scripts>django-admin.py *
>>
>>
>> *startproject*
>>
>> * project_sl1*
>>
>> *Access is denied.*
>>
>>
>> *(project_sl1) C:\Program Files\Ampps\python\Scripts>*
>>
>> Just to be clear, I do want to get past this but I also want to 
>> understand what is going on, so if you can do both, that would be great. Do 
>> I need to change directories? Try opening a django project thrui the django 
>> gui? Where / how would I do that? Everything I have done so far has been 
>> thru the windows command line. 
>> Thanx.
>> - -
>>
>
>  
> Instead of trying to  execute django-admin.py directly, explicitly tell 
> the prompt that you want to use python:
>
> python C:\Path\To\django-admin.py startproject project_sl1
>
> If you have problems with that, try specifying the python interpreter 
> directly as well:
>
> C:\Path\To\Virtualenv\Scripts\python.exe C:\Path\To\django-admin.py 
> startproject project_sl1
>
> Also, it might not be an issue right now, but for your own good, make sure 
> everything related to your project (which includes: the Python 
> installation, your virtualenv and the project itself) does not contain any 
> spaces in the pathnames, it might not be an issue right now, but you'll be 
> glad you did this later.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe fr

Re: wait message

2014-01-05 Thread fabricio
But my process is all done in an application that I use to report and give 
fpdf when I click the print button the process is all done there

-- 
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/059fa4a3-6155-4c68-acd5-cd68e1f005d8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: wait message

2014-01-05 Thread Larry Martell
On Sun, Jan 5, 2014 at 7:49 AM, fabricio  wrote:
> I am needing to display a wait message while processing perform some process
> on the server anyone could help me

You could create the wait message in a class like this:

 ... loading 

Then at the beginning of your template do:

$('.loadMsg').show();

and then:

window.onload = function() {
$('.loadMsg').hide();
}

-- 
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/CACwCsY4QWoHYr8BZfgiG-PMYOS4wcxqAJSTES%2BYf5zZ_hBQ0-w%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How to approach this problem?

2014-01-05 Thread César García Tapia
Could anybody help me with this problem, please? I know it's not very 
polite to ask twice, but I'm stuck on this, and I really need to solve it.

Excuse me for the insistence.

C.


El viernes, 3 de enero de 2014 01:48:23 UTC+1, César García Tapia escribió:
>
> I'm trying to solve a problem, but I have no idea how to face it. I need 
> some help :-)
>
> I have a model hierarchy like this:
>
> class Task(models.Model):
> name = models.CharField(max_length=255)
> number_of_steps = models.IntegerField()
>
> class StepGroup(models.Model):
> task = models.ForeignKey(Task)
> init_date = models.DateField()
>
> class Step(models.Model):
> group = models.ForeignKey(StepGroup)
> name = models.CharField(max_length=255)
>
> I must write a dialog where I create a number of Step Groups. An 
> InlineFormSet looks the way to go, but as there are two levels of nesting, 
> I don't know how to do that.
>
> Besides, I need the usual stuff with forms: error control 
> (form.name_of_field.errors), autopopulation when editing the Task, etc, so 
> doing it manually with javascript and server-side handling of the POST 
> request would be too complicated and error-prone.
>
> This is the way I need the form (the number of steps in each group is set 
> by the "number_of_steps" field in the Task model):
>
> +---+
> | STEP GROUP 1  |
> |   |
> | Init date: _  |
> |   |
> | Step 1:   |
> | Step 2:   |
> | Step 3:   |
> |   |
> +---+
> | STEP GROUP 2  |
> |   |
> | Init date: _  |
> |   |
> | Step 1:   |
> | Step 2:   |
> | Step 3:   |
> |   |
> +---+
> |   |
> | +---+ |
> | | Create step group | |
> | +---+ |
> +---+
>
> Please, any kind of help, suggestion or link will be very appreciated :-)
>

-- 
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/a6e7e2ba-70ee-44ea-b420-05dc854ee03e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


wait processing

2014-01-05 Thread pointmuriae castro
I am needing to display a wait message while processing perform some 
process on the server anyone could help me




-- 
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/d2f0968a-299e-4314-ad37-0df91118768b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


multiple select in form wizard

2014-01-05 Thread Prithviraj Billa
Hello,
 I'm using form wizard in my application.One of my forms contains 
modelmultiplechoicefield, after i submit all the forms it gives me an error 
in the form with modelmultiplechoicefield informing that to "please enter 
the list of values". Its not saving a list of values instead, its saving 
only one value which is causing the problem.
 If any one was stuck with the same problem earlier, please help me.

Thanks 

Prithviraj Billa

-- 
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/ef059288-17c4-44fb-8900-37117dfac413%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


test driven development and mixin for views

2014-01-05 Thread Sven
Hi Folks,

i recently wrote some small mixins that are intented to be attached to CBV 
like ListView, UpdateView, DetailView or even CreateView. The aim is to give 
users only access to their data. Their in terms of ownership. As an Example 
you have a Post model were a field called owner is a ForeignKey to 'auth.User' 
as a basic example.

So the mixin does filtering the queryset and passes an additional parameter to 
form classes where as an additional form Mixin then passes this down to the 
model. So far so good. (see http://pastebin.kde.org/pyzrouxfw)

Now my Question:

what would be the best solution to write a dedicated test against this mixin?
Would it be good or worth to create some Views loke the 4 above that inherits 
also the Mixin and then test against this as a complete behaviour? Or better 
mock it somehow differently? 

I really appreaciate your suggestions!!


-- 


Best Regards
 
Sven

-- 
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/6286078.9jIiIkrESd%40gilgamesch.
For more options, visit https://groups.google.com/groups/opt_out.


Django Weekend Cardiff - last call for talks and tutorials

2014-01-05 Thread Daniele Procida
The final deadline for porposals for talks and tutorials is the end of 7th 
January (GMT).



All Python/Django-related proposals are welcome.

We especially want proposals from:

* people who are minorities in the field
* first-time speakers

(in other words, the people who are less likely to speak at these events).

Remember, it's not just experts who have interesting things to say and share, 
and new perspectives are valuable to everyone.

Best of all, you'll be in front of the friendliest and most supportive audience 
a speaker could hope for.

If you are hesitating about making a suggestion, go ahead and make it. It 
doesn't have to be perfectly composed, it just has to give us a reason to think 
that you might have something interesting to say.

Or, please just ask us. We'll be very pleased to help you formulate your 
proposal or guide you in the right direction.

There'll also be opportunities for five-minute lightning talks. You don't need 
to register in advance; just put your name down on the day. Anything goes!

The last few tickets are still available for the event, if you haven't already 
signed up.

Regards,

Daniele

-- 
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/20140105183701.2030251478%40smtp.ntlworld.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How to approach this problem?

2014-01-05 Thread Avraham Serour
it looks like you need nested inlines, which I believe is not possible yet (
https://code.djangoproject.com/ticket/9025)
in the meantime you can try using this (
https://github.com/Soaa-/django-nested-inlines)


On Sun, Jan 5, 2014 at 5:07 PM, César García Tapia wrote:

> Could anybody help me with this problem, please? I know it's not very
> polite to ask twice, but I'm stuck on this, and I really need to solve it.
>
> Excuse me for the insistence.
>
> C.
>
>
> El viernes, 3 de enero de 2014 01:48:23 UTC+1, César García Tapia escribió:
>
>> I'm trying to solve a problem, but I have no idea how to face it. I need
>> some help :-)
>>
>> I have a model hierarchy like this:
>>
>> class Task(models.Model):
>> name = models.CharField(max_length=255)
>> number_of_steps = models.IntegerField()
>>
>> class StepGroup(models.Model):
>> task = models.ForeignKey(Task)
>> init_date = models.DateField()
>>
>> class Step(models.Model):
>> group = models.ForeignKey(StepGroup)
>> name = models.CharField(max_length=255)
>>
>> I must write a dialog where I create a number of Step Groups. An
>> InlineFormSet looks the way to go, but as there are two levels of nesting,
>> I don't know how to do that.
>>
>> Besides, I need the usual stuff with forms: error control
>> (form.name_of_field.errors), autopopulation when editing the Task, etc, so
>> doing it manually with javascript and server-side handling of the POST
>> request would be too complicated and error-prone.
>>
>> This is the way I need the form (the number of steps in each group is set
>> by the "number_of_steps" field in the Task model):
>>
>> +---+
>> | STEP GROUP 1  |
>> |   |
>> | Init date: _  |
>> |   |
>> | Step 1:   |
>> | Step 2:   |
>> | Step 3:   |
>> |   |
>> +---+
>> | STEP GROUP 2  |
>> |   |
>> | Init date: _  |
>> |   |
>> | Step 1:   |
>> | Step 2:   |
>> | Step 3:   |
>> |   |
>> +---+
>> |   |
>> | +---+ |
>> | | Create step group | |
>> | +---+ |
>> +---+
>>
>> Please, any kind of help, suggestion or link will be very appreciated :-)
>>
>  --
> 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/a6e7e2ba-70ee-44ea-b420-05dc854ee03e%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/CAFWa6tJhK-t0sJtj-XnmYisbEkCRYHH8TgxjdBhni%2B-iwTMjLw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: wait processing

2014-01-05 Thread Erik Cederstrand
Den 05/01/2014 kl. 13.44 skrev pointmuriae castro :

> I am needing to display a wait message while processing perform some process 
> on the server anyone could help me

A simple option is to run your processing via Celery or some other task queue. 
You then store the job status somewhere in your database, and export the job 
status via a simple JSON API. Your webpage then uses Javascript to poll the 
status URL and update the status message.

Erik

-- 
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/F2EF6D8C-EDFB-4FEF-8EB3-74B0F0D27C89%40cederstrand.dk.
For more options, visit https://groups.google.com/groups/opt_out.


Django manage.py returns ValueError: zero length field name in format

2014-01-05 Thread Carlos Quiros
Hi,

I am trying to run a Django application in Python 2.6.6 Django==1.5.5 . But 
when I try to run

*python manage.py*

I get:

*Traceback (most recent call last):
  File "manage.py", line 12, in 
print('Your environment 
is:"{}"'.format(os.environ['DJANGO_SETTINGS_MODULE']))
ValueError: zero length field name in** format*

Any idea what is wrong? I am also running the same application in another 
server but with Python 2.7.5 and it works ok.

Note: DJANGO_SETTINGS_MODULE is an environmental variable in both systems

Thanks,

Carlos



-- 
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/fc3c63a0-ff11-47cd-866f-069683af3ee6%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django manage.py returns ValueError: zero length field name in format

2014-01-05 Thread Mario Gudelj
Sounds like you need 2.7 or at least 3. Check out this answer on SO
http://stackoverflow.com/questions/10054122/valueerror-zero-length-field-name-in-format-python

Can't have print('Your environment
is:"{}"'.format(os.environ['DJANGO_SETTINGS_MODULE']))

Should be *print('Your environment
is:"{0}"'.format(os.environ['DJANGO_SETTINGS_MODULE']))*


On 6 January 2014 12:50, Carlos Quiros  wrote:

> Hi,
>
> I am trying to run a Django application in Python 2.6.6 Django==1.5.5 .
> But when I try to run
>
> *python manage.py*
>
> I get:
>
> *Traceback (most recent call last):
>   File "manage.py", line 12, in 
> print('Your environment 
> is:"{}"'.format(os.environ['DJANGO_SETTINGS_MODULE']))
> ValueError: zero length field name in** format*
>
> Any idea what is wrong? I am also running the same application in another
> server but with Python 2.7.5 and it works ok.
>
> Note: DJANGO_SETTINGS_MODULE is an environmental variable in both systems
>
> Thanks,
>
> Carlos
>
>
>
>  --
> 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/fc3c63a0-ff11-47cd-866f-069683af3ee6%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/CAHqTbj%3DSHAgE6p2HHEHCMSPkZX28qKXcOEX1RiwtFCxkbjo48A%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.