Storages API modified_time() and timezones.

2013-10-18 Thread Ian Lewis
Hi,

I'm trying to get a handle on the modified_time() method in the Storages
API. I couldn't find any hints in the doc as to what the right way to
implement the modified_time() method was in regard to timezones. Currently
it looks like the default FileSystemStorage backend returns the modified
time as returned from os.path.getmtime() which is in the system timezone.

Should the modified time as returned by modified_time() be in the system
timezone (this is not the TIME_ZONE setting)? i.e. the FileSystemStorage is
the de-facto standard?

The reason I ask this is because it raises an issue when using other
different backends together since the collectstatic command will compare
modified times of files from the different backends to determine if it
needs to update the file. We have problems with this because some systems
like AWS's S3 will return the modified time in UTC or some other timezone
and need to be converted.

-- 
Ian

http://www.ianlewis.org/

-- 
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/CAPBt0Q0CSfNeGmaok%3DUeOoN2NYVxvpoo6KoRAsSkHyNGxUkQew%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: admin template customization

2013-10-18 Thread Timothy W. Cook
Did you add:
 TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')]

to settings.py ?


On Fri, Oct 18, 2013 at 6:47 PM, Gavin Lowry  wrote:

> I'm following the tutorial at
> https://docs.djangoproject.com/en/1.5/intro/tutorial01/
> ...I'm at the stage where I can change the template of the admin site. I'm
> instructed to copy base_site.html from the django source directory to a
> template/admin folder in my site directory. I have done this and changed
> the page title text. After restarting the server and clearing my cache, the
> title text doesn't change. It's still using the default template. Is there
> a step I'm missing?
>
> --
> 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/5ef36791-1ae4-4d8a-bf18-a08bf883e36f%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
MLHIM VIP Signup: http://goo.gl/22B0U

Timothy Cook, MSc   +55 21 94711995
MLHIM http://www.mlhim.org
Like Us on FB: https://www.facebook.com/mlhim2
Circle us on G+: http://goo.gl/44EV5
Google Scholar: http://goo.gl/MMZ1o
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook

-- 
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%2B%3DOU3X_QAiJyxDDVZvtb8oA2nEduoQp1MkrgMvdbXyc5q2chQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


PythonAnywhere->TemplateSyntaxError: 'blog_extras' is not a valid tag library: ImportError raised loading nrpccms.newsroom.templatetags.blog_extras: No module named settings

2013-10-18 Thread Mario Osorio
Trying to deploy my very first app in PythonAnywhere (or at 
AnywhereAnywhere for that matter) I'm currently getting

TemplateSyntaxError: 'blog_extras' is not a valid tag library: 
ImportError raised loading nrpccms.newsroom.templatetags.blog_extras: No 
module named settings

