Re: migrations to custom user model - complex project

2014-01-27 Thread Frank Bieniek
Thanks Arnold, for the details. Am 25.01.14 21:22, schrieb Arnold Krille: We did something similar, we switched from djangos own user model + our profile to just using our profile extended by email and password (no username anymore and no openid (yet)). What you need to do depends on whether yo

time problem in django 1.6

2014-01-27 Thread Hossain Aboutalebi
I am one of the new user in django 1.6 but one thing very bad I have noticed in this version of django is that time.strftime("%H:%M:%S") does not working and giving a wrong time in my view . Is there any alternating approach for getting a right time in django view or not ? Note : if you type pr

I nedd help - first Django app, part 2 - Admin - Adding related objects

2014-01-27 Thread Rafał Szymański
Hello everybody. I'm Rafał. I just started learnig and I'd like to ask You for little help. I'm in the part 2 of tutorial - admin, Adding related objects. I have no three slots for related Choices. Here is my code. Thanks in advance for any help. from django.contrib import admin from polls.models

Re: I nedd help - first Django app, part 2 - Admin - Adding related objects

2014-01-27 Thread Ramiro Morales
On Mon, Jan 27, 2014 at 7:54 AM, Rafał Szymański wrote: > Hello everybody. > I'm Rafał. I just started learnig and I'd like to ask You for little help. > I'm in the part 2 of tutorial - admin, Adding related objects. > I have no three slots for related Choices. > Here is my code. > [snip] > class

Re: time problem in django 1.6

2014-01-27 Thread Tom Lockhart
I am not using 1.6 yet. However, you will likely get the best help if you can describe more exactly your symptoms. What does "giving a wrong time" actually look like? Are the fields scrambled? Is there a time offset to the result? Or something else?? Please be specific on what you are finding an

Problem installing Django on AWS EC2 Ubuntu 12.04

2014-01-27 Thread Feyzi Bagirov
I used these instructions http://nickpolet.com/blog/1/ to install Django on AWS EC2 t1.micro instance. It went well until I restarted apache and was supposed to see the initial Django page at the Public DNS address: "Now if you view the servers Public DNS in your browser you should see the d

Re: I nedd help - first Django app, part 2 - Admin - Adding related objects

2014-01-27 Thread Rafał Szymański
as usual... Thank you Ramiro for your effort W dniu poniedziałek, 27 stycznia 2014 14:14:14 UTC+1 użytkownik Ramiro Morales napisał: > > On Mon, Jan 27, 2014 at 7:54 AM, Rafał Szymański > > > wrote: > > Hello everybody. > > I'm Rafał. I just started learnig and I'd like to ask You for little

can't compare datetime.datetime to datetime.date

2014-01-27 Thread Rafał Szymański
Hi again I wolud like ask another question. If someone would be so kind and help that will be great. I'm in the begining of django tutorial. I use python3.3 and django1.6 I get error: can't compare datetime.datetime to datetime.date Here is my code: import datetime from django.utils import tim

Re: Problems Setting Up wsgi and Apache

2014-01-27 Thread Mark Phillips
Fred, Thanks for your help. I made some progress so far. 1. I discovered that I fogot to add the port 7000 to Apache´s ports.conf. 2. The Apache error logs were in /var/log/apache2/error.log and not in /var/log/apache2/mom/error.log. APACHE_LOG_DIR was not set. 2. Once I found the error logs, I

Re: Problem installing Django on AWS EC2 Ubuntu 12.04

2014-01-27 Thread Avraham Serour
what do you see then? On Mon, Jan 27, 2014 at 3:27 PM, Feyzi Bagirov wrote: > I used these instructions http://nickpolet.com/blog/1/ to install Django > on AWS EC2 t1.micro instance. > > It went well until I restarted apache and was supposed to see the initial > Django page at the Public DNS a

Re: Problems Setting Up wsgi and Apache

2014-01-27 Thread Timothy W. Cook
Mark, I don't know if this will help. But I found (on CentOS) I had to add the 'apache' user to the django users group. Not that it should matter, but it seemed to. This seemed to be easier to add group rw permissions to the django app directory. HTH, Tim On Mon, Jan 27, 2014 at 2:01 PM, Mar

