Re: tree.io installation with django

2012-09-16 Thread Fabian Weiss
I would like to do, but my Debian Distribution just offers 1.4! Maybe I can 
install another one, but than I probably get Version missmatch.. :/

Am Samstag, 15. September 2012 23:32:06 UTC+2 schrieb Nick Apostolakis:
>
>
>
> On Sat, Sep 15, 2012 at 11:41 PM, Fabian Weiss 
> 
> > wrote:
>
>> I do so! I tried now this one: 
>> http://blog.stannard.net.au/2010/12/11/installing-django-with-apache-and-mod_wsgi-on-ubuntu-10-04/
>> And it works! :) 
>> http://project.immersight.de/
>>
>> I tried again all I could find in the net for treeio, but nothing works :(
>> How can I totally remove all my steps? Is it just to delete the 
>> directories? Or is there something to do in a database?
>>
>> Maybe I have a version of django which is too new? It is 1.4.1
>>
>> http://nopaste.immersight.de/?34b6a29be67dd853#dvMCsmIWwYZUWV2qKMFxGLMI4pq+O3PiPy2iHAp3ZzQ=
>>
>>
>>
> Why don't you use django 1.3 as it is described in the requirements file?
> Thats a simple way to see if you problems stem from django version 
> incompatibility
>
> -- 
> ---
> Nick Apostolakis
> email:n...@oncrete.gr 
> Web Site: http://nick.oncrete.gr
> ---
>  

-- 
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/-/OhxNk25kIIkJ.
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, how to automatically sort the database's entries when I add an entry?

2012-09-16 Thread Daniel Roseman
On Sunday, 16 September 2012 00:00:09 UTC+1, Nicolas Dubien wrote:
>
> Hi,
>
> I'm using a quite huge database with twenty thousand entries or more. At 
> the beginning, I used to sort it each time (.sort_by("my_field_name")) I 
> need the page but I saw that it took me lot of time to generate the page.
>
> I'm looking for a solution, that allows me to show the data without 
> sorting it each time I want to see it. For a instance, sorting the database 
> each time I add an entry or each time I add several entries could be a 
> solution.
> Is it possible to keep the database sorted by a field without changing the 
> pk?
>
> I tried the class Meta with the argument ordering but it didn't work (even 
> if I flush the db).
>
> Yours,
> -DubZzz
>
>
Twenty thousand entries is not a "huge" database by any standards. Any db 
engine should be able to cope easily with many many times that. And 
databases are good at sorting, as long as you set them up properly.

