Re: upload image

2012-06-17 Thread Kurtis Mullins
>
> On Sun, Jun 17, 2012 at 2:33 AM, Satvir Toor 
>  wrote:



> but when i try to submit data it makes the upload file empty and gives
> notification this field(file upload) is required.


Make sure you set up the Form enctype correctly. ()

MEDIA_ROOT =
> '/usr/local/lib/python2.7/dist-packages/django/contrib/admin/media/'


Media root is a directory that you want to upload files to. You'd probably
want something more along the lines of /home/username/uploads or
/var/html/uploads or /srv/html/uploads, etc... And then setup your
front-end httpd server to serve the files from this directory as well.

-- 
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 and PHP webhosting in Germany

2012-06-17 Thread Mike Ryan
Are "which webhost" questions really relevant to this list? I just did a 
quick search, and it seems this question is coming up more and more 
frequently. It seems quite out of place here, IMHO. I use this list to see 
interesting ways people use Django, or learn from other people's answers - 
not so I can keep up to date with which web hosts support django.

Does anyone else feel that "which webhost..." questions should be politely 
responded to with a link to  
https://code.djangoproject.com/wiki/DjangoFriendlyWebHosts, and a request 
not to post similar questions in future? This is nothing personal Steve, I 
just feel the list is getting cluttered up with questions that are barely 
relevant to the group, and are easily answerable with some googling.

Regards,

Mike

On Saturday, June 16, 2012 10:24:27 PM UTC+2, sjtirtha wrote:
>
> Hi, 
>
> can somebody recommend a good and cheap web hosting for django and 
> php(wordpress)? 
> I'm looking something below 10 € monthly, only for small apps and blogs. 
>
> Regards, 
> Steve 
>

-- 
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/-/hVwd2352W4IJ.
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: no module named books found

2012-06-17 Thread kooliah

On 06/17/2012 06:23 AM, Sabbineni Navneet wrote:


It still shows the same error .
Do we have to create a database with that name before.
How do we check if i have the python-mysqldb package .
--
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.



Try
'ENGINE': 'mysql',

to check if mysqldb is installed, from python terminal

>>>import MySQLdb

if it will give you no errors, it's installed

--
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: no module named books found

2012-06-17 Thread Sabbineni Navneet
I have Mysqldb installed.
It still shows the same error.

-- 
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 doesn't Django support subdomain url conf?

2012-06-17 Thread Alireza Savand
Thank you Rafał, it's useful.
But it's will be reasonable if django own subdomains built-in.

On Saturday, June 16, 2012 6:04:36 PM UTC+4, Rafał Stożek wrote:
>
> You may want to take a look at this project: 
> https://github.com/ennio/django-hosts
>
> On Saturday, June 16, 2012 1:48:16 PM UTC+1, Alireza Savand wrote:
>>
>> Have extremely control on URLs with django is easy as possible.
>>
>> But why there is nothing about handling subdomains url configration, all 
>> i found it was 
>> makinga 
>> middleware 
>> and  
>> exposethe 
>> request :|
>> And maybe all of them are all right, but why there is no support about 
>> subdomain url handling in django itself, is there a rule or something 
>> behind it or it is a minor thing ?
>> And by the way, what way do you prefer to working with subdomains ?
>>
>>

-- 
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/-/4s9Sx9xnVbAJ.
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 and PHP webhosting in Germany

2012-06-17 Thread sjtirtha
Hi Mike,

I've checked the link before. The list shows me only 2 providers in
Germany which offer php and python from one box.
There are some other providers from Swiss, but they do not offer php.
That's why I asked question here. My following question is also, if I
do not have any root access, what is the limitation will I face in the
future for Django deployment. Web hosting normally does not offer root
access compared to virtual server.

I checked also in google and even asked two main german provider 1und1
and strato, but they haven't answer my emails yet.

Regards,
Steve