Re: Problem installing Django on AWS EC2 Ubuntu 12.04

2014-01-27 Thread Feyzi Bagirov
Actually, I just fixed it - I didn't grant access to port 80 in the security group. Now it works! Before, I saw "Page not found". Thanks! On Mon, Jan 27, 2014 at 6:48 PM, Avraham Serour wrote: > what do you see then? > > > On Mon, Jan 27, 2014 at 3:27 PM, Feyzi Bagirov wrote: > >> I used these

failure of auto increment in inndb (mysql)

2014-01-27 Thread Malik Rumi
I read this on the django project site: > > Since MySQL 5.5.5, the default storage engine is > InnoDB. > This engine is fully transactional and supports foreign key references. > It’s probably the best choice at this point. Howe

Re: Problems Setting Up wsgi and Apache

2014-01-27 Thread Mark Phillips
Tim, I actually tried a symbolic link from my user account /home/django/django_app to /var/www/mom/myapp and apache is now reading the files and I have moved beyond the Forbidden error. However, I now get an internal server error (which is an improvement!!). Apache is reading the wsgi.py file, bu

Re: can't compare datetime.datetime to datetime.date

2014-01-27 Thread ian
You're comparing pub_date, which is a datetime.date, to timezone.now(), which is a datetime.datetime. Check the docs at http://docs.python.org/2/library/datetime.html for more. In order to convert timezone.now() to a date, just call timezone.now().date(), like: In [1]: from django.utils import

Re: Problems Setting Up wsgi and Apache

2014-01-27 Thread Timothy W. Cook
On Mon, Jan 27, 2014 at 2:22 PM, Mark Phillips wrote: > > I have this at the top of the apache conf file for the site - > WSGIPythonPath > /home/django/.virtualenvs/inventory_project/lib/python2.7/site-packages/ > > which is the correct path to the site packages directory. Perhaps another > permis

Re: Problems Setting Up wsgi and Apache

2014-01-27 Thread Fred Stluka
Mark, Most likely your Apache server is running as user "apache" in group "apache", and your Django code is being called by the Apache server via WSGI, so it is also running as user "apache". True? If so, make sure that the files and directories needed by the Apache and Django code are all acce

Re: failure of auto increment in inndb (mysql)

2014-01-27 Thread Erik Cederstrand
Den 27/01/2014 kl. 17.22 skrev Malik Rumi : > I read this on the django project site: > Since MySQL 5.5.5, the default storage engine is InnoDB. This engine is fully > transactional and supports foreign key references. It's probably the best > choice at this point. However, note that the the In

Re: failure of auto increment in inndb (mysql)

2014-01-27 Thread Tom Lockhart
> ... > Now Jane Smith has the same ID as John Doe had previously. This may not be a > problem in your situation, or it might. Anyway it's good practice to never > re-purpose an ID. MySQL started as a non-ACID query server (not a full relational database in the accepted sense) and these kinds o

Re: failure of auto increment in inndb (mysql)

2014-01-27 Thread Javier Guerra Giraldez
On Mon, Jan 27, 2014 at 2:13 PM, Tom Lockhart wrote: > MySQL started as a non-ACID query server (not a full relational database in > the accepted sense) and these kinds of issues likely stem from that history. > Folks getting started with databases and django may want to consider using > Postgr

Re: failure of auto increment in inndb (mysql)

2014-01-27 Thread Erik Cederstrand
Den 27/01/2014 kl. 20.13 skrev Tom Lockhart : >> ... >> Now Jane Smith has the same ID as John Doe had previously. This may not be a >> problem in your situation, or it might. Anyway it's good practice to never >> re-purpose an ID. > > MySQL started as a non-ACID query server (not a full relati

Dyanmically changing Django Storage?

2014-01-27 Thread zweb
I am planning to use django-storages. It uses django settings, as DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' I read it is bad practice to change django settings during runtime. I am not using Django's FileField. During run time, based on file size and type, I want to use

Re: Dyanmically changing Django Storage?