I suspect you simply don't have an index defined for the column you're 
ordering on, so the db is having to manually sort each time. Usually you 
would define an index when creating the model, by setting db_index=True in 
the field options - if you add that, drop the table and re-run syncdb it 
should create it properly. If you need to preserve the existing data, 
you'll need to go into the db shell and run a CREATE INDEX manually - but 
again if you add the db_index flag and run `./manage.py sqlindexes 
my_app_name` Django will print out the SQL to run in the shell (it *won't* 
run it for you, you'll still need to put that command into the db shell).
--
DR.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/KTuANxnbRdwJ.
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.contrib.markup deprecated in 1.5 - what's the alternative?

2012-09-16 Thread Phil Gyford
Thanks for the pointer Jirka - I hadn't managed to find that ticket.
Makes sense and, like you, I only have a few trusted users entering
text that will be filtered.

On 15 September 2012 19:37, Jirka Vejrazka  wrote:
> Hi Phil,
>
>   incidentally, I was looking at this just recently. The
> contrib.markup was deprecated mainly due to security issues with 3rd
> party libraries that could not be fixed in Django itself and were
> compromising its security. For more, read
> https://code.djangoproject.com/ticket/18054
>
>   Can't tell you what the replacement is. I rolled up my own markup
> filter, but I only have a handful of trusted users for my web app so I
> don't have to be too concerned with trusting their inputs.
>
>   You can copy the markup filter from 1.4 - just be aware of the
> security consequences.
>
>   HTH
>
> Jirka
>
> --
> 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.
>



-- 
http://www.gyford.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: tree.io installation with django

2012-09-16 Thread Nick Apostolakis

On 16/09/2012 12:01 μμ, Fabian Weiss wrote:

I would like to do, but my Debian Distribution just offers 1.4! Maybe I can
install another one, but than I probably get Version missmatch.. :/
   


You could install any version you like through the use of pip an virtual env
Check it out. Its quite simple and it is a very valuable technique


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



Re: admin problem

2012-09-16 Thread Nevio Vesic
https://docs.djangoproject.com/en/dev/ref/models/instances/?from=olddocs#django.db.models.Model.__unicode__

On Sunday, September 16, 2012 2:52:43 PM UTC+2, Harjot Mann wrote:
>
>  hello everyone 
>  I have made a project in django on student dmc records
> as there are many students whose data is to be added
> i have made 2 classes in models named student_info and certificate and 
> used a foreignkey in crtificate class as:
> student_info = models.ForeignKey(Student_info)
> and Roll Number is a primary key which is a field of student_inso class. 
> But when i added data in admin under certificate as shown in fig.
> At student info option, when i add data.its giving student_info 
> object..and it becomes difficult to know which students data is to be 
> added now.
> I want to know is there any method by which i can use roll numbers instead 
> of student_info object becoz its difficult to recognize if there will largw 
> number of syudents.
> pls help me as sson as possible.  i have a presentation on this project. 
> thnks in advance
>

-- 
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/-/0PWPaTAEcWYJ.
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: admin problem

2012-09-16 Thread Harjot Mann
how an i use it??/


On Sun, Sep 16, 2012 at 6:25 PM, Nevio Vesic  wrote:

>
> https://docs.djangoproject.com/en/dev/ref/models/instances/?from=olddocs#django.db.models.Model.__unicode__
>
>
> On Sunday, September 16, 2012 2:52:43 PM UTC+2, Harjot Mann wrote:
>>
>>  hello everyone
>>  I have made a project in django on student dmc records
>> as there are many students whose data is to be added
>> i have made 2 classes in models named student_info and certificate and
>> used a foreignkey in crtificate class as:
>> student_info = models.ForeignKey(Student_**info)
>> and Roll Number is a primary key which is a field of student_inso class.
>> But when i added data in admin under certificate as shown in fig.
>> At student info option, when i add data.its giving student_info
>> object..and it becomes difficult to know which students data is to be
>> added now.
>> I want to know is there any method by which i can use roll numbers
>> instead of student_info object becoz its difficult to recognize if there
>> will largw number of syudents.
>> pls help me as sson as possible.  i have a presentation on this project.
>> thnks in advance
>>
>  --
> 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/-/0PWPaTAEcWYJ.
>
> 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: admin problem

2012-09-16 Thread Harjot Mann
done with it thnkuu sooo much

On Sun, Sep 16, 2012 at 6:27 PM, Harjot Mann wrote:

> how an i use it??/
>
>
>
> On Sun, Sep 16, 2012 at 6:25 PM, Nevio Vesic wrote:
>
>>
>> https://docs.djangoproject.com/en/dev/ref/models/instances/?from=olddocs#django.db.models.Model.__unicode__
>>
>>
>> On Sunday, September 16, 2012 2:52:43 PM UTC+2, Harjot Mann wrote:
>>>
>>>  hello everyone
>>>  I have made a project in django on student dmc records
>>> as there are many students whose data is to be added
>>> i have made 2 classes in models named student_info and certificate and
>>> used a foreignkey in crtificate class as:
>>> student_info = models.ForeignKey(Student_**info)
>>> and Roll Number is a primary key which is a field of student_inso class.
>>> But when i added data in admin under certificate as shown in fig.
>>> At student info option, when i add data.its giving student_info
>>> object..and it becomes difficult to know which students data is to be
>>> added now.
>>> I want to know is there any method by which i can use roll numbers
>>> instead of student_info object becoz its difficult to recognize if there
>>> will largw number of syudents.
>>> pls help me as sson as possible.  i have a presentation on this project.
>>> thnks in advance
>>>
>>  --
>> 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/-/0PWPaTAEcWYJ.
>>
>> 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.



Admin does not show icon_calendar.gif

2012-09-16 Thread trojactory
Hi,

After deploying my admin site to production, which is configured to use S3 
for static assets, some icons are missing in the admin site. For 
instance, icon_calendar.gif is missing which is the button for showing the 
calendar popup. I believe the bug is related to a django-storages bug 
mentioned here: 
http://code.larlet.fr/django-storages/issue/121/s3boto-admin-prefix-issue-with-django-14

However, even after trying the fixes mentioned there, I have not been able 
to get the icon displayed. I used Chrome for testing first and later 
checked on Firefox, where the same bug is seen. Firefox seems to show the 
'alt text' correctly however.

Any help in this matter would be much appreciated.

Thanks,
Arun 

-- 
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/-/Rgyg6IksY5sJ.
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: Newbie, trying [read: failing] to set up Django

2012-09-16 Thread jyria
Do you have psycopg2 installed?
If you have pip then "pip install psycopg2"

I would suggest using python virtualenv for django development. Makes life 
easier.

On Sunday, September 16, 2012 5:28:12 AM UTC+3, Helly wrote:
>
> Hello all,
>
> I've been trying to set up Django for quite some time now. I'm on Mac OS X 
> Lion 10.7.4. As to my level of expertise, let's just say I'm pretty new 
> to...computers. I guess I figured I'd just stumble around until it worked. 
> How hard could it be right? Wrong. It seems like you all don't mind helping 
> out newbies though, so I thought I'd give this a shot.
>
> I'm running into problems with synchronizing Django with my database. I 
> installed MySQL and MySQLdb. I created a database and edited the 
> settings.py file according to instructions in the tutorial. However, I 
> couldn't get it to work with the python manage.py syncdb command due to an 
> "architecture" error. Keep in mind that I had, at this point, spent a 
> really long time trying to set these babies up, and this is what finally 
> stumped me.
>
> So, I told MySQL and MySQLdb that I was taking my ball home if that's how 
> they wanted to play. I downloaded and installed Homebrew, Macports, and 
> postgreSQL (through Homebrew) with minimal fumbling. There was one error 
> with my PATH but I fixed it in my .bash_profile. As per the advice of the 
> internet and Homebrew's brew doctor, I amended "PATH so that 
> /usr/local/bin occurs before /usr/bin." This allowed me to start up psql 
> and create a database - at least it seemed like it worked, there was no 
> satisfying little message about its dimensions like in MySQL.
>
> Anyhoo, now when I do python manage.py runserver or python manage.py 
> syncdb it tells me lots of stuff and "ImportError: No module named 
> psycopg2.extensions." What does this mean, and how do I fix it? I am 
> totally at a loss.
>
> I'm sorry if the way I posed the question is long/confusing, but I wasn't 
> really sure what information would be important. I can post the whole 
> output from the terminal if it's helpful. It's really long though, and I 
> had a hunch the last part is the important part. Any help would be greatly 
> appreciated.
>
> 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/-/4nUbruq74m0J.
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: Newbie Project Setup and Terminology Questions

2012-09-16 Thread Matt Woodward
Thanks to all for the examples and insight! Very helpful.

Matt

-- 
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/-/sITNuGB_k54J.
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: Customizing the Django Admin Interface

2012-09-16 Thread Gurpreet Bhatia
Hi Everyone,

I have one query:

Should we change the database(mySQL) table's engine through migration
scripts or not? If not then why?

Following were my proposal:

def forwards(self, orm):

# Change engine from MYISAM to INNODB
db.execute('alter table abc ENGINE=INNODB;')

def backwards(self, orm):

   # Revert Engine to MYISAM
db.execute('alter table abc ENGINE=MYISAM;')

- gurpreet

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



Changing table's engine through migration scripts

2012-09-16 Thread Gurpreet Bhatia
corrected the wrong subject :)