On Sun, Jun 17, 2012 at 9:55 AM, Mike Ryan  wrote:
> Are "which webhost" questions really relevant to this list? I just did a
> quick search, and it seems this question is coming up more and more
> frequently. It seems quite out of place here, IMHO. I use this list to see
> interesting ways people use Django, or learn from other people's answers -
> not so I can keep up to date with which web hosts support django.
>
> Does anyone else feel that "which webhost..." questions should be politely
> responded to with a link to
> https://code.djangoproject.com/wiki/DjangoFriendlyWebHosts, and a request
> not to post similar questions in future? This is nothing personal Steve, I
> just feel the list is getting cluttered up with questions that are barely
> relevant to the group, and are easily answerable with some googling.
>
> Regards,
>
> Mike
>
>
> On Saturday, June 16, 2012 10:24:27 PM UTC+2, sjtirtha wrote:
>>
>> Hi,
>>
>> can somebody recommend a good and cheap web hosting for django and
>> php(wordpress)?
>> I'm looking something below 10 € monthly, only for small apps and blogs.
>>
>> Regards,
>> Steve
>
> --
> 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/-/hVwd2352W4IJ.
>
> 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.



Forum app for Django?

2012-06-17 Thread galgal
What forum app dou you reccomend. I need a standard functionality like 
moderators, nested categories, registration etc.

-- 
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/-/LDyYmwkEDpUJ.
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: How do I get django working without having to manually run the server?

2012-06-17 Thread Phang Mulianto
The python manage.py runserveris intended for fast development time to
kick start the apps.

you don't need to prepare the apache wsgi stack first, especialy if you
want to try something new like django newcomer. it's took time and
knowledge to prepare the apache wsgi.

but it still an option if you don't want use the runserver command.
if you don't want to type it everytime you start the development, make it
run as service in your devel machine.

it's bundled in django as a development web server, not for production web
server.

so make it what you like ... it's in the documentation..



On Sun, Jun 17, 2012 at 12:20 PM, Kurtis Mullins
wrote:

> But you still need manage.py runserver for development because it is
>> specially designed to prioritise debugging over security and performance.
>
>
> Really? I could see the use for it when running an actual debugger but
> otherwise, I'm not so sure there's any benefit to using it. Do you have any
> sources or more information on this? This is new information to me. 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.
>

-- 
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 and PHP webhosting in Germany

2012-06-17 Thread Daniele Procida
On Sun, Jun 17, 2012, Mike Ryan  wrote:

>Does anyone else feel that "which webhost..." questions should be politely 
>responded to with a link to  
>https://code.djangoproject.com/wiki/DjangoFriendlyWebHosts, and a request 
>not to post similar questions in future?

Not really, it seems a perfectly relevant question, and a sensible way to get 
and give up-to-date advice based on personal experience.

Daniele

-- 
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 and PHP webhosting in Germany

2012-06-17 Thread Nick Apostolakis

On 16/06/2012 11:47 μμ, Carlos Daniel Ruvalcaba Valenzuela wrote:

Try Hetzner in Germany, they are a solid hosting company with
reasonable prices, their dedicated hardware is well know for being a
great value.

http://www.hetzner.de/
   


You can get a virtual server from Hetzner with a monthly cost of 7.9€
You can then install anything you like on it.

I have such a server with them and it works fine.

--
 --
   Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --


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



Django 1.3 Admin Changelist column alignment

2012-06-17 Thread kooliah
I'm trying to change alignment of the number columns in the changelist, 
instead of default left alignment for all, i would like to have left for 
the text and right for the numbers.
Is it possible to do it in the admin.py overriding the default class or 
i have to make some filters and apply to the template?


Overriding i can change the format or the column displayed using a 
callable, so i tryed to rjust the number (converted to string and 
thousand separated) using a function but i think it is trimmed again 
later



Can someone point me in the right direction?

Thanks to all

Kooliah

--
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 and google app engine

2012-06-17 Thread Gebriel Abebe
Please I want to know the same thing?

-- 
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/-/bU3CTr2hjmQJ.
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 and PHP webhosting in Germany

