Best practice for maintaining the "Django stack"

2010-08-13 Thread Oivvio Polite
I started playing around with Django sometime early 2009, did the
tutorial and got started on a toy project. Then something came inbetween
and now, coming back to my toy project I notice that the unit test spit
out a lot of errors relating to the migration tool South. I've haven't
written any test relating to South. My project isn't importing South and
when I remove South from INSTALLED_APPS the errors go away.

So I guess these errors are relating to some testing Django and/or
South does per default and that the errors might be due to some version
incompatibility between the Django/South versions I had installed last
year and the ones that are installed now.

My question isn't really about how to resolve this particular issue but
rather about best practices for maintaining a consistent "Django stack",
so that similar errors will not happen in the future.


Oivvio

-- 
http://pipedreams.polite.se/about/


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Best practice for maintaining the "Django stack"

2010-08-14 Thread Oivvio Polite
On Fri, Aug 13, 2010 at 04:40:06PM +0200, Thomas Guettler wrote:
> 
> What kind of error do you get? Please post the traceback.
> 


..E.FEEE.E...E..
==
ERROR: Does logging work when passing in a valid file?
--
Traceback (most recent call last):
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/tests/logger.py",
 line 44, in test_db_execute_logging_validfile
os.remove(self.test_path)
OSError: [Errno 13] Permission denied: 
'/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/tests/test.log'

==
ERROR: test_apply_migrations (south.tests.logic.TestMigrationLogic)
--
Traceback (most recent call last):
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/tests/logic.py",
 line 140, in test_apply_migrations
migration.migrate_app(app, tree, target_name=None, resolve_mode=None, 
fake=False, verbosity=0)
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/migration.py",
 line 581, in migrate_app
result = run_forwards(mapp, [mname], fake=fake, db_dry_run=db_dry_run, 
verbosity=verbosity)
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/migration.py",
 line 388, in run_forwards
verbosity = verbosity,
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/migration.py",
 line 327, in run_migrations
runfunc()
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/tests/fakeapp/migrations/0001_spam.py",
 line 13, in forwards
('name', models.CharField(max_length=255))
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/db/generic.py",
 line 168, in create_table
self.execute('CREATE TABLE %s (%s);' % (qn(table_name), ', '.join([col for 
col in columns if col])))
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/db/generic.py",
 line 86, in execute
cursor.execute(sql, params)
  File "/usr/lib/pymodules/python2.6/django/db/backends/sqlite3/base.py", line 
193, in execute
return Database.Cursor.execute(self, query, params)
OperationalError: table "southtest_spam" already exists

==
ERROR: test_migration_merge_forwards (south.tests.logic.TestMigrationLogic)
--
Traceback (most recent call last):
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/tests/logic.py",
 line 200, in test_migration_merge_forwards
migration.migrate_app(app, tree, target_name=None, resolve_mode="merge", 
fake=False, verbosity=0)
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/migration.py",
 line 581, in migrate_app
result = run_forwards(mapp, [mname], fake=fake, db_dry_run=db_dry_run, 
verbosity=verbosity)
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/migration.py",
 line 388, in run_forwards
verbosity = verbosity,
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/migration.py",
 line 327, in run_migrations
runfunc()
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/tests/fakeapp/migrations/0001_spam.py",
 line 13, in forwards
('name', models.CharField(max_length=255))
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/db/generic.py",
 line 168, in create_table
self.execute('CREATE TABLE %s (%s);' % (qn(table_name), ', '.join([col for 
col in columns if col])))
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/db/generic.py",
 line 86, in execute
cursor.execute(sql, params)
  File "/usr/lib/pymodules/python2.6/django/db/backends/sqlite3/base.py", line 
193, in execute
return Database.Cursor.execute(self, query, params)
OperationalError: table "southtest_spam" already exists

==
ERROR: test_alter_constraints (south.tests.db.TestOperations)
--
Traceback (most recent call last):
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/tests/db.py",
 line 245, in test_alter_constraints