On Sun, Sep 16, 2012 at 12:22 PM, Gurpreet Bhatia <
gurpreetbhatia@gmail.com> wrote:

> Hi Everyone,
>
> I have one query:
>
> Should we change the database(mySQL) table's engine through migration
> scripts or not? If not then why?
>
> Following were my proposal:
>
> def forwards(self, orm):
>
> # Change engine from MYISAM to INNODB
> db.execute('alter table abc ENGINE=INNODB;')
>
> def backwards(self, orm):
>
># Revert Engine to MYISAM
> db.execute('alter table abc ENGINE=MYISAM;')
>
> - gurpreet
>



-- 

Gurpreet Bhatia,
If u feel like doin some work...,
sit down n..
.wait until that feeling goes away.

-- 
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: Customizing the Django Admin Interface

2012-09-16 Thread hevok
Its the correct way to copy the templates and static files into your
project folder, if you want to customize them. Otherwise the changes
would disappear as soon as you deploy or setup-up your project on a
different computer/virtual environment.

Try F5, CTRL-F5 or CTRL-R to reload CSS in the browser as they are often
kept in cache.

Best regards,
Hevok


On Sunday, September 16, 2012 8:25:18 AM UTC+2, JJ Zolper wrote:
>
> Hello,
>
> I was able to locate the Django files for the admin under contrib in the 
> source. I was curious if I could get some tips about customizing the 
> interface.
>
> One website I read said I shouldn't change any of the Django source but if 
> I want to set up a slightly different login page for example, to put the 
> admin files in my local directories that I'm working with.
>
> The real question is that I was able to edit some template files to change 
> some of the wording displayed but when I tried to edit the CSS files to get 
> a different design I did not see any changes when I restarted my server. Is 
> there some sort of collectstatic command that needs to be run? Any input on 
> how to propagate these CSS files through would be great.
>
> Thanks,
>
> JJ Zolper
>