2012-06-17 Thread Egon Frerich
Am 16.06.2012 22:24, schrieb sjtirtha:
> Hi,
>
> can somebody recommend a good and cheap web hosting for django and
> php(wordpress)?
> I'm looking something below 10 € monthly, only for small apps and blogs.
>
> Regards,
> Steve
>
I recommend

www.raumopol.de/

Our django website schwachhausen-nord.de is hosted there.

Egon


-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!  

Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a

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



Recover User by SESSIONID

2012-06-17 Thread upmauro
Hi ! Sorry my english.

I using uploadfy in my website, this basically is one SWF to upload files.

This works fine, but my question is "how recover logged user in post 
uploader request?"

I have SESSIONID in form and my swf post this, but i don't know recover 
user by session id.

Please help-me, thanks !

-- 
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/-/oeYAADUGPGcJ.
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 and google app engine

2012-06-17 Thread Ernesto Guevara
In GAE only using django-norel, a fork of django with no join's queryset.

https://developers.google.com/appengine/articles/django-nonrel

Or using in Google Cloud SQL:

https://developers.google.com/appengine/docs/python/cloud-sql/django

But is a paying service.


2012/6/17 Gebriel Abebe 

> Please I want to know the same thing?
>
>  --
> 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/-/bU3CTr2hjmQJ.
>
> 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.



Re: Recover User by SESSIONID

2012-06-17 Thread Sultan Imanhodjaev
Hey,

In my case I use generated hash from *user.id* and *user.date_joined*passed via
*formData* this is poor implementation and potentially insecure but for a
while it works.


Sultan,
Thanks

On Sun, Jun 17, 2012 at 9:15 PM, upmauro  wrote:

> Hi ! Sorry my english.
>
> I using uploadfy in my website, this basically is one SWF to upload files.
>
> This works fine, but my question is "how recover logged user in post
> uploader request?"
>
> I have SESSIONID in form and my swf post this, but i don't know recover
> user by session id.
>
> Please help-me, thanks !
>
> --
> 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/-/oeYAADUGPGcJ.
> 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.
>



-- 
Kind regards,
Sultan Imanhodjaev
+996 559 06 76 06

-- 
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: no module named books found

2012-06-17 Thread Ernesto Guevara
"Do we have to create a database with that name before."

Yes, you need create the database "xam" (from mysql query browser) before
running syncb.

2012/6/17 Sabbineni Navneet 

> I have Mysqldb installed.
> It still shows the same error.
>
>
>
>  --
> 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.



Re: Recover User by SESSIONID

2012-06-17 Thread Mauro Alexandre
Sultan, great !

Guess I'll do that too, it's very unsafe.

Thanks for the tip!


2012/6/17 Sultan Imanhodjaev 

> Hey,
>
> In my case I use generated hash from *user.id* and *user.date_joined*passed 
> via
> *formData* this is poor implementation and potentially insecure but for a
> while it works.
>
>
> Sultan,
> Thanks
>
> On Sun, Jun 17, 2012 at 9:15 PM, upmauro  wrote:
>
>> Hi ! Sorry my english.
>>
>> I using uploadfy in my website, this basically is one SWF to upload files.
>>
>> This works fine, but my question is "how recover logged user in post
>> uploader request?"
>>
>> I have SESSIONID in form and my swf post this, but i don't know recover
>> user by session id.
>>
>> Please help-me, thanks !
>>
>> --
>> 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/-/oeYAADUGPGcJ.
>> 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.
>>
>
>
>
> --
> Kind regards,
> Sultan Imanhodjaev
> +996 559 06 76 06
>
>

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



CSS not appearing in production mode.

2012-06-17 Thread Jak
Hello All,

I am having a difficult time getting the CSS for my web app to appear when 
I turn debug mode to false. When debug mode = True all the images show up 
fine, but when I turn it to false only the html appears. What do you think 
could be happening?


Thanks

Jak

-- 
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/-/BNfAFDsMhhsJ.
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: no module named books found

2012-06-17 Thread Sabbineni Navneet
i have created a database named xam.
But it still shows the same error:django.core.exceptions.ImproperlyConfigured:
settings.DATABASES is improperly configured.

-- 
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: CSS not appearing in production mode.