2014-01-27 Thread Javier Guerra Giraldez
On Mon, Jan 27, 2014 at 3:07 PM, zweb wrote: > During run time, based on file size and type, I want to use a different > storage backend. How to do it? write a storage backend proxy that picks which 'real' backend to use for each file. note that during upload, you have to start storing before

Do you think Django's future is threatened by JS frameworks in both client & server?

2014-01-27 Thread damondeville
Hi, I would like to know if this community is somewhat worried about the future relevance of Django (and other purely server-side MV* Python web app frameworks such as web2py for that matter) given the current momentum of JavaScript (JS) everywhere? There are many competing architecture patter

Re: Do you think Django's future is threatened by JS frameworks in both client & server?

2014-01-27 Thread Tim Chase
On 2014-01-27 14:44, damondevi...@gmail.com wrote: > Why then adopt Django (or web2py) for a new project today, instead > of going pure JS? > > I am a big Python fan in terms of design and principles, If you like JS as a language, then it makes sense to do everything in JS. However, I prefer Pyt

Re: Problems Setting Up wsgi and Apache

2014-01-27 Thread Mark Phillips
Fred, My apologies if my comment about "or" and "nor" offended you. That was not my intent. Thanks, Mark On Mon, Jan 27, 2014 at 9:49 AM, Fred Stluka wrote: > Mark, > > Most likely your Apache server is running as user "apache" in > group "apache", and your Django code is being called by th

Need help with pushing technology ... and a bit more ...

2014-01-27 Thread Mario R. Osorio
Background: === We are studying the possibility of creating a system that will have the following entities: Customer(s) (appCustomer) Service Provider(s) (appProviders) and Manager(s) Server(s) appCustomers will have all appServices available to them and appServices will have at least on

Re: Do you think Django's future is threatened by JS frameworks in both client & server?

2014-01-27 Thread Brad Moore
The tech giants are pushing JavaScript more than Python these days. JavaScript is said to be the future language for enterprise applications. I think Python will be around but will play a third place role behind JavaScript and PHP. Yes, I said PHP and I apologize but its true just look at the

Need Help Moving Database to production server

2014-01-27 Thread Mark Phillips
I have a django project running on my laptop. I have (finally) managed to get it to work with apache on a production server. However, I still have a problem. When I access the admin site and login as the superuser, I get "you don't have permission to do anything" message. To migrate the database,

Re: Need Help Moving Database to production server

2014-01-27 Thread Mike Dewhirst
On 28/01/2014 4:51pm, Mark Phillips wrote: I have a django project running on my laptop. I have (finally) managed to get it to work with apache on a production server. However, I still have a problem. When I access the admin site and login as the superuser, I get "you don't have permission to do

Re: Do you think Django's future is threatened by JS frameworks in both client & server?

2014-01-27 Thread Avraham Serour
you will eventually need to keep a couple of different codebases in some different languges. Say you get popular enough and now you need to launch a desktop app, android and iphone. Take dropbox for example, they have a web version, desktop, android and iphone (did I miss any platform?) For desktop

Re: Do you think Django's future is threatened by JS frameworks in both client & server?

2014-01-27 Thread Chris Hinds
Coffeescript.org makes some of those things better, but it's no Python. C. > On 27 Jan 2014, at 23:57, "Tim Chase" wrote: > >> On 2014-01-27 14:44, damondevi...@gmail.com wrote: >> Why then adopt Django (or web2py) for a new project today, instead >> of going pure JS? >> >> I am a big Python

Re: Dyanmically changing Django Storage?

2014-01-27 Thread Avraham Serour
you can define the storage for each FileField when declaring your model, it will use the default unless you specify something else. Does your use case have the same model using different storages? I suggest you make different models, each using the storage you want, Lets say you have two models, S3

Re: Need help with pushing technology ... and a bit more ...

2014-01-27 Thread Avraham Serour
> Isn't there a better way to push notifications? Better than what? > Do I forcibly have to use a service... no, but it will make your life easier > Would it be possible to build our own push service ... yes, why not I suggest not making your life too complicated, make the system as simple as poss