-- 
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/-/bZzeoCXJycoJ.
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: Newbie, trying [read: failing] to set up Django

2012-09-16 Thread hevok
You need the PostgreSQL database adapter for Python:

pip install psycopg2

or

easy_install psycopg2

Cheers,
Hevok


On Sunday, September 16, 2012 4:28:12 AM UTC+2, Helly wrote:
>
> Hello all,
>
> I've been trying to set up Django for quite some time now. I'm on Mac OS X 
> Lion 10.7.4. As to my level of expertise, let's just say I'm pretty new 
> to...computers. I guess I figured I'd just stumble around until it worked. 
> How hard could it be right? Wrong. It seems like you all don't mind helping 
> out newbies though, so I thought I'd give this a shot.
>
> I'm running into problems with synchronizing Django with my database. I 
> installed MySQL and MySQLdb. I created a database and edited the 
> settings.py file according to instructions in the tutorial. However, I 
> couldn't get it to work with the python manage.py syncdb command due to an 
> "architecture" error. Keep in mind that I had, at this point, spent a 
> really long time trying to set these babies up, and this is what finally 
> stumped me.
>
> So, I told MySQL and MySQLdb that I was taking my ball home if that's how 
> they wanted to play. I downloaded and installed Homebrew, Macports, and 
> postgreSQL (through Homebrew) with minimal fumbling. There was one error 
> with my PATH but I fixed it in my .bash_profile. As per the advice of the 
> internet and Homebrew's brew doctor, I amended "PATH so that 
> /usr/local/bin occurs before /usr/bin." This allowed me to start up psql 
> and create a database - at least it seemed like it worked, there was no 
> satisfying little message about its dimensions like in MySQL.
>
> Anyhoo, now when I do python manage.py runserver or python manage.py 
> syncdb it tells me lots of stuff and "ImportError: No module named 
> psycopg2.extensions." What does this mean, and how do I fix it? I am 
> totally at a loss.
>
> I'm sorry if the way I posed the question is long/confusing, but I wasn't 
> really sure what information would be important. I can post the whole 
> output from the terminal if it's helpful. It's really long though, and I 
> had a hunch the last part is the important part. Any help would be greatly 
> appreciated.
>
> 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/-/Fh4-Hxvy5aIJ.
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.



Easy question to the Auth System