2012-06-17 Thread Kev Dwyer
Jak wrote:

> Hello All,
> 
> I am having a difficult time getting the CSS for my web app to appear when
> I turn debug mode to false. When debug mode = True all the images show up
> fine, but when I turn it to false only the html appears. What do you think
> could be happening?
> 
> 
> Thanks
> 
> Jak
> 
Hello

Assuming that you're using Django 1.3 or later, you should check your static 
files setup.  See 
https://docs.djangoproject.com/en/1.4/ref/contrib/staticfiles/

Note that DEBUG=True affects how static files are served: 
https://docs.djangoproject.com/en/1.4/ref/contrib/staticfiles/#static-file-
development-view

Cheers

-- 
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: How do I get django working without having to manually run the server?

2012-06-17 Thread Kurtis Mullins
I did forget one important (and very useful feature) that the runserver
contains -- the automatic reload whenever you modify files. I was just
curious if it provided more debugging information than otherwise would be
provided based upon that statement.

On Sun, Jun 17, 2012 at 6:48 AM, Phang Mulianto  wrote:

> The python manage.py runserveris intended for fast development time to
> kick start the apps.
>
> you don't need to prepare the apache wsgi stack first, especialy if you
> want to try something new like django newcomer. it's took time and
> knowledge to prepare the apache wsgi.
>
> but it still an option if you don't want use the runserver command.
> if you don't want to type it everytime you start the development, make it
> run as service in your devel machine.
>
> it's bundled in django as a development web server, not for production web
> server.
>
> so make it what you like ... it's in the documentation..
>
>
>
> On Sun, Jun 17, 2012 at 12:20 PM, Kurtis Mullins  > wrote:
>
>> But you still need manage.py runserver for development because it is
>>> specially designed to prioritise debugging over security and performance.
>>
>>
>> Really? I could see the use for it when running an actual debugger but
>> otherwise, I'm not so sure there's any benefit to using it. Do you have any
>> sources or more information on this? This is new information to me. 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.
>>
>
>  --
> 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.



Trying to implement "outlines"

2012-06-17 Thread Melvyn Sopacua
Hello,

I'm trying to implement a ModelAdmin that uses the opposite of Inlines.
In this case the Inline field is the target of the foreign key, not the
model that has the foreign key reference. In my case, the foreign keys
allow NULL, because I'm using an external source to provide me with some
information that I can't directly tie to entities in my database.

An example would be stocktrading ID's associated with a companies. Since
you can't count on name matching to always work, some ID's will not
match a company. Some companies may not exist yet and I'd like to
provide some basic information as defaults for the new company that is
already available. Also, I'd like to use an autocomplete field, rather
then a select, since it's quite a bit of info.

Anyway - not to extend the example too much, I can't seem to find the
right hooks to implement and my biggest issues are:
1) formfield_for_dbfield() needs to return a FormField instance and the
actual form for the field is not a 'single entity', but quite an
involved formset.
2) inlines do some validation that the inline model has the correct
relationship with the parent form and cheating and ignoring that
validation will get you in trouble down the line when the form needs to
be saved.

I'm still reading the source and trying to find the right entrypointss,
but sure would appreciate some pointers or even "can't be done yet".
-- 
Melvyn Sopacua

-- 
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: Stuck already on step one, django on windows

2012-06-17 Thread Melvyn Sopacua
On 14-6-2012 17:25, Daniel Roseman wrote:

>> I rent space on a server run by hostmonster.com.  Would it be a better 
>> idea for me to learn how to do all this straight on my server instead of 
>> windows anyways?  I don't even know how to tell if the django stuff works 
>> within my hosting environment.

> 
> No need for Unix or cygwin. cd works perfectly well in Windows, as does 
> Django generally. What specific problem are you having?

The unix/cygwin comment was related to that part specifically. Either
way, off-list I received indication that his problem is related to the
windows path, and putting that back on the list:

On 14-6-2012 18:35, Daniel Patriarca wrote:
> - I entered  hit enter
>
> - I got the error that django-admin.py is not recognized as an internal or
> external command, operable program or batch file.

