I've installed Djangobb app on my server (Debian, mod_python) by cloning original source. The only things I've changed is database options in settings.py. All needed components are installed - syncdb query was executed right.
But, when I'm trying to enter on my forum, it returns me error:
ImproperlyConfigured: Error importing middle...
I'm looking to implement a RESTful interface for a Django application. It is primarily a data-service application - the interface will be (at this point) read-only.
The question is which Django toolsets / frameworks make the most sense for this task.
I see Django-rest and Django-piston. There's also the option of rolling my own.
...
I have the folowing model:
class Step(models.Model):
order = models.IntegerField()
latitude = models.FloatField()
longitude = models.FloatField()
date = DateField(blank=True, null=True)
class Journey(models.Model):
boat = models.ForeignKey(Boat)
route = models.ManyToManyField(Step)
departure = models.Fore...
Basically I am writing a simple shopping cart. Each item can have multiple prices. (i.e. shirts where each size is priced differently). I would like to have a single price field in my admin panel, where when the first price is entered, an additional price field pops up. However I am kind of at a loss as to how to do this. What would be t...
What if there is nothing that matches the get? Then it returns in an error.
How do I say: get if there is, otherwise, return nothing.
...
I'm working with a legacy database which uses the MySQL big int so I setup a simple custom model field to handle this:
class BigAutoField(models.AutoField):
def get_internal_type(self):
return "BigAutoField"
def db_type(self):
return 'bigint AUTO_INCREMENT' # Note this won't work with Oracle.
This works fine w...
Hi folks,
I think this is a bit tricky, at least for me. :)
So I have 4 models Person, Singer, Bassist and Ninja.
Singer, Bassist and Ninja inherit from Person.
The problem is that each Person can be any of its subclasses.
e.g. A person can be a Singer and a Ninja. Another Person can be a Bassist and a Ninja. Another one can be a...
We are planning a web application to build on Google's App Engine platform.
Is it good to use the Django 1.1 framework to develop Google App Engine applications?
If not, could you please suggest me the best option available, which has good tutorials and learning resource?
...
Hi,
excuse me in advance if this is not the right title for the problem but here it is:
You have application that works with pre defined model. What happens if you want to
use this application one more time in your project but pointing to different model (same structure but differen name).
For example - you have a "News" application ...
I want to write the text (which I get from AJAX) to a file, and then read it.
...
Hi
On my development system, I have python 2.6, python 1.1 and GAE.
I have three projects running on python 2.6 and django 1.1.
And 1 project using GAE, Python 2.6 and django 1.1.
I have heard that, my set-up for running GAE using python 2.6 may create some head scratching problems while deploying it on the production server, beca...
def sss(request):
handle=open('b.txt','r+')
handle.write("I AM NEW FILE")
var=handle.read();
return HttpResponse(var)
urlpatterns = patterns('',
('^$',sss),
)
1.my b.txt has nothing
2.when i run my code ,it print this :
I AM NEW FILE7 ...
I have to build an url dynamically according to the current url. Using the {% url %} tag is the easiest way to do it, but I need the current url name to generate the new one dynamically.
How can I get the url name attached to the urlconf that leads to the current view?
EDIT : I know I can manually handcraft the url using get_absolute_...
I'm curious... I'm looking to have a really efficient setup for my slice for a client. I'm not an expert with servers and so am looking for good solid resources to help me set this up... It's been recommended to me that using FastCGI for PHP, Green Unicorn (gunicorn) for Django and Nginx for media is a good combination to have PHP and Dj...
Are there any custom themes for Django's admin app, other than django-grappelli?
...
I want to do encode the data before saving it to a database table and decode it after reading it from the database table. I wanted to override django get and save methods.
something like:
class UserData(models.Model):
userid = models.IntegerFields
data = models.charField(max_length=25)
def save(self, *args, **kwargs):
...
Hi,
Given a url to an image is there a way in Django/Python to pull this image in and then display it on my site (resized if possible)
Thanks
...
I'm trying to make it so that the ImageFileField only accepts image files of a set dimension. I found another post on here which suggest hijacking the 'clean' method in a form, but I was wondering if it would be simpler to create a custom field type instead?
Has anyone got any code snippets which I might be able to use in order to do t...
Hi, everyone
I'm just starting with django. It is not quite clear to me, how should I write an app I could reuse later. In every tutorial I read I see the same piece of code:
view.py
from project.app.models import MyModel
So, if I move my apps to another project, I'll have to modify the "project.app.models" so that it looks like "proj...
Hi,
I'm using Django to serve up some XML. Part of the requirements is that my dates are formatted as follows: 1969-12-31T18:33:28-06:00
How can I output a DateField in Django in that format?
...