2012-09-16 Thread WoHinDu
Hey,

sorry for my bad englisch. Englisch is not my nativ language, but i hope 
you can understand it and sorry for the stupid question but i'm new at 
Django.

I have a table called "Event" in this Table i store some events with title, 
date/time an a description. 

But how can i "connect" this events with users from the Django Auth System? 
Is it a good idea to do this with a "ManyToMany" relation or not?

Thanks.

WoHinDu

-- 
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/-/dDvQhsitipgJ.
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: Newbie, trying [read: failing] to set up Django

2012-09-16 Thread Helly

wow

I'm really glad I embarrassed myself on the whole internet.

Thanks for answering with zero condescension. I am going to try to install 
this today.

-- 
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/-/0DICy1u6SmMJ.
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: Easy question to the Auth System

2012-09-16 Thread Thomas Orozco
Hi,

Use ManyToMany if one event can relate to *several* Users
Use ForeignKey if one event relates to a *single* User

Cheers,

Thomas

2012/9/16 WoHinDu :
> Hey,
>
> sorry for my bad englisch. Englisch is not my nativ language, but i hope
you
> can understand it and sorry for the stupid question but i'm new at Django.
>
> I have a table called "Event" in this Table i store some events with
title,
> date/time an a description.
>
> But how can i "connect" this events with users from the Django Auth
System?
> Is it a good idea to do this with a "ManyToMany" relation or not?
>
> Thanks.
>
> WoHinDu
>
> --
> 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/-/dDvQhsitipgJ.
> 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: Changing table's engine through migration scripts

2012-09-16 Thread Thomas Orozco
I wouldn't recommend that
Migrations are tightly tied to your app as you need them to set you app up.
In that sense, they should be database agnostic, as your app is (because
Django is).

Using a migration that only works for MySQL seems very strange to me.
Indeed, such a migration wouldn't make sense for SQLite or Postgres,

Moreover, the table engine doesn't make any difference from the app's point
of view, so I think it's better to leave that to your database console.

Cheers,

Thomas

2012/9/16 Gurpreet Bhatia 

> corrected the wrong subject :)
>
> On Sun, Sep 16, 2012 at 12:22 PM, Gurpreet Bhatia <
> gurpreetbhatia@gmail.com> wrote:
>
>> Hi Everyone,
>>
>> I have one query:
>>
>> Should we change the database(mySQL) table's engine through migration
>> scripts or not? If not then why?
>>
>> Following were my proposal:
>>
>> def forwards(self, orm):
>>
>> # Change engine from MYISAM to INNODB
>> db.execute('alter table abc ENGINE=INNODB;')
>>
>> def backwards(self, orm):
>>
>># Revert Engine to MYISAM
>> db.execute('alter table abc ENGINE=MYISAM;')
>>
>> - gurpreet
>>
>
>
>
> --
>
> Gurpreet Bhatia,
> If u feel like doin some work...,
> sit down n..
> .wait until that feeling goes away.
>
>  --
> 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 LDAP

2012-09-16 Thread sbrandt
Where exactly do you need help?

You can install it like every other python package via pip or easy_install: 
"pip install django-auth-ldap" or "easy_install django-auth-ldap".

Configuration is really easy and described in the documentation. They 
support groups and automatic extraction of LDAP data into user fields, even 
into the user profile: http://packages.python.org/django-auth-ldap/

I suggest you to read this documentation since it is really clear to 
understand and answer here if you have a particular problem :) Good luck!

Am Donnerstag, 13. September 2012 17:43:56 UTC+2 schrieb Tony:
>
> Thank you sbrandt. I found the same thing, but i don't know how to use it. 
> Where do i need to copy the files and do i erase some lines of the code or 
> not, to make them as comments. I'm trying but i am not succeeding at making 
> it work...
>
> Can you help me about that? 
>
> On Thu, Sep 13, 2012 at 10:16 AM, sbrandt 
> 
> > wrote:
>
>> Did you know there is django-auth-ldap which is a custom backend for 
>> authenticating users through LDAP? 
>> http://pypi.python.org/pypi/django-auth-ldap/
>>
>> I don't see the point why you fiddle around with writing code on your 
>> own. I'm using django-auth-ldap since one and a half year in production and 
>> it works like a charm.
>>
>>  -- 
>> 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/-/4Go12iWz_pEJ.
>>
>> To post to this group, send email to django...@googlegroups.com
>> .
>> To unsubscribe from this group, send email to 
>> django-users...@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 view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/TS0KtsVUDe0J.
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.