In this case, you need to alter the windows PATH variable. I totally
forgot how to do that, something with My Computer and right-clicks.
Maybe somebody else can chime in.
-- 
Melvyn Sopacua

-- 
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: Where are my posts?

2012-06-17 Thread Melvyn Sopacua
On 17-6-2012 0:18, Thomas Lockhart wrote:
> On 6/16/12 2:35 PM, Laurence MacNeill wrote:
>> How do I get privileges to post in this group?  I've posted two
>> questions, and have not seen them pop up yet...  Who do I need to
>> contact to get posting privileges?  I really was hoping to get these
>> questions answered soon.
> fwiw I've never seen my posts "pop up". If you send from gmail.com then
> it apparently filters out mail from yourself. I'll bet you see your
> posts in the archives...

I've been looking to turn that "feature" off as well. If anyone knows
where that button is, let me know. ;)


-- 
Melvyn Sopacua

-- 
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: How do I get django working without having to manually run the server?

2012-06-17 Thread Àlex Pérez
One question,

The automatic reload whenever you modify the files. There are an
alternative to do that with mod_wsgi? or anything else?

Thanks!

2012/6/17 Kurtis Mullins 

> I did forget one important (and very useful feature) that the runserver
> contains -- the automatic reload whenever you modify files. I was just
> curious if it provided more debugging information than otherwise would be
> provided based upon that statement.
>
>
> On Sun, Jun 17, 2012 at 6:48 AM, Phang Mulianto wrote:
>
>> The python manage.py runserveris intended for fast development time
>> to kick start the apps.
>>
>> you don't need to prepare the apache wsgi stack first, especialy if you
>> want to try something new like django newcomer. it's took time and
>> knowledge to prepare the apache wsgi.
>>
>> but it still an option if you don't want use the runserver command.
>> if you don't want to type it everytime you start the development, make it
>> run as service in your devel machine.
>>
>> it's bundled in django as a development web server, not for production
>> web server.
>>
>> so make it what you like ... it's in the documentation..
>>
>>
>>
>> On Sun, Jun 17, 2012 at 12:20 PM, Kurtis Mullins <
>> kurtis.mull...@gmail.com> wrote:
>>
>>> But you still need manage.py runserver for development because it is
 specially designed to prioritise debugging over security and performance.
>>>
>>>
>>> Really? I could see the use for it when running an actual debugger but
>>> otherwise, I'm not so sure there's any benefit to using it. Do you have any
>>> sources or more information on this? This is new information to me. 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.
>>>
>>
>>  --
>> 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.
>



-- 
Alex Perez
alex.pe...@bebabum.com

 *bebabum* be successful

c/ Còrsega 301-303, Àtic 2
08008 Barcelona
http://www.bebabum.com
http://www.facebook.com/bebabum
http://twitter.com/bebabum

This message is intended exclusively for its addressee and may contain
information that is confidential and protected by professional privilege.
If you are not the intended recipient you are hereby notified that any
dissemination, copy or disclosure of this communication is strictly
prohibited by law.

Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si no es vd. el destinatario
indicado,
queda notificado que la utilización, divulgación y/o copia sin autorización
está prohibida en virtud de la legislación vigente.

Le informamos que los datos personales que facilite/ha facilitado pasarán a
formar parte de un fichero responsabilidad de bebabum, S.L. y que tiene
por finalidad gestionar las relaciones con usted.
Tiene derecho al acceso, rectificación cancelación y oposición en nuestra
oficina ubicada en c/ Còrsega 301-303, Àtic 2 de Barcelona o a la dirección
de e-mail l...@bebabum.com

-- 
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 on Mac OS X

2012-06-17 Thread Moshe Voloshin
Tried homebrew - this was a response to another reply Thomas.

brew update

Here I tried:

brew install postgresql

   but  had this error Error: Failed executing: make install-world 
(postgresql.rb:67)

So instead I did this:

brew install postgres --no-ossp-uuid  --no-python --no-rubie

Then when running python manage.py runserver I got this error mentioned 
first:

Symbol not found: _PQbackendPID

In my virtual env I did not install python, it used my mac installation, 
that is correct.
However from the nature of the error it did not look like it relates to 
python.
In my settings.py I followed Heroku instructions and put this for the 
database:
 import dj_database_url
 DATABASES = {'default': 
dj_database_url.config(default='postgres://localhost')}
Here are some details on my virtual env:
That's the structure, without all the files of course:

venv/lib/python2.7/warnings.pyc venv/include/python2.7/unicodeobject.h 
venv/include/python2.7/metagrammar.h


venv/lib/python2.7/site-packages:
setuptools.pth pip-1.1-py2.7.egg dj_database_url.pyc 
distribute-0.6.24-py2.7.egg
psycopg2-2.4.5-py2.7.egg-info easy-install.pth dj_database_url.py 
Django-1.4-py2.7.egg-info
psycopg2 django dj_database_url-0.2.0-py2.7.egg-info

venv/lib/python2.7/lib-dynload:
zlib.so fcntl.so _scproxy.so _codecs_jp.so _Help.so
unicodedata.so dl.so _random.so _codecs_iso2022.so .


venv/lib/python2.7/encodings:
zlib_codec.pyo shift_jis_2004.pyc mac_croatian.py iso8859_13.pyo gb18030.pyc 
cp860.py cp1253.pyo
.

venv/lib/python2.7/distutils:
distutils.cfg __init__.pyc __init__.py

venv/lib/python2.7/config:
python.o libpython2.7.dylib install-sh config.c Setup.config Makefile
makesetup libpython2.7.a config.c.in Setup.local Setup

Not sure if these are the details that can help.
Moshe

On Sunday, July 18, 2010 5:06:58 PM UTC-7, daniel.franca wrote:
>
> Recently I migrated from Linux to Mac OS X 10.6, and I was thinking that 
> would be easy to migrate my Django project to that.
> I was wrong, a lot wrong...
> First I tried to install Python2.7, the libs I need to my project, etc
> After that I get the error:
> *gresql_psycopg2/base.py", line 24, in *
> *raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)*
> *django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 
> module: 
> dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psycopg2/_psycopg.so,
>  
> 2): Symbol not found: _PQbackendPID*
> *  Referenced from: 
> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psycopg2/_psycopg.so
> *
> *  Expected in: flat namespace*
> * in 
> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psycopg2/_psycopg.so
> *
> *
> *
> After some research I saw some suggestions, one of them was to download 
> and install everything from Ports. But it didn't work for me too:
>
> :info:configure configure: error: library 'xml2' (version >= 2.6.23) is 
> required for XML support
> :info:configure shell command " cd 
> "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_postgresql84/work/postgresql-8.4.4"
>  
> && ./configure --prefix=/opt/local --disable-dependency-tracking 
> --sysconfdir=/opt/local/etc/postgresql84 
> --bindir=/opt/local/lib/postgresql84/bin 
> --libdir=/opt/local/lib/postgresql84 
> --includedir=/opt/local/include/postgresql84 
> --datadir=/opt/local/share/postgresql84 --mandir=/opt/local/share/man 
> --without-docdir --with-includes=/opt/local/include 
> --with-libraries=/opt/local/lib --with-openssl --with-bonjour 
> --with-readline --with-zlib --with-libxml --with-libxslt 
> --enable-thread-safety --enable-integer-datetimes --with-ossp-uuid " 
> returned error 1
> :error:configure Target org.macports.configure returned: configure 
> failure: shell command failed
>
> But libxml2.7 was there, what I did? I tried to remove it and install 
> again, but when I tried to reinstall it I get another error:
>
> Error: You cannot install libxml2 for the architecture(s) x86_64 i386 
> because
>
> Error: its dependency libiconv only contains the architecture(s) i386 ppc.
>
> I tried install psycopg2 using easy_install... everything looks fine, but 
> when I try to run my project, same error before.
>
> Another suggestion I found was to run python in 32 bits mode.
>
> I did a little test:
>
>  "arch -i386 pyhon -c 'import psycopg2' 
>
> It seems to work, but when I ran my project the error is still there, 
> tried to change de env variable:
>
> defaults write com.apple.versioner.python Prefer-32-Bit -bool yes
>
> no success yet.
>
> So I gave up of Python2.7 and back to Python2.5 tried to install 
> everything again.
>
> and it's not even recognize Django:
>
> Traceback (most recent call last):
>   File "./manage.py", line 11, in 
> from django.conf import settings
> ImportError: No module named django.conf
>
> The libs are here:
> python -c "from distutils.

