hello, after running "python manage.py syncdb" i gett an error saying "unable to open database file".
here is the important part from my settings.py:
DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
DATABASE_NAME = 'apps.db' # Or path to database file if using sqlite3.
DATABASE_...
I used pip to install it, and followed the usage directions found here: http://django-tinymce.googlecode.com/svn/tags/release-1.5/docs/.build/html/usage.html under the section "The HTMLField model field type". I re-synced the db (not even sure that was needed), restarted apache2, and yet the text field is still just a textarea.
Any sugg...
I have a Customer model which contains a ForeignKey to a Contact model.
I have over 100,000 contacts in my DB and when I load the admin page for a specific customer, the dropdown menu for the contact is getting populated with ALL of the contacts in the database. This has recently, due to its shear length, started causing my Firefox to c...
One of my models has a 'status' field which is only ever modified in code. It is an integer from 1 to 6 (although this may change in the future).
However, in the Admin site, I would like to display a label for this data. So, instead of displaying '5', I would like it to say 'Error'. This means I would be able to easily filter the object...
I have created a app which will upload the file at a particular location. How can I read the file uploaded after the model is saved? When I click on the file link on change_field_page it gives page not found. I'm using Django 1.2 and django-admin for this.
Here's my models.py:
class UploadClass(models.Model):
id=models.AutoField(prim...
What would be the best way to go about forcing all HttpResponse objects returned by views in the Django admin site app to use "text/html" as their content type, regardless of the value of the DEFAULT_CONTENT_TYPE setting? My project has this set to "application/xhtml+xml," and although content produced by the admin app claims to be valid...
Collecting the admin-media files from different django application is one of the not-so-good things about django. Usually you have to file copying from the module distributions to your directory every time one you install/update/remove a module.
When you are using several django application that do have their own media/admin files, som...
I'm trying to add a hook after deleting an object from Django Admin page. From the doc, I found that ModelAdmin has save_model method where I can add a hook for Save action. However, I don't see anything like this for Delete action.
What I want to do is that whenever a user saves/deletes an object from say the Article model, I want to a...
In my Django application my model has some values set as properties - they are calculated on demand from other values (like, min. value of some other objects' field, etc). This works pretty well as I don't need to store those in the database and the calculations can be expensive, so they're cached.
So I have a model:
class A(models.Mo...
Im getting 500 internal server error everytime I try access my admin or login page. There's nothing in my error.log
Any ideas ?
...
So, I'm making a Django 1.2 app, and I'm having a problem with the admin site. Here's the models.py:
from django.db import models
from django.contrib.auth.models import User
import datetime
class Dailysales(models.Model):
salesdate = models.DateField(primary_key=True)
...
def __unicode__(self):
return self.salesdate.strfti...
I have a Django app for which I have created a superuser account for so I can log into django-admin.
This works in local (I can log in).
How do I create a superuser on my appspot.com account on Google App Engine?
...
I am creating an Django app for Google App Engine. I am using django-nonrel but am using Google App Engine models.
I am wanting to also use Django's admin site.
My models.py for airlines app is:
from google.appengine.ext import db
class Airline(db.Model):
name = db.StringProperty(required=True)
description = db.TextProperty()
no...
In my localhost Django administrator I am able to fill-in Date and Time fields by clicking on the little "Date" and "Time" helper icons next to my pub_date field. However, the same administrator on my Server does NOT show these icons. The server-side admin also doesn't pop open a pop-up window for the little "+" plus sign for fields in r...
Hi there,
I was wondering what's the best way o modify django-admin? That is, the best way to modify it and keep compatibility with future releases?
Specifically Im refering to the search_fields where using (=field) gets converted to field_iexact in the query construction when I need field_exact ?
I just to make modifications in a wa...
Think of this:
You create a CMS of some sort, which asks you for an application name and a csv file for that application.
Then it automatically creates that app on the fly, creates the required model.py based on the csv columns, activates the admin page for it and allows only you to have the full permission to this new table via django ...
Hi everyone,
I'm using Django on a Debian VM, django server is loaded through nginx. Everything's working fine 'til now, except the admin interface. In fact, the admin site, doesn't load the "look and feel" of the interface. It seems that Css and images aren't loading at all, any ideas?
Thanks.
...
Hello,
In my django project I would like to be able to delete certain entries in the database automatically if they're too old. I can write a function that checks the creation_date and if its too old, deletes it, but I want this function to be run automatically at regular intervals..Is it possible to do this?
Thanks
...
Is there any django application that can create other apps merely based on a sql / csv file provided that a default template is found for the new applications.
...
In my admin.py i have:
class SayfaAdmin(admin.ModelAdmin):
def queryset(self, request):
qs = super(SayfaAdmin, self).queryset(request)
....
But, insteead of defining same queryset function, i wish to write a function which will be called within admin class and returns the result so, instead of writing something as ...