db.execute("INSERT INTO test_alterc (num) VALUES (1), (2)")
  File 
"/usr/local/lib/python2.6/dist-packages/South-0.6.2-py2.6.egg/south/db/generic.py",
 line 86, in execute
cursor.execute(sql, params)
  File "/usr/lib/pymodules/python2.6/django/db/backends/sqlite3/base.py", line 
193, in execute
return Database.Cursor.execute(self, query, params)
OperationalError: near ",": syntax error

===

Re: Best practice for maintaining the "Django stack"

2010-08-14 Thread Oivvio Polite
Thanks to everyone who replied. I'll read up on virtualenv and pip.

Oivvio

-- 
http://pipedreams.polite.se/about/


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



virtualenv and standalone scripts

2010-08-23 Thread Oivvio Polite
Following advice on this list I've moved to virtualenv+pip to manage my
django stack, which so far is working out nicely. 

But what should I do about standalone scripts? Say I have a project
called mysite. If I'm in a virtualenv and execute a standalone script,
mysite won't be on my pythonpath and the script won't be able to import
it.

For now I've solved this by symlinking mysite from my virtualenv
site-packages folder, but that sort of defeats the purpose of having
using virtualenv.

What's the right way to go about it?

Oivvio



-- 
http://pipedreams.polite.se/about/


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: virtualenv and standalone scripts

2010-08-23 Thread Oivvio Polite
On Mon, Aug 23, 2010 at 10:54:21PM +0200, Oivvio Polite wrote:
> 
> What's the right way to go about it?
> 

Ok, just did some more googling and found out about custom management
commands, that clearly are the django way of solving my problem.

oivvio


-- 
http://pipedreams.polite.se/about/


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



passing request.META from view to form

2010-09-29 Thread Oivvio Polite
I'm creating new users+profiles from a form class.
The form gets instantiated by a view. I'd like to save the request.META
header along with the profile so I need to pass it from the view to the
form. 

The form constructor takes the keyword argument data. Is there anyway I
can pass along my entire request, without overloading the constructor?

oivvio

-- 
http://pipedreams.polite.se/about/


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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 develop cms on django

2010-10-29 Thread Oivvio Polite
> i dont have time i need to start development within  a month..
> 
> plz tell me all those crucial topics that i should learn

>From the little information I have about your situation I'd say your
better of using a readymade CMS like Wordpress. As much as I love
Django, I do think that you'll be settings yourself up for a world of
pain if you need to have a site up withing a month and have no
previous experience with python. 

oivvio


-- 
http://pipedreams.polite.se/about/


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



django-registration 0.7 or 0.8

2010-11-08 Thread Oivvio Polite
What version of django-registration do you folks recommend?
A  plain "pip install" gave me 0.7, but some discussions on the
intarwebs seem to indicate that people are using the yet unreleased 0.8.

oivvio

-- 
http://pipedreams.polite.se/about/


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: PDF generator in Django

2013-08-05 Thread Oivvio Polite
On Sun, Aug 04, 2013 at 11:48:40PM -0700, navnath gadakh wrote:
> Which is best tool to generate PDF in python django
> 

I've been using wkhtmltopdf as well. It's very easy to use. Results are
ok, but not stellar. Sometimes the font kerning feels a bit of. I use it
to generate PDF invoices and for that use it's just fine. I probably
wouldn't feel comfortable to use it for something like an e-book though.

oivvio

-- 
Oivvio Polite - http://liberationtech.net

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




No "change password" link on user change_form in Django 2.0.4

2019-01-30 Thread Oivvio Polite
Django version: 2.0.4

I noticed that there is no link for chaning the user password on the
change user view in Django admin. In older versions of Django (like
1.10) that link was there by default.

I'm not talking about chaning the password of the logged in user. That's
working fine.

I'm talking about when the superuser wants to change the password of
another user.


-- 
Oivvio Polite - http://liberationtech.net

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20190130112046.tzzquvdamwpwuypl%40blomma.liberationtech.net.
For more options, visit https://groups.google.com/d/optout.