AuditTrail

2012-06-17 Thread Lee Hinde
I'm starting a new project that requires auditing and I 
see https://code.djangoproject.com/wiki/AuditTrail and I'm wondering if 
anyone would like to warn me off or point me a different direction.

Based on the write up, AuditTrail looks like it'd do the job, but, it's 
never that easy, right?

-- 
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/-/bF_P5PJrEukJ.
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: Recover User by SESSIONID

2012-06-17 Thread Mauro Alexandre
I Solved !

in formData of uploadfy i add {{ request.COOKIES.sessionid }}

and in my view i used :

session = Session.objects.get(session_key=request.COOKIES['sessionid'])
uid = session.get_decoded().get('_auth_user_id')
user = User.objects.get(pk=uid)

Works Fine !

Thanks :)


2012/6/17 Mauro Alexandre 

> Sultan, great !
>
> Guess I'll do that too, it's very unsafe.
>
> Thanks for the tip!
>
>
> 2012/6/17 Sultan Imanhodjaev 
>
>> Hey,
>>
>> In my case I use generated hash from *user.id* and *user.date_joined*passed 
>> via
>> *formData* this is poor implementation and potentially insecure but for
>> a while it works.
>>
>>
>> Sultan,
>> Thanks
>>
>> On Sun, Jun 17, 2012 at 9:15 PM, upmauro  wrote:
>>
>>> Hi ! Sorry my english.
>>>
>>> I using uploadfy in my website, this basically is one SWF to upload
>>> files.
>>>
>>> This works fine, but my question is "how recover logged user in post
>>> uploader request?"
>>>
>>> I have SESSIONID in form and my swf post this, but i don't know recover
>>> user by session id.
>>>
>>> Please help-me, thanks !
>>>
>>> --
>>> 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/-/oeYAADUGPGcJ.
>>> 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.
>>>
>>
>>
>>
>> --
>> Kind regards,
>> Sultan Imanhodjaev
>> +996 559 06 76 06
>>
>>
>

-- 
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: Forum app for Django?

2012-06-17 Thread Jordon Wing
On Sunday, June 17, 2012 3:46:16 AM UTC-7, galgal wrote:
> What forum app dou you reccomend. I need a standard functionality like 
> moderators, nested categories, registration etc.

I have yet to find a good one, honestly. 

Here's a link for a comparison of forum apps: 
http://www.djangopackages.com/grids/g/forums/

Let me know if you find one that works well.

-- 
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/-/jDnsfbq7s-oJ.
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-admin.py startproject mysite

2012-06-17 Thread stikic
Hello,

I installed django and added it to my PATH in windows. When I run
django-admin.py startproject mysite as follows, I get error. How can I
solve this?:
C:\Python27\MyFiles\mysite>C:\Python27\Lib\site-packages\django\bin
\django-admin
.py startproject mysite
Usage: django-admin.py subcommand [options] [args]

Options:
  -v VERBOSITY, --verbosity=VERBOSITY
Verbosity level; 0=minimal output, 1=normal
output,
2=verbose output, 3=very verbose output
  --settings=SETTINGS   The Python path to a settings module, e.g.
"myproject.settings.main". If this isn't
provided, the
DJANGO_SETTINGS_MODULE environment variable
will be
used.
  --pythonpath=PYTHONPATH
A directory to add to the Python path, e.g.
"/home/djangoprojects/myproject".
  --traceback   Print traceback on exception
  --version show program's version number and exit
  -h, --helpshow this help message and exit

