Advice/tips on how make private directory for each user?

2011-12-25 Thread Chris Seberino
I want some files to only be accessible by certain users.

For example, imagine a teacher wanting to distribute graded exams on a
Django server w/o violating any student's privacy.

Is there an easy way to do this?I am aware of the access control
decorator for specific views but not for specific static
directories.

cs

-- 
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.



question about django-admin.py

2011-12-25 Thread Chen Xu
Hi, everyone:
Does anyone run the following command recently:

django-admin.py startproject project


It does not create what the django document says:
it creates somehting like:

project/
__init__.py
manage.py
settings.py
urls.py
project/
__init__.py
manage.py
settings.py
urls.py


it is like nested and duplicated directory.


Thanks


-- 
⚡ Chen Xu ⚡

-- 
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: Advice/tips on how make private directory for each user?

2011-12-25 Thread Demetrio Girardi
Static files are not handled by django, so you would have to configure your 
webserver for authentication and access control.

You can however create a django view that picks stuff from the filesystem 
and serves it as attachment:

https://docs.djangoproject.com/en/dev/ref/request-response/#telling-the-bro
wser-to-treat-the-response-as-a-file-attachment

-- 
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: question about django-admin.py

2011-12-25 Thread 软刀
I don't know why u get this
I run it well

maybe u can reinstall it

-- 
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: Writing apps for django

2011-12-25 Thread Lukasz

On 24 déc, 18:18, Denis Darii  wrote:
> Take a look at Django 
> Conventions:http://ericholscher.com/projects/django-conventions/
>
> Also this article could be useful for 
> you:http://blog.zacharyvoase.com/2010/02/03/django-project-conventions/
>

Thanks, Django Conventions looks like something I was looking for :)

Another thing, do you have any example, other than the admin app, of
reusable django applications ? I find it hard to figure out what a
reusable web app can be :)

-- 
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: Writing apps for django

2011-12-25 Thread Denis Darii
http://djangopackages.com/ is what you need.

On Sun, Dec 25, 2011 at 2:04 PM, Lukasz  wrote:

>
> On 24 déc, 18:18, Denis Darii  wrote:
> > Take a look at Django Conventions:
> http://ericholscher.com/projects/django-conventions/
> >
> > Also this article could be useful for you:
> http://blog.zacharyvoase.com/2010/02/03/django-project-conventions/
> >
>
> Thanks, Django Conventions looks like something I was looking for :)
>
> Another thing, do you have any example, other than the admin app, of
> reusable django applications ? I find it hard to figure out what a
> reusable web app can be :)
>
> --
> 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.
>
>


-- 
This e-mail and any file transmitted with it is intended only for the
person or entity to which is addressed and may contain information that is
privileged, confidential or otherwise protected from disclosure. Copying,
dissemination or use of this e-mail or the information herein by anyone
other than the intended recipient is prohibited. If you are not the
intended recipient, please notify the sender immediately by return e-mail,
delete this communication and destroy all copies.

-- 
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: Why when upload PDFs, Django says the content type is "application/text"?

2011-12-25 Thread Ivo Brodien
> I was getting "application/pdf" a few days ago with same client,
> server, browser, etc.

If this really is the case and the code is exactly the same, maybe it depends 
somehow on the PDF itself? Did you check that?

-- 
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: Django open source cashflow management app

2011-12-25 Thread Dan Poirier
On Thu. 2011-07-28 at 10:33 AM CDT, Derek  wrote:

> On Jul 28, 5:27 am, zodman  wrote:
>> the app is back :)
>
> Oops! Google Chrome could not find misgastos.zodman.com.mxits
>
> Looks like:
> http://misgastos.zodman.com.mx/
> is the correct URL!

I guess not anymore, it's just a "you've installed your web server
correctly" page now.  Maybe ?

-- 
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: question about django-admin.py

2011-12-25 Thread Chen Xu
No, I made a mistake in my previous email:
It generates something like:

project/
__init__.py
manage.py
settings.py
urls.py
project/
__init__.py
wsgi.py
settings.py
urls.py


It seems like some changes have been made to the most recent django version?


Thanks


On Sun, Dec 25, 2011 at 3:45 AM, 软刀  wrote:

> I don't know why u get this
> I run it well
>
> maybe u can reinstall it
>
> --
> 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.
>



-- 
⚡ Chen Xu ⚡

-- 
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.



raw query placeholder "%(key)s" supported in django?

2011-12-25 Thread ali alizadeh
hi.

in psycopg module, when composing a query, you can use "%(key)s" in your
query instead of "%s", and pass a dictionary instead of a list for actual
parameter.
django docs mention the "%s" syntax for raw queries. i was just wondering
if the other syntax is supported or not, because it can be handy sometimes.

