Hi all,
I'm not sure what this error means:
'ManagementForm data is missing or has been tampered with'.
I have the following database schema, i have a task database, and then i can assign a task to another user as desired, so i have a user field with foreignkey pointing to User. Now, in the admin panel, i can add another user from th...
Hi all,
I have a task list, with ability to assign users. So i have foreignkey to User model in the database. However, the default display is username in the dropdown menu, i would like to display full name (first last) instead of the username. If the foreignkey is pointing to one of my own classes, i can just change the str function in...
Hi all,
I have a class Task(models.Model), and i didn't define id field explicitly (since it defines automatically for you). I checked in the database, it exists for the Task. Now i would like to display it in the list via list_display property in admin.ModelAdmin. I have a bunch of things in there, only id is not showing up for any of ...
I have a multiselect ListBox in a FormPanel in GWT. I have set the name of the listbox to "foo" via ListBox.setName(). When I post the form, I see that all of the selected values get posted, but all are bound to the same name "foo". So I seemingly cannot get each of the posted values (I am using Django/Python server-side to handle the po...
Hey all,
The framework i'm using (django admin) pops up a new window when adding new items to the database. I would like to use a light box instead of popping up a new window (fancybox for now), and i'm using the iframe option. However, when i click save in the iframe, a request gets sent to the server, and the server responds with a pa...
Hoping to port a Wordpress theme to Django. The theme is the "Thesis" theme, and it keeps everything in a very convoluted way, at least it seems convoluted if you want to just have a look at the full page. The only way I can see doing it is groking through a rendered page by looking at the source HTML, but its not pretty.
...
My model has a DateField. If I wish to retrive all data that have a date after today, how will it be constructed? Eg. retreive all field with dates after today and stop at 31st december
today = datetime.date.today
Object.object.filter(date__day != today)
or will it be done using exclude?
...
Hi, I'm using FastCGI to serve my Django app, so basically it works like this: http://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/#running-django-on-a-shared-hosting-provider-with-apache
What is the best way I can serve static media (images, css, etc) from this? Thanks!
...
In my django project I need to add registration function. Problem is that in registration process I can't use a 'userprofile' anywhere. My user is defined by 'first name' , 'last name' and some other data. How to achieve this ? Apart of enabling contrib.auth and 'registration' I've created a 'user' application. In user.models I have an e...
In my web projects (Django framework) I typically have a few internally developed javascript files that are shared among them. These web projects are stored in seperate mercurial source code repositories. Here's the relevant directory structure:
+ static
--+ css
--+ images
--+ js
-----+ thirdparty
-----+ mycompany
--------+ shared_lib...
I'm aggregating content from a few external sources and am finding that some of it contains errors in its HTML/DOM. A good example would be HTML missing closing tags or malformed tag attributes. Is there a way to clean up the errors in Python natively or any third party modules I could install?
...
i'm having trouble in saving a m2m data, containing a 'through' class table.
I want to save all selected members (selected in the form) in the through table.
But i don't know how to initialise the 'through' table in the view.
my code:
class Classroom(models.Model):
user = models.ForeignKey(User, related_name = 'classroom_creator')...
Hi,
I am kinda stuck, I've been using Django for a while now, but I cant actually seem to find this thing out. And thats weird because it should be a simple thing.
I've been googling around and can't seem to find a solution, it maybe because it is a simple thing.
The problem is, I have a ModelForm, and it has a FileField, when I rende...
Using django trunk r13359 and django piston, I created a small restful service that stores string values.
This is the model I am using to store strings:
class DataStore(models.Model):
data = models.CharField(max_length=200)
url = models.URLField(default = '', verify_exists=False, blank = True)
I used curl to post following d...
Why do I have to either store my static content somewhere else, define some htaccess file or use the django.views.static.serve helper method? Why isn't it just done automatically?
Other frameworks like ASP.Net doesn't seem to have that problem, even with the MVC Framework.
The question is do other frameworks use something similar to dja...
I'd like to use Django's Messages module, however, I would like my messages to persist until the user clicks an X next to the message as opposed to having messages disappear as soon as the user reloads the page.
I am stumped with two issues:
How do I make the messages' context processor not delete the messages once they are accessed?
Ho...
Hi, I have a Django project and it's currently hosted in GitHub and it's private. I'm looking to move many useful parts of it into an open-source project. I think I need to use a 'submodule' thing, but unfortunately I have no idea how to operate these.
Please can someone help me :)
Joe
...
Hi,
I've tried to solve this myself searching and searching but I can't get it to work. :( I'm in Snow Leopard 10.6.4 and tried to setup my Django environment, first I upgraded my python to 2.6.5, installed django and then mysql_python. All seems to be smooth until I to connect to mysql using syncdb.
Got this error/trace message: djang...
I am currently using sqlite3 as the DB for one of my Django projects. I want to change this to use postgresql, and I would like to keep all the data intact.
I used ./manage.py dumpdata > dump.json to create a dump of the data, and changed my settings to use postgresql. Trying first with an empty database to do ./manage.py loaddata dump....
I have built a Macro language for my users that is based upon the Django template language. Users enter into UITextFields their template/macro snippets that can be rendered in the context of larger documents. So I have large multi-line string snippets of django template code that should be populated with variables that are also stored ...