Cheers Malcom, that sounds like solid advice.
Actually, I went through a few online Python tutorials a couple of
months ago, enough to write some basic apps. I had though that that
was going to carry my through this Django adventure but obviously I
need a brush up!
Cheers,
On Nov 24, 2:01 pm, M
OK,
So I posted a couple of days ago that I had finished implementing my
application's admin interface, and that I was really impressed. So
impressed, I was considering sticking with the Admin as the front end
for my entire app. (A sales quotation system).
A user on this site recommended that it
On Sun, 2008-11-23 at 22:22 -0800, sajal wrote:
> thanks a lot.. that fixed it.
>
> Even after making the mess that i made, a syncdb solved the issue
> keeping all my other data intact.
>
> I however have a related question.
>
> While modifying the existing classes, i.e. adding fields, i do th
thanks a lot.. that fixed it.
Even after making the mess that i made, a syncdb solved the issue
keeping all my other data intact.
I however have a related question.
While modifying the existing classes, i.e. adding fields, i do the
"ALTER TABLE" by hand as suggested by
http://www.djangobook.co
On Sun, 2008-11-23 at 21:52 -0800, Andy Young wrote:
> Hi all,
>
> I've attempted a shortcut in an {% ifequal %} tag and ran into some
> unexpected consequences. Basically, I have two DateFields in a model
> named begin_date and end_date. I am iterating through field names
> ({{ f }}) and thei
On Sun, 2008-11-23 at 21:47 -0800, sajal wrote:
> Apologies for the lack of details, didnt really know what details to
> provide.
>
> Here is what I did.
Good step-by-step accounting of what you did. Makes it easy to spot
where the problem is.
> 2 users (one superadmin and one regular user)
>
Hi all,
I've attempted a shortcut in an {% ifequal %} tag and ran into some
unexpected consequences. Basically, I have two DateFields in a model
named begin_date and end_date. I am iterating through field names
({{ f }}) and their corresponding values ({{ item|getattr:f }}) to
populate a webpag
Apologies for the lack of details, didnt really know what details to
provide.
Here is what I did.
2 users (one superadmin and one regular user)
make a new "app" and add few models to it.
Assign permission for the new models class to the staff user via the
django admin interface.
modify the exist
Andy,
Thanks. That was exactly what I was looking for.
I'll be sure to check out that link too.
On Nov 24, 1:35 pm, Andy Young <[EMAIL PROTECTED]> wrote:
> On Nov 23, 8:31 pm, dash86no <[EMAIL PROTECTED]> wrote:
>
> > Is there no way to call all models implicitly. For example:
>
> > from mysite
On Sun, 2008-11-23 at 20:47 -0800, sajal wrote:
> +1
>
> Having exactly the same issue. Last night i was busy adding classes
> and stuff, after uploading to the dev server, im unable to add
> permissions to a "staff" user since the new class isint in the list.
>
> me (superuser) can see it allr
On Sun, 2008-11-23 at 20:26 -0800, watusee wrote:
> Picture a site with a flatpage at the root. This root flatpage in the
> admin tool has a "/" for the URL. The root flatpage gets into a
> redirect loop. All other flatpages except the root flatpage work fine.
> If Append_Slash is set to false, t
On Sun, 2008-11-23 at 19:31 -0800, dash86no wrote:
> I have around 15 or so models in my system, and I find it pretty
> tedious to have to explicitly import each and every one into my
> forms.py etc.
>
> Is there no way to call all models implicitly. For example:
>
> from mysite.myapp import mo
+1
Having exactly the same issue. Last night i was busy adding classes
and stuff, after uploading to the dev server, im unable to add
permissions to a "staff" user since the new class isint in the list.
me (superuser) can see it allright. For now ill make the "staff" a
superuser until i can find
On Nov 23, 8:31 pm, dash86no <[EMAIL PROTECTED]> wrote:
> Is there no way to call all models implicitly. For example:
>
> from mysite.myapp import models
> PS. I tried looking round the documentation. I found
> this:http://www.djangobook.com/en/1.0/chapter08/
>
> from django.conf.urls.defaults im
Picture a site with a flatpage at the root. This root flatpage in the
admin tool has a "/" for the URL. The root flatpage gets into a
redirect loop. All other flatpages except the root flatpage work fine.
If Append_Slash is set to false, this perplexing behavior no longer
occurs and the root flatp
btw this requires that you use render_to_response with the 3rd
argument, context_instance=RequestContext(request)
see docs.
http://docs.djangoproject.com/en/dev/ref/templates/api/?from=olddocs
session docs
http://docs.djangoproject.com/en/dev/topics/http/sessions/#topics-http-sessions
On Nov 23
I just solved this issue. I did by using using sessions.
I initialize this in a couple of views.
request.session['last'] = request.get_full_path()
If a user tries to do something restricted it requires them to login
which I do the same exact way you do.
After they login they get redirected to
Has anyone tried or been successful implementing authentication with
clien certificates i.e. PKI x.509 user certs ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send ema
I'm trying to make use inlineformset_factory to add several data on an
object at the sime time. I want to show 5 extra forms but when I view
it in browser it only shows 1formsets instead of 5.
Here's my view code:
formset = inlineformset_factory(PackagingReport, PeopleProblem,
max_num=0,
On Nov 23, 9:00 pm, waltbrad <[EMAIL PROTECTED]> wrote:
> On Nov 22, 9:09 pm, waltbrad <[EMAIL PROTECTED]> wrote:
>
> > I'm working with James Bennet's book Practical Django Projects. He
> > puts a tiny_mce text editor into the admin flatpage interface.
>
>
Just want to chime in one more time to
I have around 15 or so models in my system, and I find it pretty
tedious to have to explicitly import each and every one into my
forms.py etc.
Is there no way to call all models implicitly. For example:
from mysite.myapp import models
PS. I tried looking round the documentation. I found this:
h
On Nov 22, 9:09 pm, waltbrad <[EMAIL PROTECTED]> wrote:
> I'm working with James Bennet's book Practical Django Projects. He
> puts a tiny_mce text editor into the admin flatpage interface.
>
> I have this in the change_form.html, (at the proper place, I
> checked it umpteen times):
> =
Here's a third option that I've found useful when wanting to run a
cron job:
http://blog.capstrat.com/articles/making-django-environmentally-friendly/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gr
On Sun, 2008-11-23 at 12:42 -0700, Dj Gilcrease wrote:
> You should not have both;
> (r'^$', include('basicBlog.blog.urls')),
> (r'^blog/', include('basicBlog.blog.urls')),
>
> since now your reverse is going to match two diffrent URL,
> /2008/nov/21/secondPost/
> and
> /blog/2008/
On Sun, 2008-11-23 at 07:56 -0800, oleg wrote:
> Sorry, I forgot to put it :)
>
> view.py:
> def add(request):
> return create_object(request, Firm)
>
> def edit(request, key):
> return update_object(request, Firm, key)
>
>
> models.py:
> INDUSTRIES_CHOICES= set([('1','Авто'), ('2','А
On Sun, 2008-11-23 at 03:33 -0800, gv wrote:
> Hello
>
> I'm constucting a table in the Django template language, and have this
> problem. When there is no value (from the dictionary generated by the
> view), I would like to fill in -1 like this:
>
> {{ item.ActiveSessions|default:"-1" }}
>
>
One thing that has bitten me more times than I care to remember is
forgetting to disable DEBUG in settings.py before processing large
datasets. The SQL queries build up in connection.queries until the
process dies. I ended up patching my django install to store queries
in a wrapper around buffer
It seems to be an issue with upgrading. I did try your suggestion
(thank you!) but to no avail. I receive the same redirect message. Is
anyone else using the flatpages for the root url of their web site
with 1.02?
Thank you!
-r
On Nov 23, 3:48 pm, derek73 <[EMAIL PROTECTED]> wrote:
> try replac
On Sun, Nov 23, 2008 at 6:42 PM, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I'm one of the developers of Rancho (www.getrancho.com)
>
> One of our users reported a problem using mysql and unicode with we
> haven't been able to solve.
>
> Here is the traceback: http://dpaste.com/9
Try doing Legacy.objects.all().iterator(), this isn't technically the
public API, but this grabs the results at a lower level, so it doesn't
get cached.
On Nov 23, 5:44 pm, derek73 <[EMAIL PROTECTED]> wrote:
> I have written a management script to migrate data from an existing
> site into our new
I'm exploring whether or not to use Django for redesigned website and
the only thing I haven't really been able to find out is whether there
is an existing, portable, robust solution for advertising management
on the site. This would need to control what advertising goes where,
track its performan
I have written a management script to migrate data from an existing
site into our new Django-powered site. The script runs fine with one
exception, memory consumption. A few of the tables I need to migrate
have around 250,000 records, and it seems that the Django ORM caches
each record in memory a
Hello,
I'm one of the developers of Rancho (www.getrancho.com)
One of our users reported a problem using mysql and unicode with we
haven't been able to solve.
Here is the traceback: http://dpaste.com/93163/
Any help is appreciated.
Best regards,
Luis
--~--~-~--~~~
try replacing:
(r'', include('django.contrib.flatpages.urls')),
with
(r'^$', include('django.contrib.flatpages.urls')),
On Nov 23, 6:48 am, watusee <[EMAIL PROTECTED]> wrote:
> Upgraded from 96 to 1.02. My home/root (at 127.0.0.1/) page (using
> flatpages) now doesn't work using runserver. O
Thanks.
I ignore the compile errors but the problem is the second part; my web
site shows 'Internal Error' and I get those messages in apache error
log.
On Nov 23, 3:37 pm, Jeff Anderson <[EMAIL PROTECTED]> wrote:
> lazyant wrote:
> > Hello,
>
> > I've been running django 0.96.3 installed from t
lazyant wrote:
> Hello,
>
> I've been running django 0.96.3 installed from the tar file for over
> half a year without problems, I'm using python 2.3.4 on CentOS 4.
>
> I'm trying to upgrade to 1.0.2 from tar file and after running 'sudo
> python setup.py install' I get about 20 byte-compiling erro
Hello,
I've been running django 0.96.3 installed from the tar file for over
half a year without problems, I'm using python 2.3.4 on CentOS 4.
I'm trying to upgrade to 1.0.2 from tar file and after running 'sudo
python setup.py install' I get about 20 byte-compiling errors, they
are all syntax er
excellent! that was indeed the issue - thank you both for your
explanations.
On Nov 23, 2:42 pm, "Dj Gilcrease" <[EMAIL PROTECTED]> wrote:
> You should not have both;
> (r'^$', include('basicBlog.blog.urls')),
> (r'^blog/', include('basicBlog.blog.urls')),
>
> since now your reverse
You should not have both;
(r'^$', include('basicBlog.blog.urls')),
(r'^blog/', include('basicBlog.blog.urls')),
since now your reverse is going to match two diffrent URL,
/2008/nov/21/secondPost/
and
/blog/2008/nov/21/secondPost/
thus cause the NoReverseMatch error since reverse sho
I see that you are using two url prefixes ("/" and "/blog") for the same
functionality. This probably is the reason why reverse() feels confused and
throws NoReverseMatch exception.
To avoid this situation you should use only one url prefix for accessing
blog functionality.
You can achive it eithe
On Nov 22, 9:37 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sat, 2008-11-22 at 18:09 -0800, waltbrad wrote:
>
> [...]
>
> > # Uncomment the next line to enable the admin:
> > (r'^admin/(.*)', admin.site.root),
> > (r'^tiny_mce/(?P.*)$', 'django.views.static.serve',
> > { 'd
I'm not sure I understand what you're suggesting - can you provide a
brief example, or highlight the specific lines where this change would
go?
On Nov 23, 12:35 pm, "Valts Mazurs" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Quick solution: use redirect from "/" to "/blog" or vice versa.
>
> --
> Valt
Hi guys,
I am one of the developers for TurnKey Linux, an opensource project
that aims to develop high-quality software appliances that are easy to
use, easy to deploy, and free. Our motto is "everything that can be
easy, should be easy!"
We recently released TurnKey Django, an easy-to-use, ligh
Hello,
Quick solution: use redirect from "/" to "/blog" or vice versa.
--
Valts
On Sun, Nov 23, 2008 at 19:16, goblue0311 <[EMAIL PROTECTED]> wrote:
>
> This post is an update to "NoReverseMatch question", which was an epic
> fail in terms of resolving my issue. I blame myself for posting an
>
This post is an update to "NoReverseMatch question", which was an epic
fail in terms of resolving my issue. I blame myself for posting an
overly complex question. I will try again...
I am trying to use reverse( ) in this manner:
>> python manage.py shell
>> from django.core.urlresolvers import r
Sorry, I forgot to put it :)
view.py:
def add(request):
return create_object(request, Firm)
def edit(request, key):
return update_object(request, Firm, key)
models.py:
INDUSTRIES_CHOICES= set([('1','Авто'), ('2','Авиа')])
class Firm(db.Model):
name= db.StringProperty(required=True
In continuation to my previous query
It works absolutely fine with "daemonize=false". I dont why?
On Nov 23, 7:50 pm, madhav <[EMAIL PROTECTED]> wrote:
> Hello everybody,
> I am struck with a very-weird problem. I am unable to import any view/
> module from my urls.py. This problem is ONLY wh
getattr is definitely preferable to self.__class__.__dict__
--Ned.
http://nedbatchelder.com
Henry Andrews wrote:
> I've aways been under the impression that direct use of __dict__ was
> discouraged. Something along the lines of __dict__ being an
> implementation detail while getattr and hasattr
Hello everybody,
I am struck with a very-weird problem. I am unable to import any view/
module from my urls.py. This problem is ONLY when I run the webserver
(lighttpd). When I run my app server(without lighttpd) alone, I wont
be getting any exception/500 screen. Every url/view gets properly
execu
Upgraded from 96 to 1.02. My home/root (at 127.0.0.1/) page (using
flatpages) now doesn't work using runserver. Other flatpages are
working fine. The entry in the urlconf looks like this:
urlpatterns = patterns('',
#(r'^works/$', 'django.views.generic.list_detail.object_list', dict
(work_dict
I've aways been under the impression that direct use of __dict__ was
discouraged. Something along the lines of __dict__ being an
implementation detail while getattr and hasattr are the proper
interfaces. But I might be wrong.
thanks,
-henry
On Nov 22, 4:07 am, "Steve McConville" <[EMAIL PROTEC
On Sun, Nov 23, 2008 at 6:31 AM, dash86no <[EMAIL PROTECTED]> wrote:
> So what passes the poll context variable to the template? This isn't
> done explicitly, right? How is the variable name determined?
It's explicitly passed. There are some variables that are populated
implicitly based on the
Hello
I'm constucting a table in the Django template language, and have this
problem. When there is no value (from the dictionary generated by the
view), I would like to fill in -1 like this:
{{ item.ActiveSessions|default:"-1" }}
However, only the cells that get values are filled in, if no va
Thanks for the reply David.
So what passes the poll context variable to the template? This isn't
done explicitly, right? How is the variable name determined?
Cheers,
On Nov 23, 8:25 pm, "David Zhou" <[EMAIL PROTECTED]> wrote:
> The key is the sentence above that snippet on that page:
>
> "Given
The key is the sentence above that snippet on that page:
"Given the context variable poll"
'poll' is a variable passed into the template context. If you called
that variable 'a_poll', you could've done:
{{a_poll.question}}
As for choice, notice the line:
{% for choice in poll.choice_set.all
http://docs.djangoproject.com/en/dev/intro/tutorial03/#intro-tutorial03
I'm following the above tutorial, and I'm confused with the following
section:
{{ poll.question }}
{% for choice in poll.choice_set.all %}
{{ choice.choice }}
{% endfor %}
The 'poll' and 'choice' are referred to wit
On Nov 23, 5:19 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> You might also be able to write
>
> coll.members.order_by('membership_set')
Works (with a small modification)! In order to get template for loops
working I wrapped this in a Collection method:
class Collection(models.Mod
57 matches
Mail list logo