-- 
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: question about django-admin.py

2011-12-25 Thread Karen Tracey
On Sun, Dec 25, 2011 at 10:03 AM, Chen Xu  wrote:

> It seems like some changes have been made to the most recent django
> version?


Yes. See:
https://docs.djangoproject.com/en/dev/releases/1.4/#updated-default-project-layout-and-manage-py

Karen
-- 
http://tracey.org/kmt/

-- 
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: question about django-admin.py

2011-12-25 Thread Daniel Roseman
On Sunday, 25 December 2011 15:03:38 UTC, Chen Xu wrote:
>
> No, I made a mistake in my previous email:
> It generates something like:
>
> project/
> __init__.py
> manage.py
> settings.py
> urls.py
> project/
> __init__.py
> wsgi.py
> settings.py
> urls.py
>
>
> It seems like some changes have been made to the most recent django 
> version?
>
>
> Thanks
>

Yes, and not surprisingly this is fully documented in the 1.4 alpha release 
notes:
https://docs.djangoproject.com/en/dev/releases/1.4-alpha-1/#updated-default-project-layout-and-manage-py

and in the tutorial for the development version:
https://docs.djangoproject.com/en/dev/intro/tutorial01/
"Doesn't match what you see?
The default project layout recently changed. If you're seeing a "flat" 
layout (with no inner mysite/ directory), you're probably using a version 
of Django that doesn't match this tutorial version. You'll want to either 
switch to the older tutorial or the newer Django version."

If you're using the development version, you *MUST* follow the feed of 
changes. However, you really shouldn't be using it unless you have a really 
good reason. Use 1.3 until 1.4 is released.
--
DR.
 

>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/sqSmWVGnRyAJ.
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.



django 1.4 timeline

2011-12-25 Thread Sells, Fred
While I realize that release schedules are flexible until near then
actual release date, I would appreciate a "best guess" on 1.4 beta.

 

I have to complete a major upgrade of a mission critical app by 1 april.
Since I use flex for my client side and have django just return XML,
It's not like I need all the new features to work.

I'm changing

RedHat Enterprise 4 to CentOs 6

Python 2.4 to 2.6

Mod_python to mod_wsgi

Mysql 5.0 to 5.5

 

Since 1.4 has a different project structure and includes "wsgi.py"  it
would make sense to migrate to that as soon as feasible.   

 

Any guesses on schedule?

-- 
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: django 1.4 timeline

2011-12-25 Thread Karen Tracey
On Sun, Dec 25, 2011 at 11:34 AM, Sells, Fred
wrote:

> **
>
> Any guesses on schedule?
>

https://docs.djangoproject.com/en/dev/releases/1.4-alpha-1/#the-django-1-4-roadmap

Karen
-- 
http://tracey.org/kmt/

-- 
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: Why when upload PDFs, Django says the content type is "application/text"?

2011-12-25 Thread Chris Seberino


On Dec 25, 7:53 am, Ivo Brodien  wrote:
> > I was getting "application/pdf" a few days ago with same client,
> > server, browser, etc.
>
> If this really is the case and the code is exactly the same, maybe it depends 
> somehow on the PDF itself? Did you check that?

I used the Linux/Unix file command on the file to confirm it is a PDF
file!

I'm at a loss as to why client thinks it is application/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-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: Digest for django-users@googlegroups.com - 25 Messages in 7 Topics

2011-12-25 Thread 郁夫
Pydev +1

2011/12/20 