Type 'django-admin.py help ' for help on a specific
subcommand.

Available subcommands:

[django]
cleanup
compilemessages
createcachetable
dbshell
diffsettings
dumpdata
flush
inspectdb
loaddata
makemessages
reset
runfcgi
runserver
shell
sql
sqlall
sqlclear
sqlcustom
sqlflush
sqlindexes
sqlinitialdata
sqlreset
sqlsequencereset
startapp
startproject
syncdb
test
testserver
validate

Thank you.

-- 
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-admin.py startproject mysite

2012-06-17 Thread şahin mersin
Did you restart your computer?

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



Various thoughts on authentication, registration and social logins

2012-06-17 Thread Mattias Linnap
Hi all,

I'm trying to build a nice authentication flow for a website.

In my opinion, a good flow would be:
0. There are no usernames, emails are used instead,
1. User signs up by just entering their email address,
2. An account is created for them, and a temporary plaintext password,
along with a sign-in link is sent by email (only its hash, not the
plaintext password is stored in the database),
3. If they log in for the first time, they are prompted to, but not
forced to change their password (this is not emailed),
4. If they forget their password, a new temporary password along with
a sign-in link are sent to them by email.
5. There should be as few intermediate "success confirmation" pages as
possible, instead redirecting to an useful page, and showing a
temporary message on there.

I would argue that this is as secure as ordinary password reset emails.
Emailing users their passwords is insecure if they *themselves* chose
the password - because they often re-use it on multiple sites.
As long as it is a randomly generated one, it is no different from
emailing them password reset links.
Do you agree?

What would you recommend as the approach to building this with least
effort, while keeping the rest of django and django.contrib packages
working as expected?
I've experimented briefly with django-registration, and it seems that
the best approach might be writing a new backend for it.
Do you have any other suggestions or packages that I should look at first?

Thanks,

Mattias

-- 
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: upload image

2012-06-17 Thread Satvir Toor
On Sun, Jun 17, 2012 at 12:36 PM, Kurtis Mullins
 wrote:
>> On Sun, Jun 17, 2012 at 2:33 AM, Satvir
>> Toor  wrote:

> Make sure you set up the Form enctype correctly. ( ... enctype="multipart/form-data">)
I did it. Problem solved. Thanx Sir.
>> MEDIA_ROOT =
>> '/usr/local/lib/python2.7/dist-packages/django/contrib/admin/media/'
Now, I set my setting.py as
MEDIA_ROOT='/home/toor/media/'

>setup your front-end httpd server to serve the files from this directory as 
>well.
Please tell me how to setup httpd sever to serve the files from this
directory. The images are stored into a folder and their paths which
are relative to MEDIA_ROOT are being store into table. Please help me
take the images back into database.


-- 
Satvir Kaur
satveerkaur.blogspot.in

-- 
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: upload image

2012-06-17 Thread Satvir Toor
On Mon, Jun 18, 2012 at 6:29 AM, Satvir Toor  wrote:
> On Sun, Jun 17, 2012 at 12:36 PM, Kurtis Mullins
>  wrote:
>>> On Sun, Jun 17, 2012 at 2:33 AM, Satvir
>>> Toor  wrote:
>
>> Make sure you set up the Form enctype correctly. (> ... enctype="multipart/form-data">)
> I did it. Problem solved. Thanx Sir.
>>> MEDIA_ROOT = 
>>> '/usr/local/lib/python2.7/dist-packages/django/contrib/admin/media/'
> Now, I set my setting.py as
> MEDIA_ROOT='/home/toor/media/'
>
>>setup your front-end httpd server to serve the files from this directory as 
>>well.
> Please tell me how to setup httpd sever to serve the files from this
> directory. The images are stored into a folder and their paths which
> are relative to MEDIA_ROOT are being store into table. Please help me
> to take the images back into browser. The method through which i can retrieve 
> images from the database to the browser form.
>
>
> --
> Satvir Kaur
> satveerkaur.blogspot.in



-- 
Satvir Kaur
satveerkaur.blogspot.in

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