It might be even easier to just set up an NFS mount of the other
machines. It would be a lot like Jeff's idea, but NFS is pretty tried
and true. (I don't know anything about SSHFS, it might be really good
too.)
On Jan 30, 9:54 am, Jeff FW wrote:
> Instead of trying to get Django to do something
You might also consider using simplejson to dump the python variable
into something that JavaScript could understand. (This way you can
pass more complicated variables like an array or an object.) I
recently did that to get a list of tags out to some javascript on the
front end.
On Jan 29, 11:33
te = "%s" %
simplejson.dumps(tags)
Pass variable_to_insert_into_template to the template and then just
put {{variable_to_insert_into_template}} somewhere in your code.
Just my 2 cents.
On Jan 30, 10:42 am, Alex Robbins
wrote:
> You might also consider using simplejson to dump the p
e example should be added in the views.py. After that, I can use
> the list by using var x = {{variable_to_insert_into_template}} in my
> javascript?
>
> Regards
> Min
>
> On Jan 31, 3:48 am, Alex Robbins
> wrote:
>
> > Sorry, a code sample would have been more helpful.
It looks like your problem is probably on line 2. The {%
comment_form_target %} tag is trying to do a reverse url lookup.
However, there aren't any matches in your url conf.
Hopefully, you just forgot to set up a url for post_comment.
Unfortunately, what that usually means for me is that there is
Roy, I'd love to help but I don't think I understand the problem (and
I am too lazy to set up the inheritance chain myself). You say it
seems not to work? When does it fail?
Try putting a little content into each template (maybe the template's
name, in an h1 tag). Then how far does the rendering
Hmm, try opening up a python interpreter and importing
"portal.settings". Does that work?
If not there are two likely candidates:
1. It isn't enough for 'portal' to have an __init__.py file, it needs
to be on your pythonpath. Check your pythonpath (import sys;print
sys.path)
2. There is a syntax
The docs talk about models here:
http://docs.djangoproject.com/en/dev/topics/db/models/
foreign keys here:
http://docs.djangoproject.com/en/dev/ref/models/fields/#foreignkey
and queries here:
http://docs.djangoproject.com/en/dev/topics/db/queries/#retrieving-objects
This advice isn't tested, so i
> should I just have it so that a few items from a task DB are done each
> request (e.g. split up emails into groups, and email them a few per
> request)?
Hmm...what happens if there aren't any requests for an hour? Does the
queue processing stop during that time? I can't get my email until
there
You should take a look at select_related[1]. It will take the lot of
queries TiNo was talking about and flatten it down to one big one.
[1]
http://docs.djangoproject.com/en/dev/ref/models/querysets/#id4
Hope that helps,
Alex
On Jul 1, 1:34 pm, TiNo wrote:
> On Wed, Jul 1, 2009 at 16:59, The Da
You might try pdb[1]. Drop
"import pdb;pdb.set_trace()"
into your code the line before "if SHA1_RE". Once at the pdb prompt
you can just type n to move forward one line at a time. Any python
code you type will get evaluated so you can check the status of
variables at each step. (Pdb is a little cr
Whenever I do the same query in a couple of different views, I try to
pull it out into a manager method[1]. For instance, get all the
stories that are marked published from the last two days. I would make
this a method on the manager so I can reuse it other places. Then I
write a test for that man
It sounds like the problem is that you are caching the whole page
using the site wide cache. Maybe things would work better if you used
the low level cache api.[1]
from django.core.cache import cache
MY_STORY_CACHE_KEY = "story_list"
def story_list(request):
story_list = cache.get(MY_STORY_CAC
You might want to look into the SlugField [1]. It makes sure you only
have url friendly stuff. You can also autopopulate it from another
field in the admin[2]. That way you just type the title and it makes a
slug for you.
One reason to hide pks is that they allow people to learn more about
your s
I'm not sure if this answers your question, but...
I have had better luck using the jQuery.load [1] function. It takes an
html response and just jams it into the dom. That way I can do all of
the templating and formatting on the server side. The idea of writing
"" and the like never seemed very ma
You mentioned that it just happens sometimes, and I see from your
traceback it happened in the autoreload.py file. Do you still see the
errors if you call runserver --noreload ?
Alex
On Jul 27, 3:57 pm, Ken Schwencke wrote:
> I'm working with GeoDjango and PostGIS, and I'm getting "Fatal Python
Sorry, I don't know anything about url namespaces, but this might
help:
If all you are doing is looking up an object and displaying it, I
would use the built-in generic views[1]. Just provide a queryset and
an object id or slug and slug field. Less code to debug and maintain.
There is also a list
You'll have to set something in a table and run a cron to send it
later. Django-mailer [1] has all of this set up for, along with some
other cool features. I've used it in a project before and been happy
with it.
[1] http://code.google.com/p/django-mailer/
On Aug 28, 1:10 am, Shadow wrote:
> Hi
You'll probably want to look into something like this:
http://www.djangosnippets.org/snippets/880/
It allows you to set some urls to redirect so they are always https.
Otherwise those silly users will go to credit card pages without
https.
On Aug 29, 1:04 am, Vitaly Babiy wrote:
> Hey guys,
> W
Also, maybe you aren't submitting all the code, but you could do the
same thing by just passing an attrs dictionary to the text area
widget.
http://docs.djangoproject.com/en/dev/ref/forms/widgets/#django.forms.Widget.attrs
Not sure that this requires two more classes.
Hope that helps,
First, if you aren't running into db performance problems, I wouldn't
optimize. Keep everything as simple as possible, then optimize the
parts that actually demonstrate themselves to be a performance issue.
If this really is a performance issue, you could solve it like this:
If you know that you
Graham,
I'm interested in understanding what you just said. It seems like you
are saying you can get the X-Forwarded-SSL environment variable to
automatically be set, without needing the django middleware. Seems
simple enough.
The middleware also handles redirects, so that someone accidentally
g
I guess the question is when you know the additional keyword argument.
If you already know what that extra keyword is when you are
constructing the form list, you could use a partial[1] to put in the
arguments you know already. Partials are python 2.5+ only, you can use
a lambda instead if you are
You might look at http://sandbox.pocoo.org/clevercss/, which is python
based.
On Sep 8, 9:19 am, ThinRhino wrote:
> Hello,
>
> I just came across haml and sass, but looks like it is built for Ruby on
> Rails.
>
> Any implementation that can work on Django?
>
> Though I also came acrosshttp://bit
Yeah, I think that is the problem. You have to execute
CREATE DATABASE books;
from the mysql command line.
Syncdb will make tables, but it won't make the initial database.
Hope that helps,
Alex
On Apr 27, 4:04 am, google torp wrote:
> Hi.
>
> I haven't used Django with mysql, but judging from yo
For a real simple solution you might just set up a foreign key field
that points to the parent of any given category. (If you don't need
the extra features of those libraries, they might just make things
more complicated.)
E.g. subcat1-1-1 and subcat1-1-2 are fk'ed to subcat1-1.
subcat1-1 is fk'e
You could try using the mail_admins function directly.
http://docs.djangoproject.com/en/dev/topics/email/#mail-admins
Maybe it'll raise an informative exception.
On May 25, 2:19 am, Rex wrote:
> Hi,
>
> I am having trouble getting error reporting via email to work (as
> described herehttp://doc
I haven't used that form plugin before, but from the documentation it
looks like the problem is this line:
target:"#new",
http://malsup.com/jquery/form/#options-object
You are asking jQuery to jam the whole response in, just like you are
seeing. What happens if you take that line out? It looks lik
Making the browser switch pages isn't too bad. Just set
document.location to the new url using javascript. (The document
object should be provided by the browser.)
Maybe you should check the headers of the ajax response and if it is a
redirect make the redirect happen using javascript? Or simply m
Very nice. I just found out you can assign a keyword to search engines
in the manage search engines menu. Now I just type "django search
term" in the location bar and I get what I need. Don't have to change
the search engine back and forth.
Thanks for the awesome plugin.
On Sep 24, 4:01 am, 玉东
> 1. Consider the user requesting a page like '/orders/9123'. We detect
> that the user needs to be logged in to see a particular order, so we
> redirect to a login form, saving the '/orders/9123'. If the user logs
> in as the correct user, we then issue a redirect back to '/orders/9123'.
If you use the net tab of firebug[1] you can tell when url/file paths
are messed up. That is the only way I ever get tinymce running.
[1]http://getfirebug.com/
On Sep 27, 7:29 am, Erik Kronberg wrote:
> On Sun, Sep 27, 2009 at 1:54 PM, James Bennett wrote:
>
>
>
>
>
> > On Sun, Sep 27, 2009 at
This sounds related to this ticket http://code.djangoproject.com/ticket/9308,
which supposedly fixed this issue 5 months ago. You should probably
file a bug report.
On Oct 7, 4:19 pm, Peter Sagerson wrote:
> Yes, Django always cascades deletes. There's talk about providing more
> options in a
Maybe it is just me, but I feel like writing out the view functions
like that is a beating. I just name[1] all the urls. Then the url tag
is easy. I just do things like {% url home-page %} or {% url blog-
index %}. If you set up a generic view in the views and name it, it
will work like normal.
[
The warning on line 2 is because you are using python2.6, default in
Ubuntu9.04. You don't need to worry about it. It is just telling the
authors of mysqldb that ImmutableSet is going away in newer versions
of python. Not something you need to care about.
On Oct 29, 3:37 am, sridharpandu wrote:
Derek,
If you want something that display data but doesn't allow you to edit
it, you should check out the databrowse[1] contrib app. You just
register a model with it (like the admin) and it generates all the
pages. It lets users look through the data, but not edit it.
[1]http://docs.djangoproje
That error happens if you refresh the page while it is still loading
from the dev server. You may have gotten impatient, refreshed and
caused that error. It is possible that this isn't really the problem
you are having, but just a secondary issue caused by the long load
time and a page refresh.
O
I guess the answer depends on what you mean by "integrate." If you
have both written parts that serve html pages, just setup apache
configs so that part of the urls are routed to django and the other
urls are routed to php.
Another way to integrate would be by setting up one of the installs as
an
Those sections won't show up for anyone who doesn't have edit
permissions. As long as you don't give the admin user superuser status
or permissions for those apps they won't show up.
On Nov 14, 6:34 pm, Zeynel wrote:
> Is it possible to remove "Auth" and "Sites" sections from the Admin
> panel?
Great,
If you want to get any sort of meaningful feedback you are going to
have to be much more specific when you say integrate. Honestly, this
type of post is normally just ignored because no one really knows what
you are talking about. You only get (good) feedback if you ask good
questions.
Can
Todd,
If you are just trying to define a restful interface to your objects,
you might look at django-piston[1]
If you really want the Rails approach, you are going to be pretty
frustrated working with Django. The python equivalent of "convention
over configuration" is "explicit is better than imp
>You are welcomed to disagree with it, all of us hackers view things
>differently.
>That said, understanding what Tim is saying will help you understand Python and
>the people who use it. Most of us agree with most of Tim's points. I believe
>this
>was mentioned not to tell you to walk away.
Exa
> Yeah, app integration right now seems very non-DRY and much too fiddly.
> Stands to reason
> that including an app implies you include the app's urls and templates - or
> why include it? I
> definitely cringe when copying an integrated app's templates into my
> project's template
> hierarchy
Maybe you could just make another url that wasn't password protected.
If the token doesn't get used up in your plan, you have roughly the
same security (not much).
def rss_view(request):
askdmalkdmakds
protected_rss_view = login_required(rss_view)
Hope that helps,
Alex
On Dec 7, 8:57 am, Mie
Does it work for one case at a time? Have you tried
q = request.GET.get('city')
properties = Property.objects.filter(city=q)
I would make sure it is working for each variable before combining
them together. (Maybe you already have, I don't know.)
Alex
On Dec 14, 5:32 pm, Osiaq wrote:
> Andy, I
You could also try the free online book. http://djangobook.com/
On Dec 22, 3:46 am, Amine wrote:
> Hi,
> I'm new in django and i'm searching a book :
> django 1.0 web site development PDF
>
> can u help me please !
> inhttp://my.softarchive.net/search/?q=django&x=0&y=0 I could not
> download it
Is the second line of your url function outdented? Maybe python thinks
your class is finished at that point? You could try indenting it?
If that doesn't fix it I would drop the decorator for now to see if
that fixes it. Then you could try dropping the body of the
get_absolute_url function and repl
Disclaimer:
Disabling the security stuff makes it really likely you'll get comment
spammed. You should set up some kind of akismet protection on the
backend if you disable the security.
If you don't want the checking then you probably want a custom comment
form.
You can use this method to setup a
Also, as I think more about this, are you sure you need static
generator? You might get sufficient speed just by using cache.
Premature optimization is bad
On May 6, 8:37 am, Alex Robbins wrote:
> Disclaimer:
> Disabling the security stuff makes it really likely you'll get commen
Just a thought, but if you are the only person using the url, you
could make your own self-signed security cert. It would be free and
protect your data. It won't show up as trusted to users, but your
other server can be set to accept it. (Assuming the lack of ssl is a
budget issue, that wouldn't fi
If you want something like the admin, that lets users view objects
from the database but not edit them, you could check out the
databrowse contrib app. It is kind of a read-only admin.
http://docs.djangoproject.com/en/dev/ref/contrib/databrowse/
Hope that helps,
Alex
On May 24, 3:49 pm, rahul ja
lling to add a self-signed cert as
> trusted.
>
> On May 24, 10:07 am, Alex Robbins
> wrote:
>
>
>
> > Just a thought, but if you are the only person using the url, you
> > could make your own self-signed security cert. It would be free and
> > protect your data
tion key registers as already in-use, not any sort of identity
> theft or loss of financial credentials.
>
> Mostly with this I'm just trying to make sure that I can prevent
> unauthorized users from using the API to make themselves free
> activation keys.
>
>
> On May 25,
If you are using 1.2, then you could make a TextField with an email
validator. That gets bonus points for using a new feature :)
http://docs.djangoproject.com/en/dev/ref/forms/validation/#using-validators
Alex
On May 26, 8:24 am, Jonathan Hayward
wrote:
> Thanks!
>
> On Wed, May 26, 2010 at 5:32
The way I've tested it in the past is:
GET the page, using the client. Scrape the values you need.
(BeautifulSoup makes this really easy, but you can do it with python's
builtin stdlib I guess.)
POST the comment message, along with all the values you just scraped.
Hope that helps,
Alex
On May 25
You should check out django-admin-tools [0]
It lets you make lots of changes to the admin index page.
Hope that helps,
Alex
[0]http://bitbucket.org/izi/django-admin-tools/wiki/Home
On May 25, 9:54 am, Dejan Noveski wrote:
> Hello,
>
> Is there a way i can group admin models from different applic
I think Daniel might mean you can also use the __file__ attribute, as
in:
>>> import django
>>> django.__file__
Hope that helps,
Alex
On May 28, 4:07 am, Daniel Roseman wrote:
> On May 28, 9:56 am, Derek wrote:
>
>
>
> > I have just upgraded my version of Ubuntu, which then also installed
> > P
Its been a while since I worked with a live db and unit tests for this
sort of thing, but I think this is how we did it:
Put the tests in a tests.py file in an app like normal, but for the db
test, inherit from the python test framework's UnitTest. That test
will not get a special test db, so be ve
Clark,
The reverse call just uses kwargs to find out which pattern it matches
to. If your url regex was r'^register/(?P\w+)/', then you
would pass kwarg1 as a kwarg to reverse. You are not trying to find a
url with a kwarg in the regex, so you shouldn't be adding that in the
reverse call. You just
I haven't tested this, but it seems like you could do it one of two
ways:
Define media root as a function in your settings.py. If you pass a
callable to the template, it will be called.
MEDIA_ROOTS = ['server1', 'server2', 'server3']
def MEDIA_ROOT():
from random import choice
return choic
You don't want to just copy site-packages. If you have any compiled
modules (pyyaml, PIL, etc) they won't work, since they were compiled
for the old version of python.
Alex
On Jun 8, 4:25 am, Nick wrote:
> Hi,
>
> I'm currently running Django on CentOS using the supplied Python 2.4.
> I now need
Celery is a python job queue system that a lot of people really like.
I think it would allow you to do the form processing asynchronously.
http://celeryproject.org/
Hope that helps,
Alex
On Jun 7, 11:31 pm, Chris Seberino wrote:
> I don't want Django site to block while form data is being proce
esh, in these bold
> new days of distribute and pip install.
>
> Bill
>
> On Tue, Jun 8, 2010 at 10:32 AM, Alex Robbins
> wrote:
>> You don't want to just copy site-packages. If you have any compiled
>> modules (pyyaml, PIL, etc) they won't work, since they wer
Chris,
The sites contrib app seems to address your use case.
http://docs.djangoproject.com/en/dev/ref/contrib/sites/
You could just add a foreign key to site in the second app and modify
the manager to only get items for the current site.
class SiteSpecificManager(db.Manager):
def get_query_se
It is probably better to use candidates.count(), rather than
len(candidates). len will cause the whole queryset to be loaded into
memory. It doesn't look like you use it later, so that is kind of a
waste.
Hope that helps,
Alex
>From django docs:
Note: Don't use len() on QuerySets if all you want
I recently ran into this same problem (I wanted to only show related
episodes that had been marked live). I ended up just making a method
on Podcasts to do it.
class Podcast(models.Model):
...some data fields...
def live_episodes(self):
return self.episode_set.filter(live=True)
class Epi
You can also use ./manage.py validate to get django to check over your
models. Sometimes syncdb or others will fail because of a model
validation issue.
Alex
On Jun 28, 3:20 pm, Jonathan Hayward
wrote:
> P.S. This problem did not resurface after I made other changes discussed
> elsewhere in the
Eduan,
This might be a little technical for a beginner, but you'll have to
learn sometime :)
Python looks for modules according to the python path. If your module
isn't available on the path, then you'll get an error like you are
seeing. I believe that manage.py adds the directory it is in to the
PostgreSQL is better supported by South, the leading django database
migration tool. It allows you to make schema altering migrations
within a transaction, so they can be rolled back if the migration
fails. On MySQL you are just left with a half-migrated database.
Also, if you are going to use muc
The ability to make multiple forms of the same type is a formset.
http://docs.djangoproject.com/en/1.2/topics/forms/formsets/#topics-forms-formsets
If you want those forms to represent models, then you want a model
formset.
http://docs.djangoproject.com/en/1.2/topics/forms/modelforms/#id1
Hope th
, I can add choices at the same time which
> eventually add records at two tables.
> I can add as many choices as I want by clicking at "Add another
> Choice".
> I would like to have same feature on my form which is outside the
> admin site. How can do that ?
>
> Than
Thomas,
MEDIA_URL isn't always defined in templates. Make sure that you have
the MEDIA context preprocessor installed:
http://docs.djangoproject.com/en/dev/ref/templates/api/#django-core-context-processors-media
Also, when you actually render the template, are you using
RequestContext? If you are
That probably means that the regex url pattern you defined for
feed_user in your urls.py file doesn't allow '.'
Hope that helps,
Alex
On Jul 22, 11:11 am, Roboto wrote:
> I didn't expect this to occur, but when I attempt
> {% url feed_user entry.username %}
>
> I will get a 500 error when the us
It sounds like you need to use url namespacing. When you include the
urls in your main urls.py file, add a namespace for each one. Then you
should be able to reverse them.
Define them:
http://docs.djangoproject.com/en/dev/topics/http/urls/#defining-url-namespaces
Reverse them:
http://docs.djangopr
If you need to edit the race and the candidates on the same page, and
the candidates are FK'ed to the race, I'd do it like this:
(Warning, just coding off the top of my head, might have bad syntax/
imports)
forms.py
-
from django import forms
from django.forms.models import modelf
Geopy has a distance function build in, if you want something a little
more widely used/tested:
http://code.google.com/p/geopy/wiki/GettingStarted#Calculating_distances
Alex
On Jul 29, 5:23 am, Alexandre González wrote:
> I've solved translating a JavaScript function to python:
>
> from math imp
Whenever I have to pull data from legacy databases, I use './manage.py
inspectdb > models.py'. That will dump models for the database. Then I
rename the models to make more sense, and use the orm to get my data.
Alex
On Jul 28, 12:58 pm, snipinben
wrote:
> I have the python-mysqldb installed alr
Based on the urls.py file you are showing us, it seems like /start/
should be a valid url.
Are you running the dev server with automatic reloading? Sometimes you
need to force a reload on it to see changes. (I normally notice that
in the admin, but it could come up anywhere stuff gets cached in
me
You could look here: http://djangopeople.net/us/ny/
Or try posting here: http://djangogigs.com/
or here: http://djangozen.com/jobs/
Hope that helps,
Alex
On Jul 29, 11:27 am, Ken wrote:
> Looking for a django developer in the NYC area!
> I would appreciate any help, if you know of anyone!
> Than
I think the problem is that your form doesn't have all the required
data. When you assign the instance, you provide initial data, and
something for form.save to modify. However, when the data is posted
back, It looks like maybe the non-editable fields aren't in the POST
data. You could add the fiel
contract_form.is_valid() looks at the data that was bound to the form.
This is normally the data in request.POST. It doesn't matter what a
form's initial data happened to be. It only matters what data you POST
back to it. If someone doesn't modify the form, then the initial and
the POSTed data are
Have you done any admin template customization? If you copied a
template from django before 1.2, then upgraded, your admin template
might be missing the csrf_token template tag.
Alex
On Aug 17, 7:55 am, PieterB wrote:
> For an internal application, I constantly receive CSRF verification
> failed
This is exactly the sort of issue that celery was created to solve. It
is a task queue management system.
http://celeryproject.org/
Alex
On Aug 14, 1:28 pm, ydjango wrote:
> I have a online user initiated synchronous process which runs anywhere
> between 1-5 minutes and gives user status messag
Maybe the ChoiceField should just be a CharField that just uses the
Select widget class? That way it won't have choices hardcoded into the
field validation. Your clean method could check that the domain is
valid.
Alex
On Aug 16, 1:39 pm, ringemup wrote:
> I have a domain search form with two fiel
Jonathan,
Pretty much any time you use __exact='text', you could use
='text' instead. I think the orm treats those two cases the
same. (It adds __exact if there isn't another lookup specified.
Alex
On Aug 25, 1:37 pm, Christos Jonathan Hayward
wrote:
> I think I found the problem; for the recor
If you define your models somewhere django doesn't expect, I think you
need to add the app_label in the model's Meta class.
http://docs.djangoproject.com/en/1.2/ref/models/options/#app-label
They mention the models submodule use case in the docs.
Hope that helps,
Alex
On Aug 30, 6:56 am, Daniel
I think Firebug can help with this. If you open the "Net" tab, you can
see the ajax requests. Then click on the ajax request that errored. I
think you can look at the exception in html down in the firebug
window, or possibly click open in new tab to see it bigger. I'm not
doing it right now, so my
Lance,
Regarding the many to many field that shows too many images:
I've used this project with some success in the past:
http://code.google.com/p/django-ajax-filtered-fields/
They allow you to setup some ajax filtering for the field, which can
make it a lot easier to find what you are looking fo
Lance,
I wouldn't worry too much about having empty fields vs an extra table
in your database. I think having data models that are easy to work
with is far more important than making sure you don't have fields that
are empty some time. I wouldn't worry at all about a field that is
empty a lot. I w
I think you'll definitely want to use ModelForms.
http://docs.djangoproject.com/en/dev/topics/forms/modelforms/
Alex
On Sep 20, 8:13 am, Federico Capoano wrote:
> Hi all,
>
> I try to explain it clearly.
>
> I have to develop an application that will implement similar
> functionality and look of
I would use the create_user[1] function, then you can just enter the
password, instead of the hash value. Might make your code a little
more readable.
Alex
[1]http://docs.djangoproject.com/en/dev/topics/auth/#creating-users
On Jan 6, 3:19 pm, Phlip wrote:
> > Google cannot find any traffic on t
Also, I think you'll need to make those relations to a class that
isn't abstract. Right now you have a 'class Meta: abstract=True' That
means your model doesn't really exist for the relations to link to.
Hope that helps,
Alex
On Jan 18, 2:26 am, Kerrick wrote:
> I'm trying to implement a linked
There is also an online version of one of the django books here:
http://djangobook.com/
On Jan 17, 5:08 pm, pfwd wrote:
> Thanks fantastic thank you
> I was also able to do:
> result = obj.task_set.aggregate(Count('id'))['id__count']
> to get the a count of the tasks for quote
>
> I don't suppose
Hmm, you posted the save method for your Event model, but not the
definition. I think you haven't gotten any feed back because no one
really knows what you are asking. Could you show the Event model, and
then show what a finished save should look like? What should the data
end up like?
Alex
On Ja
om/en/dev/ref/models/querysets/#id4
On Jan 18, 10:32 am, Alastair Campbell wrote:
> On Mon, Jan 18, 2010 at 2:59 PM, Alex Robbins
>
> wrote:
> > Hmm, you posted the save method for your Event model, but not the
> > definition. I think you haven't gotten any feed back becaus
It sounds like the databrowse[1] contrib app may be what you are
looking for. It is basically a read-only admin. You'll have to
register classes with it the same way you register with the admin, but
it might be nicer than trying to force the admin to be read-only.
Hope that helps,
Alex
[1] http:/
John,
I don't think the problem is as fixed as it appears. You probably
still have the foreign key in your database. Like Shawn said, syncdb
only adds new models as tables in the db. It doesn't do anything to
existing models. It won't delete a model that you delete, or change
fields on a model that
Daishy, it would help if you posted the template code you already
tried.
This is basically how you could do what you are describing:
base.html
{% block extrahead %}
{% endblock %}
sub_page.html
{% extends "base.html" %}
{% block extrahead %}
{{ block.super }}
include-tag and the
> extra js should be inserted into the extrahead-block. I hope thats a
> better example of what i want to do. Again, i wouldnt be suprised if
> thats not the right way, but is there a way to achive such seperation
> of the templates?
>
> On Feb 2, 4:41 pm, Alex Ro
If you are in development, you can just use django dev server. "./
manage.py runserver" from your project.
If you have deployed your app, then the best way to avoid restarting
is to use mod_wsgi's reloading feature.
If you deploy in daemon mode, you can just touch the wsgi file to
trigger a reload
1 - 100 of 118 matches
Mail list logo