(full error log)[http://dpaste.com/1421863/]
(see error live)[http://nimbiotics.pythonanywhere.com/]

The app newsroom is the very first one in INSTALLED_APPS:

#! python
# ...
INSTALLED_APPS = (
"nrpccms.newsroom",
"django.contrib.admin",
# ...

Also, blog_extras.py is at MY_PROJECT/MY_APP/templates, and there IS a 
__init__.py at MY_PROJECT/mY_APP

Please help me pinpoint my mistakes as I don't know where else to look: 
This are my first baby steps in the arts of webapps/django

Thanks a lot in advanced!

-- 
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/5fff932a-07b7-4919-bc57-f67228088b84%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


PendingDeprecationWarning: django.utils.simplejson is deprecated;

2013-10-18 Thread dundeemt
I have a 1.2.6 project that I am upgrading to 1.5.4,  when I run the dev 
server with:

>  python -Wall manage.py runserver


I am getting the following warning:

 
/home/jlh/Projects/calypso-15x/local/lib/python2.7/site-packages/django/utils/simplejson.py:12:
 
PendingDeprecationWarning: django.utils.simplejson is deprecated; use json 
instead.
  PendingDeprecationWarning)
0 errors found


I've been through my code from top to bottom and I don't use simplejson, 
I've been using Python's json.   Searching for simplejson or 
utils.simplejson returns nothing in my code base.

The only 3rd party packages that are Django specific are:

django-audit-log==0.2.3
django-debug-toolbar==0.9.4
django-extensions==1.2.2
django-picklefield==0.3.0


So, is this just a by product of django loading something that I'm not 
using that is spitting out a warnings.warn?  OR do I need to keep looking?

-- 
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/dfe7a647-9117-42b6-a479-4fd6a715ccb8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


admin template customization

2013-10-18 Thread Gavin Lowry
I'm following the tutorial at
https://docs.djangoproject.com/en/1.5/intro/tutorial01/
...I'm at the stage where I can change the template of the admin site. I'm 
instructed to copy base_site.html from the django source directory to a 
template/admin folder in my site directory. I have done this and changed 
the page title text. After restarting the server and clearing my cache, the 
title text doesn't change. It's still using the default template. Is there 
a step I'm missing?

-- 
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/5ef36791-1ae4-4d8a-bf18-a08bf883e36f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: MySQL error when trying to run tests with utf8mb4 charset

2013-10-18 Thread fletch
Looks like this comes from custom_user.py in django.contrib.auth.tests:

class CustomUser(AbstractBaseUser):
email = models.EmailField(verbose_name='email address', max_length=255, 
unique=True)
is_active = models.BooleanField(default=True)
is_admin = models.BooleanField(default=False)
date_of_birth = models.DateField()

I think this should have the same length as AbstractUser, where it does not 
specify a max_length, so it defaults to 75 in 
django.db.models.fields.EmailField. Should I submit a pull request for this 
change?

Thanks!

On Wednesday, October 16, 2013 11:01:45 AM UTC-7, fle...@fletchowns.net 
wrote:
>
> Hello!
>
> I tried to run *./manage.py test *for the first time and I got the 
> following error:
>
> *DatabaseError: (1071, 'Specified key was too long; max key length is 767 
> bytes')*
>
> Looking at the log in MySQL, it appears to be caused by this statement:
>
> CREATE TABLE `auth_customuser` (
> `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
> `password` varchar(128) NOT NULL,
> `last_login` datetime NOT NULL,
> `email` varchar(255) NOT NULL UNIQUE,
> `is_active` bool NOT NULL,
> `is_admin` bool NOT NULL,
> `date_of_birth` date NOT NULL
> )
>
>
> So the email field of varchar(255) is causing me to go over the 
> single-column index of 767 bytes in InnoDB when the charset is utf8mb4, 
> that part I understand.
>
> Why is it trying to create this *auth_customuser* table anyways though? 
> It doesn't exist in my application normally. The *email* field on my *
> auth_user* table is varchar(75) so no error from that, not sure why it's 
> a different length there though.
>
> To get around the issue temporarily I set the database engine to sqlite, 
> but I'd like to be able to use MySQL for the tests, since that's what my 
> application normally uses.
>
> Thanks in advance!
>

-- 
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/25d6e989-3784-4fcd-b3a4-0d2afc7354d5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How to add a post-login information to an authenticated user?

2013-10-18 Thread Khanh Tran
Even though i have not directly answered my question, i found out that 
session storage is an alternative solution.

On Friday, October 18, 2013 12:17:50 PM UTC-7, Khanh Tran wrote:
>
> I am using out of the box django 1.5 authentication solution. After 
> authenticated, i want to add a 'post_login_info' to the user using 
> user_logged_in signal from django.contrib.auth.signals
>
> from django.contrib.auth.signals import user_logged_in
> from django.dispatch import receiver
>
> @receiver(user_logged_in)
> def post_login_action(sender,user,request,**kwargs):
> user.post_login_info = 'post login info'
> 
>
>
> However, i can not retrieve user.post_login_info from request object later 
> as follow:
>
> from braces.views import LoginRequiredMixin
> from django.views.generic import ListView
>
> class MyListView(LoginRequiredMixin,ListView):
> def get_queryset(self):
> self.request.user.post_login_info  # Attribute Error: 'User' 
> object has no attribute 'post_login_info'
> ...
>
> Thank you for any suggestion. 
>

-- 
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/6aed9fdd-3829-44e1-bac2-320948ffc3c5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


How to add a post-login information to an authenticated user?

2013-10-18 Thread Khanh Tran
I am using out of the box django 1.5 authentication solution. After 
authenticated, i want to add a 'post_login_info' to the user using 
user_logged_in signal from django.contrib.auth.signals

from django.contrib.auth.signals import user_logged_in
from django.dispatch import receiver

@receiver(user_logged_in)
def post_login_action(sender,user,request,**kwargs):
user.post_login_info = 'post login info'



However, i can not retrieve user.post_login_info from request object later 
as follow:

from braces.views import LoginRequiredMixin
from django.views.generic import ListView

class MyListView(LoginRequiredMixin,ListView):
def get_queryset(self):
self.request.user.post_login_info  # Attribute Error: 'User' object 
has no attribute 'post_login_info'
...

Thank you for any suggestion. 

-- 
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/596b0890-80d0-40e3-a3fb-0a5e0f30302b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Authenticated user loss an attribute that is added under user_logged_in signal.

2013-10-18 Thread Khanh Tran
I am using out of the box django 1.5 authentication solution. I also 
user_logged_in signal from django.contrib.auth.signals to add a piece of 
information to the logged in user to hope i can retrieve it later as follow:

from django.contrib.auth.signals import user_logged_in
from django.dispatch import receiver

@receiver(user_logged_in)
def add_extra_info_to_logged_in_user(sender,user,request,**kwargs):
user.extra_info = 'extra info'
print user.extra_info # I confirmed that the assignment is executed



However, i can not retrieve user.extra_info from request object as follow:

from braces.views import LoginRequiredMixin
from django.views.generic import ListView

class MyListView(LoginRequiredMixin,ListView):
def get_queryset(self):
self.request.user.extra_info #  'User' object has no attribute 
'extra_info'
...

Thank you for any suggestion. 

-- 
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/7ba8b3e3-5548-4d34-b907-7a915357058d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Editing forms in django

2013-10-18 Thread Sandeep kaur
On Fri, Oct 18, 2013 at 1:09 PM, amanjot kaur  wrote:
> What should I need to do in django, if I want to edit the information
> filled in django, like we edit our profile in facebook after filling
> once?

That means editing the already saved data?

Assuming you are using a ModelForm, use the instance keyword argument,
and pass the model you are updating.

So, if you have MyModel and MyModelForm, then your code might look like:

my_record = MyModel.objects.get(id=XXX)
form = MyModelForm(instance=my_record)

And then, when the user sends back data by POST:

form = MyModelForm(request.POST, instance=my_record)

Documentation is here:
http://docs.djangoproject.com/en/1.3/topics/forms/modelforms/


-- 
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com

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


Re: django sample (without admin site)

2013-10-18 Thread Thomas Lockhart

On 10/18/13 10:04 AM, Sanjaya Vitharana wrote:

Hi,

I am newbie to django looking for a simple sample.
I'd suggest picking up a package built on top of Django. Maybe Mezzanine 
(I've enjoyed working with that). But there are several which will get 
you going quickly.


hth

   - Tom


What I need:
1.) simple template may be with 2-4 fields/text boxes with "save" button.

What it should do:
Just save the data in the text boxes to a database when i press the 
"save" button.


2.) may be another template with button "Show DB" to list all the data 
in the DB.


3.) This should NOT use django admin site which covered in the 
tutorial. (I hate that)


4.) What should cover in the sample:
just
* Template
* Form
* View
* Model
functionality work together to save and retrieve the data from 
database and display it.


4.) May be 1-2 page documentation/tutorial might help.

If someone knows please point me. (I DON"T think big books or 1 months 
reading tutorials will help me. Looking for a shorter one)


Thanks in advance.

Sanjaya Vitharana

--
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/82221f34-9467-4b8d-9e63-8fca37c172be%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/5261800A.4080306%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Data attribute (aka instant variable) added to the current logged-in user through user_logged_in signal cannot be retrieve later.

2013-10-18 Thread Khanh Tran
I am using out of the box django 1.5 authentication solution. After user is 
logged in, i use build-in user_logged_in signal from 
django.contrib.auth.signals to add a piece of information to the logged in 
user as follow:

from django.contrib.auth.signals import user_logged_in
from django.dispatch import receiver

@receiver(user_logged_in)
def add_extra_info_to_logged_in_user(sender,user,request,**kwargs):
user.extra_info = 'extra info'
print user.extra_info # I confirmed that the assignment is executed



However, i can not retrieve user.extra_info from request object as follow:

from braces.views import LoginRequiredMixin
from django.views.generic import ListView

class MyListView(LoginRequiredMixin,ListView):
def get_queryset(self):
self.request.user.extra_info #  'User' object has no attribute 
'extra_info'
...


-- 
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/a2562cc3-c8b0-4cb4-8dac-1a6b0a4215e2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How to handle values_list?

2013-10-18 Thread Andrew Michael
Thanks to Leonardo, Daniel and Charly this issue is resolved! Each of your
comments helped me.

I changed my views.py file filter statement:

FROM: name = Name.objects.filter(pk=my_**number).values_list('city',
flat=True)

TO: name = Name.objects.get(pk=number).name

And in my template I have the same code:

{{ name|safe }}

And now Green shows on my web page instead of [u'Green']!



On Fri, Oct 18, 2013 at 2:39 AM, Leonardo Giordani <
giordani.leona...@gmail.com> wrote:

> Andrew, I think that the view is missing something:
>
>
> def enter_name(request):
>
> my_number = request.user.number
>
> name = Name.objects.filter(pk=my_number).values_list('city', flat=T
> rue)
>
> *data = {...}
> *
>
> *return render_to_response('template.html', data,
> context_instance=RequestContext(request))*
>
>
> where data is a dictionary with the values you want to be available in
> your template. So, for the template you posted, you could write
>
>
> data = {'name':name[0]}
>
>
> Here, you need to decide what you need to pass: why do you use filter()
> instead of get()? Do you need just one value or multiple?
>
> If you need to pass a list to the template just fill the dictionary
> accordingly, but follow Daniel's advice when rendering the list in the
> template.
>
>
> Regards,
>
>
> Leo
>
>
>
> Leonardo Giordani
> Author of The Digital Cat 
> My profile on About.me  - My GitHub
> page  - My Coderwall 
> profile
>
>
> 2013/10/17 Charly Román 
>
>> Have you tried used get instead filter?
>>
>> 2013/10/17 Daniel Roseman :
>> > On Thursday, 17 October 2013 19:30:09 UTC+1, Andrew Michael wrote:
>> >>
>> >> Hi,
>> >>
>> >> I am new to Django and need some help. My issue is on my web page the
>> data
>> >> is showing up like this: [u'Green'] and I want it to only show Green -
>> >> without the unicode wrapping. Can you please explain why this is
>> happening
>> >> and how do I fix it?
>> >>
>> >> Here is my code.
>> >>
>> >> models.py:
>> >>
>> >> Class Name(models.Model):
>> >>
>> >> name = models.CharField(_('name'), max_length=100)
>> >>
>> >> number = models.ForeignKey(Number)
>> >>
>> >> views.py:
>> >>
>> >> def enter_name(request):
>> >>
>> >> my_number = request.user.number
>> >>
>> >> name = Name.objects.filter(pk=my_number).values_list('city',
>> >> flat=True)
>> >>
>> >> template.html:
>> >>
>> >> {{ name|safe }}
>> >>
>> >>
>> >>
>> >> Prints on the web page:
>> >>
>> >> [u’Green’]
>> >
>> >
>> > This nothing to do with Unicode. `name` is a *list*. So you have to
>> iterate
>> > over it:
>> >
>> > {% for name in names %}
>> > {{ name }}
>> > {% endfor %}
>> > --
>> > DR.
>> >
>> > --
>> > 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/f1d664fc-4a67-4d1f-8df5-76fda1bbef20%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/CABeWMUbaxazs1Sh0GMLhJVSXGcieUsTBhz2AgbWrhWD%2BBwru%3DQ%40mail.gmail.com
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/A3kEL3CDydM/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CAEhE%2BOnHyuRMaoC8sKSs1wO6WiYZ8gzw1Y4AMGfJf_OwxTOE1w%40mail.gmail.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.

django sample (without admin site)

2013-10-18 Thread Sanjaya Vitharana
Hi,

I am newbie to django looking for a simple sample.

What I need:
1.) simple template may be with 2-4 fields/text boxes with "save" button.

What it should do:
Just save the data in the text boxes to a database when i press the "save" 
button.

2.) may be another template with button "Show DB" to list all the data in 
the DB.

3.) This should NOT use django admin site which covered in the tutorial. (I 
hate that)

4.) What should cover in the sample:
just
* Template
* Form
* View
* Model
functionality work together to save and retrieve the data from database and 
display it.

4.) May be 1-2 page documentation/tutorial might help.

If someone knows please point me. (I DON"T think big books or 1 months 
reading tutorials will help me. Looking for a shorter one)

Thanks in advance.

Sanjaya Vitharana

-- 
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/82221f34-9467-4b8d-9e63-8fca37c172be%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: PostgreSQL OperationalError

2013-10-18 Thread Muhammed TÜFEKYAPAN
I restart and problem solved.

Thanks everbody.

Best.

On Friday, October 18, 2013 11:28:45 AM UTC+3, Muhammed TÜFEKYAPAN wrote:
>
> Hello,
>
>
> I just start to publish my app on web. Everything going well but I face a 
> new problem, before I never face. Site working but sometimes raise error 
> like this;
>
> OperationalError at / 
>
> fe_sendauth: no password supplied
>
>
>
> Full error looks like this;
>
> OperationalError at / 
>
> fe_sendauth: no password supplied
>
>  Request Method: GET  Request URL: http://www.domain.co/  Django Version: 
> 1.5.1  Exception Type: OperationalError  Exception Value: 
>
> fe_sendauth: no password supplied
>
>  Exception Location: /var/www/
> www.domain.co/env/local/lib/python2.7/site-packages/psycopg2/__init__.pyin 
> connect, line 164  Python 
> Executable: /var/www/www.domain.co/env/bin/python  Python Version: 2.7.3  
> Python 
> Path: 
>
> ['/var/www/www.domain.co/dictionaryproject',
>  '/var/www/www.domain.co/env/bin',
>  '/var/www/www.domain.co/env/lib/python2.7',
>  '/var/www/www.domain.co/env/lib/python2.7/plat-linux2',
>  '/var/www/www.domain.co/env/lib/python2.7/lib-tk',
>  '/var/www/www.domain.co/env/lib/python2.7/lib-old',
>  '/var/www/www.domain.co/env/lib/python2.7/lib-dynload',
>  '/usr/lib/python2.7',
>  '/usr/lib/python2.7/plat-linux2',
>  '/usr/lib/python2.7/lib-tk',
>  '/var/www/www.domain.co/env/local/lib/python2.7/site-packages']
>
>  Server time: Fri, 18 Oct 2013 03:26:32 -0500
>
>
> What is the problem and how can I solve it?
>
>
> Best.
>
>

-- 
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/f6b14a90-6ab7-4bbf-a85b-670cbc8ef6c3%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


BinaryField on Django 1.6b4

2013-10-18 Thread Elton Pereira
I created a new project with a class with two fields, one type CharField 
and another type BinaryField. When I access the admin, only the field name 
appears.

My class:

class Arquivo(models.Model):
nome = models.CharField(max_length=255)
arquivo = models.BinaryField()

def __unicode__(self):
return self.nome


Sorry if my english is not good.

-- 
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/67aac277-c2c3-49ef-b3af-3380866a9d33%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: PostgreSQL OperationalError

2013-10-18 Thread Xavier Ordoquy
If you are using anything other than the devserver, you'll need to reload / 
restart your service in order for your changes to take effects.
Django/webservers differ a couple of things until a request comes. This means 
that if you changed the settings after a first request you may have a some 
threads that don't have correct settings and some that do.

Regards,
Xavier,
Linovia.

Le 18 oct. 2013 à 11:38, Muhammed TÜFEKYAPAN  a écrit :

> Thanks for answer. But if my login and pass didn't match, it always raise 
> error. It just sometimes raise error, sometimes doesn't. 
> 
> 
> 2013/10/18 Xavier Ordoquy 
> Hello,
> 
> Your DATABASES settings aren't correct.
> fe_sendauth is about Postgresql complaining the login/password didn't match.
> 
> Regards,
> Xavier,
> Linovia.
> 
> Le 18 oct. 2013 à 10:28, Muhammed TÜFEKYAPAN  a écrit :
> 
>> Hello,
>> 
>> 
>> I just start to publish my app on web. Everything going well but I face a 
>> new problem, before I never face. Site working but sometimes raise error 
>> like this;
>> 
>> OperationalError at /
>> 
>> fe_sendauth: no password supplied
>> 
>> 
>> 
>> Full error looks like this;
>> 
>> OperationalError at /
>> 
>> fe_sendauth: no password supplied
>> Request Method:  GET
>> Request URL: http://www.domain.co/
>> Django Version:  1.5.1
>> Exception Type:  OperationalError
>> Exception Value: 
>> fe_sendauth: no password supplied
>> Exception Location:  
>> /var/www/www.domain.co/env/local/lib/python2.7/site-packages/psycopg2/__init__.py
>>  in connect, line 164
>> Python Executable:   /var/www/www.domain.co/env/bin/python
>> Python Version:  2.7.3
>> Python Path: 
>> ['/var/www/www.domain.co/dictionaryproject',
>>  '/var/www/www.domain.co/env/bin',
>>  '/var/www/www.domain.co/env/lib/python2.7',
>>  '/var/www/www.domain.co/env/lib/python2.7/plat-linux2',
>>  '/var/www/www.domain.co/env/lib/python2.7/lib-tk',
>>  '/var/www/www.domain.co/env/lib/python2.7/lib-old',
>>  '/var/www/www.domain.co/env/lib/python2.7/lib-dynload',
>>  '/usr/lib/python2.7',
>>  '/usr/lib/python2.7/plat-linux2',
>>  '/usr/lib/python2.7/lib-tk',
>>  '/var/www/www.domain.co/env/local/lib/python2.7/site-packages']
>> Server time: Fri, 18 Oct 2013 03:26:32 -0500
>> 
>> 
>> What is the problem and how can I solve it?
>> 
>> 
>> Best.
>> 
>> 
>> -- 
>> 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/108c39f7-dc12-435f-8eb0-77a761708aa7%40googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "Django users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/django-users/oM0ayk0Mw0U/unsubscribe.
> To unsubscribe from this group and all its topics, 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/25F0DFE7-2D50-48D2-A9C3-23F2872CFE85%40linovia.com.
> 
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> 
> -- 
> Muhammed Tüfekyapan
> İTÜ - Tekstil Müh.
> 532 172 70 66
> 
> -- 
> 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%2BMQMxUNZEHaoWz-aPR_ODKyr92wHefdM0SddHC6yPxf7%3D8rFg%40mail.gmail.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/E4E445DD-20F6-44EE-A876-EE7939D39CE3%40linovia.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: PostgreSQL OperationalError

2013-10-18 Thread Muhammed TÜFEKYAPAN
Thanks for answer. But if my login and pass didn't match, it always raise
error. It just sometimes raise error, sometimes doesn't.


2013/10/18 Xavier Ordoquy 

> Hello,
>
> Your DATABASES settings aren't correct.
> fe_sendauth is about Postgresql complaining the login/password didn't
> match.
>
> Regards,
> Xavier,
> Linovia.
>
> Le 18 oct. 2013 à 10:28, Muhammed TÜFEKYAPAN  a
> écrit :
>
> Hello,
>
>
> I just start to publish my app on web. Everything going well but I face a
> new problem, before I never face. Site working but sometimes raise error
> like this;
>
> OperationalError at /
>
> fe_sendauth: no password supplied
>
>
>
> Full error looks like this;
>
> OperationalError at /
>
> fe_sendauth: no password supplied
>
>  Request Method: GET  Request URL: http://www.domain.co/  Django Version:
> 1.5.1  Exception Type: OperationalError  Exception Value:
>
> fe_sendauth: no password supplied
>
>  Exception Location: /var/www/
> www.domain.co/env/local/lib/python2.7/site-packages/psycopg2/__init__.pyin 
> connect, line 164  Python
> Executable: /var/www/www.domain.co/env/bin/python  Python Version: 2.7.3  
> Python
> Path:
>
> ['/var/www/www.domain.co/dictionaryproject',
>  '/var/www/www.domain.co/env/bin',
>  '/var/www/www.domain.co/env/lib/python2.7',
>  '/var/www/www.domain.co/env/lib/python2.7/plat-linux2',
>  '/var/www/www.domain.co/env/lib/python2.7/lib-tk',
>  '/var/www/www.domain.co/env/lib/python2.7/lib-old',
>  '/var/www/www.domain.co/env/lib/python2.7/lib-dynload',
>  '/usr/lib/python2.7',
>  '/usr/lib/python2.7/plat-linux2',
>  '/usr/lib/python2.7/lib-tk',
>  '/var/www/www.domain.co/env/local/lib/python2.7/site-packages'] 
> 
>
>  Server time: Fri, 18 Oct 2013 03:26:32 -0500
>
>
> What is the problem and how can I solve it?
>
>
> Best.
>
>
> --
> 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/108c39f7-dc12-435f-8eb0-77a761708aa7%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/oM0ayk0Mw0U/unsubscribe.
> To unsubscribe from this group and all its topics, 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/25F0DFE7-2D50-48D2-A9C3-23F2872CFE85%40linovia.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
*Muhammed Tüfekyapan
*
*İTÜ - Tekstil Müh.*
*532 172 70 66*

-- 
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%2BMQMxUNZEHaoWz-aPR_ODKyr92wHefdM0SddHC6yPxf7%3D8rFg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: PostgreSQL OperationalError

2013-10-18 Thread Xavier Ordoquy
Hello,

Your DATABASES settings aren't correct.
fe_sendauth is about Postgresql complaining the login/password didn't match.

Regards,
Xavier,
Linovia.

Le 18 oct. 2013 à 10:28, Muhammed TÜFEKYAPAN  a écrit :

> Hello,
> 
> 
> I just start to publish my app on web. Everything going well but I face a new 
> problem, before I never face. Site working but sometimes raise error like 
> this;
> 
> OperationalError at /
> 
> fe_sendauth: no password supplied
> 
> 
> 
> Full error looks like this;
> 
> OperationalError at /
> 
> fe_sendauth: no password supplied
> Request Method:   GET
> Request URL:  http://www.domain.co/
> Django Version:   1.5.1
> Exception Type:   OperationalError
> Exception Value:  
> fe_sendauth: no password supplied
> Exception Location:   
> /var/www/www.domain.co/env/local/lib/python2.7/site-packages/psycopg2/__init__.py
>  in connect, line 164
> Python Executable:/var/www/www.domain.co/env/bin/python
> Python Version:   2.7.3
> Python Path:  
> ['/var/www/www.domain.co/dictionaryproject',
>  '/var/www/www.domain.co/env/bin',
>  '/var/www/www.domain.co/env/lib/python2.7',
>  '/var/www/www.domain.co/env/lib/python2.7/plat-linux2',
>  '/var/www/www.domain.co/env/lib/python2.7/lib-tk',
>  '/var/www/www.domain.co/env/lib/python2.7/lib-old',
>  '/var/www/www.domain.co/env/lib/python2.7/lib-dynload',
>  '/usr/lib/python2.7',
>  '/usr/lib/python2.7/plat-linux2',
>  '/usr/lib/python2.7/lib-tk',
>  '/var/www/www.domain.co/env/local/lib/python2.7/site-packages']
> Server time:  Fri, 18 Oct 2013 03:26:32 -0500
> 
> 
> What is the problem and how can I solve it?
> 
> 
> Best.
> 
> 
> -- 
> 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/108c39f7-dc12-435f-8eb0-77a761708aa7%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/25F0DFE7-2D50-48D2-A9C3-23F2872CFE85%40linovia.com.
For more options, visit https://groups.google.com/groups/opt_out.


PostgreSQL OperationalError

2013-10-18 Thread Muhammed TÜFEKYAPAN
Hello,


I just start to publish my app on web. Everything going well but I face a 
new problem, before I never face. Site working but sometimes raise error 
like this;

OperationalError at / 

fe_sendauth: no password supplied



Full error looks like this;

OperationalError at / 

fe_sendauth: no password supplied

 Request Method: GET  Request URL: http://www.domain.co/  Django Version: 
1.5.1  Exception Type: OperationalError  Exception Value: 

fe_sendauth: no password supplied

 Exception Location: 
/var/www/www.domain.co/env/local/lib/python2.7/site-packages/psycopg2/__init__.py
 
in connect, line 164  Python Executable: 
/var/www/www.domain.co/env/bin/python  Python Version: 2.7.3  Python Path: 

['/var/www/www.domain.co/dictionaryproject',
 '/var/www/www.domain.co/env/bin',
 '/var/www/www.domain.co/env/lib/python2.7',
 '/var/www/www.domain.co/env/lib/python2.7/plat-linux2',
 '/var/www/www.domain.co/env/lib/python2.7/lib-tk',
 '/var/www/www.domain.co/env/lib/python2.7/lib-old',
 '/var/www/www.domain.co/env/lib/python2.7/lib-dynload',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-linux2',
 '/usr/lib/python2.7/lib-tk',
 '/var/www/www.domain.co/env/local/lib/python2.7/site-packages']

 Server time: Fri, 18 Oct 2013 03:26:32 -0500


What is the problem and how can I solve it?


Best.

-- 
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/108c39f7-dc12-435f-8eb0-77a761708aa7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Editing forms in django

2013-10-18 Thread amanjot kaur
What should I need to do in django, if I want to edit the information
filled in django, like we edit our profile in facebook after filling
once?
-- 
Amanjot Kaur

Blog: kauramanjot35.wordpress.com

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