>   Today's Topic Summary
>
> Group: http://groups.google.com/group/django-users/topics
>
>- Urgent: django app got internal error: TemplateDoesNotExist: 
> 500.html<#13457e2dd88a98c4_group_thread_0>[3 Updates]
>- auth.login function not working as 
> expected<#13457e2dd88a98c4_group_thread_1>[1 Update]
>- ¿why put an input with the hash? <#13457e2dd88a98c4_group_thread_2>[3 
> Updates]
>- Which IDE should I use for Django? <#13457e2dd88a98c4_group_thread_3>[11 
> Updates]
>- Django + ajax waiting page, can not redirect to result 
> page<#13457e2dd88a98c4_group_thread_4>[1 Update]
>- Can I escape or delimit the "{{ }}" template 
> braces?<#13457e2dd88a98c4_group_thread_5>[4 Updates]
>- django-facebook-graph <#13457e2dd88a98c4_group_thread_6> [2 Updates]
>
>   Urgent: django app got internal error: TemplateDoesNotExist: 
> 500.html
>
>Ashkan Roshanayi  Dec 19 11:24AM -0800
>
>I tried to live edit base.py template but now my app has internal
>error. I
>undo the changes but still get 500 error while accessing website. Tail
>-f
>of my application_name.log shows:
>> line 291, in invalid_block_tag
>> raise self.error(token, "Invalid block tag: '%s'" % command)
>> TemplateSyntaxError: Invalid block tag: '%20get_static_prefix%20'
>
>
>And tail -f of error.log shows:
>
>[Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121] return
>> TemplateDoesNotExist(name)
>> [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206]
>> TemplateDoesNotExist: 500.html
>
>
>Is there anything I can do now? sorry but this is very urgent for me
>so
>your kind helps will be very appreciated.
>
>Cheers,
>
>
>
>
>Nikolas Stevenson-Molnar  Dec 19 11:32AM -0800
>
>
>It looks like your changes weren't undone correctly, given the "Invalid
>block tag" error. I would double check that tag, make sure it is
>correct, and make sure than any required loading is done for that tag
>to
>be available to the template.
>
>The other error (TemplateDoesNotExist) is really related to the first
>error: the first error would show a "500" page to the user, but since
>you don't have a 500.html template defined, you get the
>"TemplateDoesNotExist" instead.
>
>_Nik
>
>On 12/19/2011 11:24 AM, Ashkan Roshanayi wrote:
>
>
>
>
>Nikolas Stevenson-Molnar  Dec 19 11:34AM -0800
>
>
>Also, your "undo" may not have been picked up by the app; I would also
>try restarting your webserver.
>
>_Nik
>
>On 12/19/2011 11:24 AM, Ashkan Roshanayi wrote:
>
>
>
>   auth.login function not working as 
> expected
>
>DrBloodmoney  Dec 19 02:05PM -0500
>
>>   if user.is_active:
>>  auth.login(request,user)
>> I am getting TypeError login() takes exactly 1 argument (2 given).
>I've checked the docs and i can't find any problem there. Pls any help will
>be appreciated. Am using django 1.3.1, python 2.7 on ubuntu 11.04.
>
>It sounds like you have solved your problem. In case you haven't, in
>the auth.login() call above you have request  user instead of
>request  user. That would also give you the same error.
>
>
>
>   ¿why put an input with the 
> hash?
>
>zodman vr  Dec 19 09:57AM -0800
>
>It is a dump ass question.
>
>But why on django admin/auth/user put the input with hash of the
>password ?¿
>
>this not make sense to me!
>
>
>
>
>Nikolas Stevenson-Molnar  Dec 19 10:15AM -0800
>
>
>The admin interface is just a view into your database, and the password
>hash is what's in your database.
>
>_Nik
>
>On 12/19/2011 9:57 AM, zodman vr wrote:
>
>
>
>
>creecode  Dec 19 10:47AM -0800
>
>Hello,
>
>It might help us to better answer your question if you explained why
>you
>need to see the raw password?
>
>Toodle-lo...
>creecode
>
>
>
>   Which IDE should I use for 
> Django?
>
>girish shabadimath  Dec 19 07:57PM +0530
>
>wingware IDE.
>
>
>--
>Girish M S
>
>
>
>
>Timothy Makobu  Dec 19 05:28PM +0300
>
>Komodo Edit.
>
>On Mon, Dec 19, 2011 at 5:27 PM, girish shabadimath <
>
>
>
>
>nicolas HERSOG  Dec 19 03:47PM +0100
>
>You can also try Ulipad
>
>On Mon, Dec 19, 2011 at 3:28 PM, Timothy Makobu <
>makobu.mwambir...@gmail.com
>
>
>
>
>Alec Taylor  Dec 20 02:23AM +1100
>
>I am testing each of the ones thus far recommended (even though I hate
>Eclipse with a vengeance :3). My results you'll find succeeding: [pun
>intended!]
>
>*PyCharm*
>PyCharm seems good (albeit Java), achieves better code-completion than
>ST2 through indexing. Unfortunately it doesn't se

Re: Django 1.4 alpha 1 released

2011-12-25 Thread Cliff Peng
哈哈,等正式发布的时候大家一起把它翻译下作为社区福利。

2011/12/23 Mário Neto 

> Great, very very good! \,,/_ Congratulations!!!
>
>
> 2011/12/23 James Bennett 
>
>> Tonight as part of the 1.4 development process, we've released the
>> first alpha for Django 1.4. You can read all about it on the blog:
>>
>> https://www.djangoproject.com/weblog/2011/dec/22/14-alpha-1/
>>
>> And in the release notes:
>>
>> https://docs.djangoproject.com/en/dev/releases/1.4-alpha-1/
>>
>>
>> --
>> "Bureaucrat Conrad, you are technically correct -- the best kind of
>> correct."
>>
>> --
>> 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.
>>
>>
>
>
> --
> Att. Mário A. Chaves Neto
> Programmer, Designer and U.I. Engineer
> MBA - Design Digital
>
>  --
> 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.
>

-- 
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.