Problem installing fixtures

2016-02-10 Thread WST

Hi All,

I am new to Django and would appreciate some help with the problem I am 
facing. I am setting up a new server as the previous host machine went 
missing! I have a JSON file from dumpdata on the now missing server and am 
trying to load this data to the newly set up server. However, I seem to be 
getting the following issues after running python manage.py loaddata.

 
Traceback (most recent call last):
  File "/home/wst12/Documents/ipad-app-server/manage.py", line 10, in 

execute_from_command_line(sys.argv)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 353, in execute_from_command_line
utility.execute()
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 345, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", 
line 348, in run_from_argv
self.execute(*args, **cmd_options)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", 
line 399, in execute
output = self.handle(*args, **options)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/commands/loaddata.py"
, line 60, in handle
self.loaddata(fixture_labels)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/commands/loaddata.py"
, line 106, in loaddata
connection.check_constraints(table_names=table_names)
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql/base.py"
, line 223, in check_constraints
self.cursor().execute('SET CONSTRAINTS ALL IMMEDIATE')
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", 
line 79, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", 
line 64, in execute
return self.cursor.execute(sql, params)
  File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 95, 
in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", 
line 62, in execute
return self.cursor.execute(sql)
django.db.utils.IntegrityError: Problem installing fixtures: insert or 
update on table "auth_permission" violates foreign key constraint 
"auth_permiss_content_type_id_2f476e4b_fk_django_content_type_id"
DETAIL:  Key (content_type_id)=(27) is not present in table 
"django_content_type".


At first, I was led to believe, after some Googling, that it was cache 
related. I tried to clear content type cache but the problem still 
persists. I hope someone could help me out. Thank you!

-- 
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/dbd79e57-cf1f-48de-b04c-4d5dfd841160%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Problem installing fixtures

2016-02-10 Thread WST

Hi All,

I am new to Django and am taking over a project which uses a Django server. 
Unfortunately, the host machine used in the previous development cycle went 
missing and I had to set up a new server. I am now having problems loading 
data onto the database. I have a JSON file from dumpdata on the now missing 
server. I am facing the error seen below:

Traceback (most recent call last):
  File "/home/wst12/Documents/ipad-app-server/manage.py", line 10, in 

execute_from_command_line(sys.argv)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 353, in execute_from_command_line
utility.execute()
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 345, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", 
line 348, in run_from_argv
self.execute(*args, **cmd_options)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", 
line 399, in execute
output = self.handle(*args, **options)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/commands/loaddata.py"
, line 60, in handle
self.loaddata(fixture_labels)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/commands/loaddata.py"
, line 106, in loaddata
connection.check_constraints(table_names=table_names)
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql/base.py"
, line 223, in check_constraints
self.cursor().execute('SET CONSTRAINTS ALL IMMEDIATE')
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", 
line 79, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", 
line 64, in execute
return self.cursor.execute(sql, params)
  File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 95, 
in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", 
line 62, in execute
return self.cursor.execute(sql)
django.db.utils.IntegrityError: Problem installing fixtures: insert or 
update on table "auth_permission" violates foreign key constraint 
"auth_permiss_content_type_id_2f476e4b_fk_django_content_type_id"
DETAIL:  Key (content_type_id)=(27) is not present in table 
"django_content_type".

At first, I was led to believe, after some Googling, that it was cache 
related. However, clearing content type cache did not solve this problem. I 
would be grateful if someone could assist me with this. Thank you!

-- 
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/412ca825-1d16-408f-8960-5d3731a0e765%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Problem installing fixtures

2016-02-13 Thread WST
Hi Carlos,

Yes, I am. I would be grateful if you could point me in the direction to 
solve this. I have made quite a few changes to my JSON file before this 
error occurred. The initial error was:

django.db.utils.IntegrityError: Problem installing fixture 
'/path/to/Backups/export_16.json': Could not load contenttypes.ContentType(
pk=9): duplicate key value violates unique constraint 
"django_content_type_app_label_76bd3d3b_uniq" 
DETAIL: Key (app_label, model)=(equation, formula) already exists.. 

What I did was delete those content types causing error and iterated the 
process until it stops occuring. Then, the following error appeared.

django.db.utils.IntegrityError: Problem installing fixtures: insert or 
update on table "auth_permission" violates foreign key constraint 
"auth_permiss_content_type_id_2f476e4b_fk_django_content_type_id"
DETAIL:  Key (content_type_id)=(27) is not present in table 
"django_content_type".

Was the way to solve the first error right or did that lead to the 
following error?

Thank you so much for your help!



On Friday, February 12, 2016 at 4:11:42 AM UTC, Carlos Leite wrote:
>
> Are you moving the content of your old database to a new one ?
>
> Sorry, if I answer the obvious, 
> but when you move, it seems that the IDs of your content type has change. 
>
> And the DATABASE point you an error "violates foreign key constraint"
> auth permission has a generic  relation were a content_type_id = 27
>
> cant be found on content_type table. 
>
> let me know if its not enought. 
>
> -
> Cadu Leite
>
> G+:  google.com/+CarlosLeite
> twitter: @cadu_leite
> site: http://people.python.org.br/
>
> On Wed, Feb 10, 2016 at 7:07 PM, WST > 
> wrote:
>
>>
>> Hi All,
>>
>> I am new to Django and am taking over a project which uses a Django 
>> server. Unfortunately, the host machine used in the previous development 
>> cycle went missing and I had to set up a new server. I am now having 
>> problems loading data onto the database. I have a JSON file from dumpdata 
>> on the now missing server. I am facing the error seen below:
>>
>> Traceback (most recent call last):
>>   File "/home/wst12/Documents/ipad-app-server/manage.py", line 10, in 
>> 
>> execute_from_command_line(sys.argv)
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py"
>> , line 353, in execute_from_command_line
>> utility.execute()
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py"
>> , line 345, in execute
>> self.fetch_command(subcommand).run_from_argv(self.argv)
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", 
>> line 348, in run_from_argv
>> self.execute(*args, **cmd_options)
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", 
>> line 399, in execute
>> output = self.handle(*args, **options)
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/loaddata.py"
>> , line 60, in handle
>> self.loaddata(fixture_labels)
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/loaddata.py"
>> , line 106, in loaddata
>> connection.check_constraints(table_names=table_names)
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql/base.py"
>> , line 223, in check_constraints
>> self.cursor().execute('SET CONSTRAINTS ALL IMMEDIATE')
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", 
>> line 79, in execute
>> return super(CursorDebugWrapper, self).execute(sql, params)
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", 
>> line 64, in execute
>> return self.cursor.execute(sql, params)
>>   File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 
>> 95, in __exit__
>> six.reraise(dj_exc_type, dj_exc_value, traceback)
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", 
>> line 62, in execute
>> return self.cursor.execute(sql)
>> django.db.utils.IntegrityError: Problem installing fixtures: insert or 
>> update on table "auth_permission" violates foreign key constraint 
>> "auth_permiss_content_type_id_2f476e4b_fk_django_content_type_id"
>&g

Missing button image

2016-02-17 Thread WST


Hi All,


I would appreciate if someone could tell me why the view components will 
not load? Thank you!





-- 
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/6ff6203f-985d-4d4e-b390-ea5876768b50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.