adding a database (anda table with its model) on the fly

2012-09-16 Thread Gelonida N


I wondered whether there would be any way to add a new model and a new 
database without having to stop my processes.


I can imagine multiple use cases, where this could be intersting.

One  use case would be for example a graphical application:
- The user would select a sqlite file or perhaps any other DB
- the application would inspect the db and create models for each table
- the db and the models would be imported and added to django
- the user could create save and load query sets and visualize
the results


This can be done without the django orm, but I'd like to use the ORM if 
possible, as I like the construction of query sets.


Thanks for any opinions / answers suggestions.

--
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: Easy question to the Auth System

2012-09-16 Thread WoHinDu
I love Django. Sometimes it's a bit dificult to find what you need, but if 
you find it, it's always simpel.

If someone have the same problem just add filter_horizontal or filter_vertical 
thats all!

Am Sonntag, 16. September 2012 18:01:34 UTC+2 schrieb WoHinDu:
>
> Hey,
>
> sorry for my bad englisch. Englisch is not my nativ language, but i hope 
> you can understand it and sorry for the stupid question but i'm new at 
> Django.
>
> I have a table called "Event" in this Table i store some events with 
> title, date/time an a description. 
>
> But how can i "connect" this events with users from the Django Auth 
> System? 
> Is it a good idea to do this with a "ManyToMany" relation or not?
>
> Thanks.
>
> WoHinDu
>
>

-- 
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/-/UOxttk1-Y6wJ.
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: tree.io installation with django

2012-09-16 Thread Fabian Weiss
Allright, I didnt know that! So here are the requirments! I deinstalled 
django debian packet and used pip. Works very well! But some of the 
requiered software is also available and installed on my system through 
APT! For example python-dateutil. What to do? Deinstall it and install it 
with pip??

I did like this "pip install -U Django==1.3" for the hole list:

Django==1.3
Pygments==1.3.1
south
jinja2==2.5.2
coffin
hashlib
PIL
html5lib==0.90
oauth2
whoosh
python-dateutil
django-dajax
django-dajaxice
django-piston==0.2.2
django-simple-captcha
unidecode
django-websocket
docutils
simplejson
sphinx
johnny-cache
django-pandora

Than I startet again from scratch. I created the treeio dir and went into 
this. I started the configure as root, works well. Then the patch, and this 
time it made trouble!
http://snipurl.com/250l4g8
Datei oder Verzeichnis nicht gefunden = File or directory not found.

As usual I just continued with "python manage.py installdb" and "python 
manage.py loaddata data.json" and as usual I got the same error: 
"django.core.exceptions.ImproperlyConfigured: You're using the staticfiles 
app without having set the STATIC_ROOT setting."

Sorry, but: I STILL DONT KNOW WHERE TO ENTER MY MYSQL INFORMATION!???

But, this time I can see something!!! :) http://project.immersight.de/
But what I now wrong??






Am Sonntag, 16. September 2012 13:54:57 UTC+2 schrieb Nick Apostolakis:
>
> On 16/09/2012 12:01 μμ, Fabian Weiss wrote: 
> > I would like to do, but my Debian Distribution just offers 1.4! Maybe I 
> can 
> > install another one, but than I probably get Version missmatch.. :/ 
> > 
> > 
> You could install any version you like through the use of pip an virtual 
> env 
> Check it out. Its quite simple and it is a very valuable technique 
>
>
> -- 
>   -- 
> Nick Apostolakis 
>e-mail: nick...@oncrete.gr  
>   Web Site: http://nick.oncrete.gr 
>   -- 
>
>
>

