I am using python with django. There I can simply make form from models and also it had builtin Admin.
I am eager to know corresponding framework for PHP with all this facilities.
I have encountered lot some similar questions like this, but they had not compared the frameworks with django. Experts Please Suggest.
...
Hie friends, I made a form using the class forms.py it was running smoothly, but next time when I added two new fields in that forms.py class then on executing the command "python manage.py syncdb " it gives me the following error:
Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_manager(settings)...
Hi,
I have been looking for an answer for this problem.
I have a schema with these models
Users.
Questions.
Answers given by users to a question.
You understand there are 2 foreign keys in an answer:
One foreign key to Question
Another one to User
I want to get a list of rows containing the commons questions answered by 2 users,...
Hi there,
I´m using django to generate a pdf and return the response as an attachment in the view.
response = HttpResponse(mimetype='application/pdf')
response['Content-Disposition'] = 'attachment; filename=somefilename.pdf'
Similar to the way described in the doc (http://docs.djangoproject.com/en/dev/howto/outputting-pdf/#write-your...
Hey guys.
I have a system that relies on other models but want to make it a little more open-ended as my users demand a bit more sometimes.
currently for arguments sake I have 2 authors in an Author model.
john, james
When a user adds a book, and the Author is not available, how do I add a other field in the form, that if selected, ...
Hi folks,
I'm using Django 1.3beta and django-mongodb-engine for database backend.
Problem is when I save an object with a pk set I get this error:
/usr/local/lib/python2.6/dist-packages/django/db/models/fields/__init__.pyc in get_prep_lookup(self, lookup_type, value)
290 return value
291 elif lookup_type i...
I have a view that displays object information when the correct URL is provided however I would like to create a similar view that returns url information from the record that is located next.
So in essence take the info from my first view, list/order it in some way preferably by date and return the records located next and previous in ...
A simple question:
Is this possible?
Is it worth the time looking into it?
...
I am trying to deploy my project using mod_wsgi. Unfortunately I get:
[Wed Oct 27 15:32:33 2010] [error] [client 10.13.3.64] Exception in WSGI handler:
[Wed Oct 27 15:32:33 2010] [error] [client 10.13.3.64] Traceback (most recent call last):
[Wed Oct 27 15:32:33 2010] [error] [client 10.13.3.64] File "/home/project/project/wsgi/proje...
I have used get_next_by_FOO inside my view to display an absolute url for the following item within a set of records however when it gets to the end of the query set an error is raised.
how do I stop my view from raising this error and instead just outputting some html letting me know that it has come to the end of the set?
All help i...
Hi folks,
I need to implement wiki-like functionality within a website.
Problem is that I am not fully aware of what it might require and therefore predict a long set of refactoring till I actually nail a good version.
I tried looking for some guidelines, but haven't found much.
Any ideas? Help would be wonderful
...
I have a django site. a snippet of myapp/models.py looks like this:
class Continent(models.Model):
name = models.CharField(max_length=128, db_index=True, unique=True)
class GeographicRegion(models.Model):
continent = models.ForeignKey(Continent, null=False)
name = models.CharField(max_length=128, null=False)
When I am a...
This is a follow-up to this question.
If I don't explicitly check the unique_together constraint in the clean_title() function, django throws an exception:
IntegrityError at /journal/journal/4
duplicate key value violates unique constraint "journal_journal_owner_id_key"
Request Method: POST
Request URL: http://local...
Hi folks,
I would like to be able to associate various models (Venues, places, landmarks) with a City/Country.
But I am not sure what some good ways of implementing this would be.
I'm following a simple route, I have implemented a Country and City model.
Whenever a new city or country is mentioned it is automatically created.
Unfo...
Adding South to an existing Django project. I have it installed on both the development machine and the "production" server.
I've done the following on the development machine, then: added South app to settings.py,
python manage.py syncdb
python manage.py convert_to_south myproject.myapp
then changed some models, then
python manage...
I've got a view that returns a list of shipments encoded as JSON...
def get_new_shipments(request):
# ...
shipments = Shipment.objects.filter(filter).exclude(**exclude).order_by(order) \
.annotate(num_bids=Count('bids'), min_bid=Min('bids__amount'), max_bid=Max('bids__amount'))
return json_response(shipments)
def js...
The description below is heavily simplified - it's only one part of a bigger problem that we are tackling but the innards can be safely left out for this question.
Suppose we have the following models: -
class Item(models.Model):
name = models.CharField(max_length=150)
value = models.DecimalField(max_digits=12,decimal_places=2)...
I am trying to get the css sheet to load on my dev comp. It is in the media directory as "media/base.css"
In my base/base.html template, I have:
<link href="media/base.css" rel="stylesheet" type="text/css" />
I found http://docs.djangoproject.com/en/1.2/howto/static-files/ but that didn't fix it.
Any ideas?
...
Just wondering about this, is it possible to use Django with the Google Apps API's? I have a small organization that uses Google Apps Education Edition. I was thinking about making a small intranet using Django, and I would love if the first page they saw when they logged in had a few widgets with their email, calendar, maybe docs. I loo...
Hello everybody,
i am in search for a extension that is similar to django_-volution.
The requirement is to alter the database, whitout deleting the wohle data.
I don't know, but for me, this is something so ordinary - doesn't django have a built-in function like that?
django_evolution is still in working progress and has some bugs, so...