Hi, I'm tasked to create a simple CRUD MVC application, and I thought it's a good opportunity to learn python. Because of its great documentation, I'm thinking now that I'll go with Django.
Now, this simple CRUD MVC application could become quite complicated in the future. I might have receive and issue JMS messages, display charts th...
I'm trying to run
./manage.py test
But it tells me
Got an error creating the test database: permission denied to create database
Obviously it doesn't have permission to create the database, but I'm on a shared server, so there's not much I can do about that. I can create a new database through the control panel but I don't think...
Hello i want to use NoSql database in my rails/django application for learning point of view. What the various things i should kept in mind.
Any tutorials?
things to be kept in mind?
Any Tips like do and don't?
EDIT
I am fully flexible. I want to learn. I know php,rails,django.I want to create some application using Nosql database a...
Here's how I can do it when MySQL is the backend,
cursor.execute('show tables')
rows = cursor.fetchall()
for row in rows:
cursor.execute('drop table %s; ' % row[0])
But how can I do it when postgresql is the backend?
...
I have changed a ForeignKey in a model form, to use a TextBox instead.
Then I override clean method to return the object based on the name field (instead id field)
class SongForm(forms.ModelForm):
artist = forms.CharField(widget=forms.TextInput())
def clean_artist(self):
data = self.cleaned_data['artist']
artist = Artist.ob...
Possible Duplicates:
Rails or Django? (or something else?)
Django or Rails?
I come from a PHP background and was planning to try out a new framework. I have never done Ruby or Python before.
Knowing PHP, what language would be easier to learn?
...
I've built a Django web application and some Django-Piston services. Using a web interface a user submits some data which is POSTed to a web service and that web service in turn uses Django-celery to start a background task.
Everything works fine in the development environment using manage.py. Now I'm trying to move this to production o...
Im getting 500 internal server error everytime I try access my admin or login page. There's nothing in my error.log
Any ideas ?
...
I have a Django project that uses Celery for running asynchronous tasks. I'm doing my development on a Windows XP machine.
Starting my Django server (python manage.py runserver 80) works fine, but attempting to start the Celery Daemon (python manage.py celeryd start) fails with the following error:
ImportError: Could not import settin...
I am new to using Frameworks for web development and I have noticed that frameworks like django, turbogears etc come with auth packages which contains user models. Am I supposed to directly modify these and use them as my User models or am I supposed to associate my own user models to these and use them just for authentication?
...
Hi,
I want a list of forms with permissions, and one save button..
Like this: http://www.freeimagehosting.net/image.php?c701b302fd.png
But I can't get it working.. Some ideas?
I try to do somethis like this:
forms.py
class ProjectPermission(ModelForm):
class Meta:
model = ObjectPermission
exclude = ('content_type', 'obje...
For example I have two model objects, Person and Address. Address has a reference to a Person id. What would a query look like that pulls them out together as one object, or is that not possible to do with Django?
...
I have the following models:
class Indicator(models.Model):
name = models.CharField(max_length=200)
category = models.ForeignKey(IndicatorCategory)
weight = models.IntegerField()
industry = models.ForeignKey(Industry)
def __unicode__(self):
return self.name
class Meta:
ordering = ('name',)
clas...
I have a django project and for email settings I use my personal gmail account. It works just fine when Im testing from localhost. But i get "conection refused error" from django when I try from my linode vps. Any ideas ?
...
The Django docs say at http://docs.djangoproject.com/en/dev/ref/request-response/#django.http.QueryDict.iteritems thatQueryDict.iteritems() uses the same last-value logic as QueryDict.__getitem__(), which means that if the key has more than one value, __getitem__() returns the last value.
Let's say print request.GET looks like this:
<Q...
In django, I have a table of people, each of which has a namefirst and namelast.
I want to do the sql:
select * from names where left(namefirst,1)=left(namelast,1).
Right now my best effort is
qs=People.objects.extra(select={'db':'select left(namefirst,1)=left(namelast,1)'})
but then if i stick a .filter(db=1) on that it genera...
Hi,
Coming from a jsp and servlet background I am interested to know how django copes with SQL injection hacks. As a servlet and jsp developer I would use prepared statements which gives me some form of protection. How does django cope with custom queries for exams a custom search field.
Thanks in Advance,
Dean
...
I run my django project with Apache, mod_fastcgi and django.core.servers.fastcgi.runfastcgi. I receive mail about all exceptions.
There is one exception I don't know what to do with. It's KeyboardInterrupt. It occurs at different places of my code. Why does it occur? There is no keyboard in Apache!
...
Hi folks,
my "table" look like this:
{'name':'Rupert', 'type':'Unicorn', 'actions':[
{'time':0, 'position':[0,0], 'action':'run'},
{'time':50, 'position':[50,0], 'action':'stoprun'},
{'time':50, 'position':[50,0], 'action':'jump'},
{'time':55, 'position':[50,0], 'action':'laugh'},
...
]}
any way I can index the it...
hi,
if you have millions of entries in a mysql table, you often want to manipulate it with a hexadecimal primary key (in practice you do a md5(name)). The queries are then much faster.
Is there a way to do this with Django?
If not, the usual int primary key isn't limitating?
How to specify that you want a big integer?
...