-- 
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/-/G-7DntC1__QJ.
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.



Hello World with Django

2012-09-16 Thread python . anaconda

Hi, 

Can someone help me in this question? 

http://stackoverflow.com/questions/12399318/why-do-i-need-django-for-a-simple-hello-world

As you can see, the Flask solution is only "half answer" and the Django 
solution in my web hosting service 
doesn't work and, as you can imagine, I don't have access to 
http://127.0.0.1/ because 
this is the "localhost" of my computer and I am accessing a remote server. 

Thank you in advance






-- 
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/-/JpWu0xcrY1MJ.
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: tree.io installation with django

2012-09-16 Thread Mike Dewhirst

On 16/09/2012 6:41am, Fabian Weiss wrote:

The invalid syntax thing is also a bit odd, as it looks valid to me.



I haven't followed this thread but whenever I get an invalid syntax 
error with valid syntax it is usually a problem with an earlier line. In 
my cases it is often a missing comma or mis-matched parenthesis.



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



Abstract classes and inhertience

2012-09-16 Thread Lachlan Musicman
Hola,

I have an abstract base class, Person, with three children:
Applicants, Students and Staff.

I have two questions.

As per docs 
($PATH/topics/db/managers.html#custom-managers-and-model-inheritance)
I have three managers for the Abstract class:

people = models.Manager()
men = MaleManager()
women = FemaleManager()

with the appropriate definitions.

For some reason, I can't get

.men.all() or .women.all() to work. Any tips?

Secondly, I want the dob and gender to be using special widgets, so in
admin.py I have:

class PersonAdminForm(ModelForm):
class Meta:
model = Person
widgets = {
'dob': SelectDateWidget(),
'gender': RadioSelect(),
}

but then when I add the form to the StudentAdminForm or
ApplicantAdminForm, it fails on the first field that's not in Person.

Is there anyway to have a generic admin form?

cheers
L.



-- 
...we look at the present day through a rear-view mirror. This is
something Marshall McLuhan said back in the Sixties, when the world
was in the grip of authentic-seeming future narratives. He said, “We
look at the present through a rear-view mirror. We march backwards
into the future.”

http://www.warrenellis.com/?p=14314

-- 
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: Abstract classes and inhertience

2012-09-16 Thread Stephen Anto
Hi,

Have you tried to fetch all data from models like

Model.objects.all()

It it is the way to fetch all data. Thank you for
visitingFor
Django 

On Mon, Sep 17, 2012 at 6:50 AM, Lachlan Musicman  wrote:

> Hola,
>
> I have an abstract base class, Person, with three children:
> Applicants, Students and Staff.
>
> I have two questions.
>
> As per docs
> ($PATH/topics/db/managers.html#custom-managers-and-model-inheritance)
> I have three managers for the Abstract class:
>
> people = models.Manager()
> men = MaleManager()
> women = FemaleManager()
>
> with the appropriate definitions.
>
> For some reason, I can't get
>
> .men.all() or .women.all() to work. Any tips?
>
> Secondly, I want the dob and gender to be using special widgets, so in
> admin.py I have:
>
> class PersonAdminForm(ModelForm):
> class Meta:
> model = Person
> widgets = {
> 'dob': SelectDateWidget(),
> 'gender': RadioSelect(),
> }
>
> but then when I add the form to the StudentAdminForm or
> ApplicantAdminForm, it fails on the first field that's not in Person.
>
> Is there anyway to have a generic admin form?
>
> cheers
> L.
>
>
>
> --
> ...we look at the present day through a rear-view mirror. This is
> something Marshall McLuhan said back in the Sixties, when the world
> was in the grip of authentic-seeming future narratives. He said, “We
> look at the present through a rear-view mirror. We march backwards
> into the future.”
>
> http://www.warrenellis.com/?p=14314
>
> --
> 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.
>
>


-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.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.



how to use java script alert in view? i use form submit on post method. After sucessfull opreation in view i want alert

2012-09-16 Thread Navnath Gadakh


-- 
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/-/t6s6YgYVAY8J.
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 to use java script alert in view? i use form submit on post method. After sucessfull opreation in view i want alert

2012-09-16 Thread Kev Dwyer
Navnath Gadakh wrote:

> 
> 
Hello Navnath,

You can either submit the form via javascript and display the alert based on 
the response from the view, or submit the form normally and in your 
javascript code poll another view to check the result.

The first method is better, in my view.  Both methods depend on the user 
having enabled javascript in their browser.  Depending on your use case, 
this may not be a safe assumption.

Cheers,

Kev

-- 
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 to use java script alert in view? i use form submit on post method. After sucessfull opreation in view i want alert

2012-09-16 Thread Jani Tiainen

17.9.2012 7:31, Navnath Gadakh kirjoitti:


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



First, a small nitpicking: you shouldn't post question to subject line 
only.


It all depends what you really mean by "alert"? Standard javascript 
alert popup? That can be quite easily done by redirecting a view that 
has template that contains javascript alert that is triggered for 
example onload event.


Though in general all kind of interruptive messaging is bad and will 
cause a pain after a while.


Also what would you show in case of unsuccessful operation? An alert as 
well?


--
Jani Tiainen

- Well planned is half done and a half done has been sufficient before...

--
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: tree.io installation with django

2012-09-16 Thread Fabian Weiss
Well, I really dont know what to do :( All I can show you is the Apache log:

[Sun Sep 16 21:45:58 2012] [error] 
/usr/local/lib/python2.7/dist-packages/jinja2/__init__.py:31: UserWarning: 
Module hashlib was already imported from /usr/lib/python2.7/hashlib.pyc, 
but /usr/local/lib/python2.7/dist-packages is being added to sys.path
[Sun Sep 16 21:45:58 2012] [error]   __version__ = 
__import__('pkg_resources') \\


Am Montag, 17. September 2012 01:59:09 UTC+2 schrieb Mike Dewhirst:
>
> On 16/09/2012 6:41am, Fabian Weiss wrote: 
> > The invalid syntax thing is also a bit odd, as it looks valid to me. 
> > 
>
> I haven't followed this thread but whenever I get an invalid syntax 
> error with valid syntax it is usually a problem with an earlier line. In 
> my cases it is often a missing comma or mis-matched parenthesis. 
>
>
>

-- 
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/-/UUfBUZPpXcgJ.
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: tree.io installation with django

2012-09-16 Thread Mike Dewhirst

On 17/09/2012 3:35pm, Fabian Weiss wrote:

Well, I really dont know what to do :( All I can show you is the Apache log:

[Sun Sep 16 21:45:58 2012] [error]
/usr/local/lib/python2.7/dist-packages/jinja2/__init__.py:31:
UserWarning: Module hashlib was already imported from
/usr/lib/python2.7/hashlib.pyc, but
/usr/local/lib/python2.7/dist-packages is being added to sys.path


Things being incorrectly added to sys.path should only be a problem if 
there is a difference in version AND the position in the sys.path list 
means they get imported ahead of the correct version. Otherwise it 
doesn't matter apart from being inelegant.



[Sun Sep 16 21:45:58 2012] [error]   __version__ =
__import__('pkg_resources') \\


I'm out of my depth on this.

Have you checked every line in the code ahead of the line which 
generated the syntax error?





Am Montag, 17. September 2012 01:59:09 UTC+2 schrieb Mike Dewhirst:

On 16/09/2012 6:41am, Fabian Weiss wrote:
 > The invalid syntax thing is also a bit odd, as it looks valid to me.
 >

I haven't followed this thread but whenever I get an invalid syntax
error with valid syntax it is usually a problem with an earlier
line. In
my cases it is often a missing comma or mis-matched parenthesis.


--
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/-/UUfBUZPpXcgJ.
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: how to use java script alert in view? i use form submit on post method. After sucessfull opreation in view i want alert

2012-09-16 Thread Navnath Gadakh
on sucess and unsucess i want java script alert.

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



java script alert from view after sucessfull opreation

2012-09-16 Thread Navnath Gadakh
how to use java script alert from view after sucessfull opreation in view 
ifself?

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