I'm not sure what happened to my previous reply, maybe i sent it to
you directly, lol.. I'm new.
but i think this is what you want:
http://docs.djangoproject.com/en/dev/ref/generic-views/?from=olddocs#django-views-generic-simple-direct-to-template
urlpatterns = patterns('django.views.generic.si
Hey, I'm new to this group, but I believe you want generic views,
specifically:
django.views.generic.simple.direct_to_template
http://docs.djangoproject.com/en/dev/ref/generic-views/?from=olddocs#django-views-generic-simple-direct-to-template
which would give you something like this:
urlpatter
Hi,
I am implementing an i18n for a web application. The customer requires
support for certain Indian languages such as Hindi and Tamil. I had
refered to http://www.i18nguy.com/unicode/language-identifiers.html
for identifying the respective language codes. I am not able to get it
working for Hin
On Oct 21, 4:12 am, "yuanyun.ken" <[EMAIL PROTECTED]> wrote:
> Hi,all great Django users and developers, I have a little problem.
> In URL dispatcher, is there a way to pass values of Named Groups
> directly to template, don't want to write a view function just for
> this.
> for example, I have th
On Oct 21, 4:26 am, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On Mon, Oct 20, 2008 at 9:30 PM, Chuck22 <[EMAIL PROTECTED]> wrote:
> > Adding context_instance=RequestContext(request) to the method fixed
> > the problem. Seems this should be done by default for
> > render_to_response method. Than
On Oct 21, 6:45 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> Are there something in Django ORM or contrib to do "acts_as" like in
> RoR or Elixir (SqlAlchemy). Example :
>
> http://elixir.ematia.de/apidocs06/elixir.ext.htmlhttp://elixir.ematia.de/apidocs06/elixir.ext.list.html
>
>
Sounds like it is, will try it out soon.
Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group
You can define image upload path at runtime (check manual for
ImageField)
def get_photo_path(instance, filename):
return 'static/upload_to/photos/%s' % instance.name
class ProductImage(models.Model):
name = models.CharField(max_length=50)
file = models.ImageField(upload_to= get_photo
Thanks a lot for your help everyone...those are great resources.
On Oct 12, 5:50 am, Tim Chase <[EMAIL PROTECTED]> wrote:
> > I have an array and I want to use Django templating to display each
> > item in a table, grouped by 3 per row.
> > For example, if i have
> > arr = ["a", "b", "c", "d",
Hi,
Are there something in Django ORM or contrib to do "acts_as" like in
RoR or Elixir (SqlAlchemy). Example :
http://elixir.ematia.de/apidocs06/elixir.ext.html
http://elixir.ematia.de/apidocs06/elixir.ext.list.html
In Elixir, when I add acts_as_list(qualifier=qualify) in Model I can
use move_h
Thanks Karen! Worked great. =)
On Mon, Oct 20, 2008 at 9:45 PM, Karen Tracey <[EMAIL PROTECTED]> wrote:
> On Tue, Oct 21, 2008 at 12:30 AM, Josiah <[EMAIL PROTECTED]>wrote:
>
>>
>> Ive set up a simple model for a Cruise. It has a cruise date, and
>> time. Im trying to pass a datetime.date as the
On Tue, Oct 21, 2008 at 12:30 AM, Josiah <[EMAIL PROTECTED]>wrote:
>
> Ive set up a simple model for a Cruise. It has a cruise date, and
> time. Im trying to pass a datetime.date as the date parameter which is
> defined in the model as models.DateField(). I get the following error
> constantly, an
Ive set up a simple model for a Cruise. It has a cruise date, and
time. Im trying to pass a datetime.date as the date parameter which is
defined in the model as models.DateField(). I get the following error
constantly, and cant figure out what it wants me to do.
im using sqlite as the temporary l
Hi,all great Django users and developers, I have a little problem.
In URL dispatcher, is there a way to pass values of Named Groups
directly to template, don't want to write a view function just for
this.
for example, I have the following urls:
(r'^machine_logs/$', direct_to_template, {'templa
On Mon, Oct 20, 2008 at 9:30 PM, Chuck22 <[EMAIL PROTECTED]> wrote:
> Adding context_instance=RequestContext(request) to the method fixed
> the problem. Seems this should be done by default for
> render_to_response method. Thank you.
It would be technically impossible to do this; render_to_respon
Adding context_instance=RequestContext(request) to the method fixed
the problem. Seems this should be done by default for
render_to_response method. Thank you.
On Oct 20, 4:36 am, Christian Joergensen <[EMAIL PROTECTED]> wrote:
> Chuck Bai2 wrote:
> > Here is my view code:
>
> > def contact(requ
I have a ModelForm:
RequestForExtensionForm
which is built from a model:
RequestForExtension
Basic stuff so far...
The RequestForExtension model has a ForeignKey to the Unit model (Unit
is a study course offered that a student can request an extension on
via this form)
My problem is that in Un
On Oct 21, 2008, at 5:38 AM, timc3 wrote:
>
> So I have a model that looks like this:
>
> class GroupsOfUser(models.Model):
>name = models.CharField(_("Name"), max_length=50)
>description = models.TextField(_("Description"), blank=True,
> help_text=_("Optional"))
>slug = models.SlugF
> Is anyone
> familiar with a django or python tutorial that shows how to implement
> some kind of file upload progress bar?
Sorry, but the main magic in those uploaders is done via flash, not
via js or php. AFAIK there is currently no sane (though you may use
Java ;-)) way to do it otherwise.
--
So I have a model that looks like this:
class GroupsOfUser(models.Model):
name = models.CharField(_("Name"), max_length=50)
description = models.TextField(_("Description"), blank=True,
help_text=_("Optional"))
slug = models.SlugField()
group_members = models.ManyToManyField(User,
On Mon, Oct 20, 2008 at 5:15 PM, projecktzero <[EMAIL PROTECTED]>wrote:
>
> I'm pretty new to Django. I'm having trouble getting my Django
> app/web-site to run under Apache2 and Mod_Python. I'm running Django
> 0.96. I installed Apache2 and Mod_Python and tested both, and they
> seem to work prop
On Mon, Oct 20, 2008 at 5:10 PM, AdamC <[EMAIL PROTECTED]> wrote:
>
> 2008/10/20 Karen Tracey <[EMAIL PROTECTED]>:
> > On Mon, Oct 20, 2008 at 4:36 PM, AdamC <[EMAIL PROTECTED]> wrote:
> >>
> >> I'm running the latest checkout using svn as per the download
> >> instructions on the djangoproject si
2008/10/20 Karen Tracey <[EMAIL PROTECTED]>:
> On Mon, Oct 20, 2008 at 4:36 PM, AdamC <[EMAIL PROTECTED]> wrote:
>>
>> I'm running the latest checkout using svn as per the download
>> instructions on the djangoproject site.
>>
>
> OK, now that you've confirmed that and I take a closer look at the
I'm pretty new to Django. I'm having trouble getting my Django
app/web-site to run under Apache2 and Mod_Python. I'm running Django
0.96. I installed Apache2 and Mod_Python and tested both, and they
seem to work properly.
In my http.conf, I have the following:
Python Path "['/usr/local/apac
Thanks!
On Oct 20, 4:37 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Mon, Oct 20, 2008 at 10:23 AM, pantagruel <[EMAIL PROTECTED]>wrote:
>
>
>
>
>
> > Hi,
>
> > I can connect via the mysql console to the database, my service is
> > running. however when I try to do syncdb from Django I get
On Mon, Oct 20, 2008 at 4:36 PM, AdamC <[EMAIL PROTECTED]> wrote:
>
> I'm running the latest checkout using svn as per the download
> instructions on the djangoproject site.
>
>
OK, now that you've confirmed that and I take a closer look at the
erroryou have:
{%url films.views.edit_film_list
I have a template block tag {% ifactive %} that lets you highlight the
currently active page using similar syntax as the {% url %} tag (i.e.,
you can specify urlpattern names and arguments in the same way), e.g.:
Page 1
Page 2
...
Page N
The code for this is at http://demo.apture.com/demo/ifacti
2008/10/20 Karen Tracey <[EMAIL PROTECTED]>:
> 2008/10/20 AdamC <[EMAIL PROTECTED]>
>>
>> They all import fine.
>>
>> I do have @login_required at the beginning of a few functions. Has
>> this changed since v1.0?
>
> You mean since 0.96? It certainly hasn't changed since 1.0, and I don't
> believ
Thanks, that's just the solution I was looking for!
Just out of curiosity, is it also possible to do this for many-to-many
relationships?
On Oct 20, 2:09 pm, Daniel Roseman <[EMAIL PROTECTED]>
wrote:
> On Oct 20, 6:07 pm, "Andy Lei" <[EMAIL PROTECTED]> wrote:
>
>
>
> > Sorry if this is a repost,
2008/10/20 AdamC <[EMAIL PROTECTED]>
> They all import fine.
>
> I do have @login_required at the beginning of a few functions. Has
> this changed since v1.0?
>
You mean since 0.96? It certainly hasn't changed since 1.0, and I don't
believe @login_required was changed between 0.96 and 1.0. (If
Hello,
I am using the latest svn-revision 9236 and tried to use a callable in
the upload_to parameter of the ImageField.
The explanation in the django-docs for the instance-parameter of a
callable says the following:
> An instance of the model where the FileField is defined. More specifically,
2008/10/20 Jarek Zgoda <[EMAIL PROTECTED]>:
>
> Wiadomość napisana w dniu 2008-10-19, o godz. 21:19, przez AdamC:
>
In template /home/adam/apps/films/templates/includes/nav.html, error
at line 1
Caught an exception while rendering: Reverse for
'films.films.views.edit_film_list'
Something that is in a different direction, but might do the trick:check
out http://code.google.com/p/django-batchadmin/
You could select multiple "children" and create an "add to parent..." action
for it.
Hope it helps,
TiNo
On Mon, Oct 20, 2008 at 8:45 PM, endi <[EMAIL PROTECTED]> wrote:
>
>
My database model includes a ForeignKey relationship. I'm writing the
admin.py.
We have a lot of "children" and "parents". The expected workflow is:
create children one by one, then create parent, then add children to
the parent. The heaviness of the "child" model makes it unfit for
inline editin
Hi,
I'm trying to save a thumbnail image when I save a picture in one of
my models. But I have three problems.
1. I can successfully create the thumbnail image, but I cannot link it
in my database.
2. Is there a better way to name the thumbnail image?
3. When the save function is called, the i
Hi,
I'm wanting to reduce an unneeded query from my page views in my
project caused from Django's built-in auth_messages. I'm looking for
the best solution to do this while still allowing me to use contrib/
auth and the admin.
The source of the query comes from the 'auth' context processor, I
b
I had trouble installing PIL on my Mac with 10.5 Leopard.
I always got an : "Upload a valid image. The file you uploaded was
either not an image
or a corrupted image."
I searched to groups for answer but it seems that others were also
having this problem.
For those who are still looking for a s
On Oct 20, 6:07 pm, "Andy Lei" <[EMAIL PROTECTED]> wrote:
> Sorry if this is a repost, i don't think my last message got through:
> I have two models:
> class Reporter(models.Model):
> pass
>
> class Article(models.Model):
> reporter = models.ForeignKey(Reporter)
>
> Let's say I have the p
On Oct 18, 3:40 am, Torsten Bronger <[EMAIL PROTECTED]>
wrote:
> I try to achieve the following HTML table layout:
>
> .+--+---+
> .| 1 | |
> .+--+---+
> .| 2 | |
> .+--+---+
> .| 3 |
Hi! I am trying to use django-navbar app[0], but I am getting troubles
because it seems to be pre 1.0. Does anyone know about it? Does any one
use it with django 1.0?
Thanks,
Juanjo
[0] http://code.google.com/p/django-navbar/
--
mi blog: http://www.juanjoconti.com.ar
--~--~-~--~
Sorry if this is a repost, i don't think my last message got through:
I have two models:
class Reporter(models.Model):
pass
class Article(models.Model):
reporter = models.ForeignKey(Reporter)
Let's say I have the pk of a reporter object. Can I assign the reporter
attribute of the Articl
Hi,
well, I'm new to django (coming from rails hehe), and I'm trying to
develop using a test-driven approach. I'm facing a problem trying to
emulate an existing session in a "functional" test.
There is a related problem here (http://groups.google.com/group/django-
users/browse_thread/thread/701
A better starting point might be
http://docs.djangoproject.com/en/dev/topics/email/
which the OP will already have seen if he followed Karen's advice.
regards
Steve
megrez80 wrote:
> Start here: http://www.python.org/doc/2.5.2/lib/module-smtplib.html .
>
> Ken
>
>
> On Oct 19, 2:04 am,
As I said in my post, I put it up on a non-dev server (lighttpd/fcgi
setup with mediatemple) because I know dev server can't handle it.
On Oct 20, 11:56 am, Ivan Sagalaev <[EMAIL PROTECTED]> wrote:
> truebosko wrote:
> > What I found though, is that the view that is being called from JS
> > will
Excellent, many thanks TiNo!
On Oct 20, 12:39 am, TiNo <[EMAIL PROTECTED]> wrote:
> In django admin, there is a save_as option.
>
> seehttp://docs.djangoproject.com/en/dev/ref/contrib/admin/#save-as
>
> You could also save revisions of objects.
> Check:http://code.djangoproject.com/wiki/FullHi
I've found several file upload progress bar applications, but the
source code is usually written in php (like http://www.swfupload.org/
and http://www.pixeline.be/experiments/jqUploader/). Is anyone
familiar with a django or python tutorial that shows how to implement
some kind of file upload pro
Hi,
This thread
http://groups.google.com/group/django-users/browse_frm/thread/56b0a150a777333a
seems to reply to this question... but all sources pasted in the
http://dpaste.com site are no more available...
Is anybody still have theme.
Thanks,
Gerald
--~--~-~--~~~
truebosko wrote:
> What I found though, is that the view that is being called from JS
> will finally have access to the session variable after the upload is
> complete
Looks like you're doing it with development server. It's single-process
and can't handle and upload and another view simultaneou
On Oct 20, 12:28 pm, Daniel Roseman <[EMAIL PROTECTED]>
wrote:
> On Oct 20, 11:12 am, simong <[EMAIL PROTECTED]> wrote:
>
>
>
> > if request.method == 'POST':
> > orderform = OrderForm(request.POST)
> > if orderform.is_valid():
> >
Hi,
On Wed, Oct 15, 2008 at 01:46:38PM -0700, bmt wrote:
> my problem is that when this list is empty i want to branch in the
> template, and display some sort of message, instead of the usual 'for'
> loop which would display the returned list. since i can't assign the
> returned list to a variab
On Mon, Oct 20, 2008 at 10:23 AM, pantagruel <[EMAIL PROTECTED]>wrote:
>
> Hi,
>
> I can connect via the mysql console to the database, my service is
> running. however when I try to do syncdb from Django I get:
>
> _mysql_exceptions.OperationalError: (2003,"Can't connect to MySQL
> server on 'lo
DanJ schrieb:
> Hi,
>
> I'm new to Django so please pardon my ignorance.
> I've just installed Django 1.0 from SVN. I'm trying to follow the
> tutorial, while at the same time use Apache and mod_python.
>
> When I point my browser to the admin site I get a simple text version,
> as if it missing t
Sorry, found this: http://code.djangoproject.com/ticket/6432
I think I will probably just denormalize.
Erik
On 20.10.2008, at 17:22, Erik Allik wrote:
>
> I've a feeling that this has been brought up before so my apologies
> just in case my feeling is right!
>
> I'm doing a qs = MyModel.object
Start here: http://www.python.org/doc/2.5.2/lib/module-smtplib.html .
Ken
On Oct 19, 2:04 am, Net_Boy <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am doing a new project and (doing a function that checks for a
> specific event, if it happened then the system should send email to
> the user?
Hi,
I can connect via the mysql console to the database, my service is
running. however when I try to do syncdb from Django I get:
_mysql_exceptions.OperationalError: (2003,"Can't connect to MySQL
server on 'localhost' (10061)")
My current test Django settings.py says:
DATABASE_ENGINE = 'mysq
I've a feeling that this has been brought up before so my apologies
just in case my feeling is right!
I'm doing a qs = MyModel.objects.all().select_related("foobars") where
foobars is a m2m relation. Later when doing qs_item.foobars.all(), a
database hit is generated. Is this a bug, a featu
Hey Rajesh,
Thank you so much for your comment. Somehow Google didn't sent me a
message that I had a reply on my post, so that's why I'm late with my
reply.
I think your solution looks neat, but this way I would still need 2
ajax requests wouldn't I?
Doesn't self.options.pop('fields', None) del
What is the best reasuable way of implementing Sorting on each field
and filtering
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.
Hi there,
I wrote a previous post but I have discovered a bit more since. Here's
my situation:
What I'm trying to do: Write a custom upload handler that allows me to
intercept it with Javascript calls and return a simple progress upload
bar to the user.
What is happening: The custom upload hand
kele schrieb:
> i just try to make my first authenticate codes . but while in the
> line
> ' login(request, v) ' , i got this runtime error , and
> 'maximum recursion depth exceeded'.
>
> but i do not have any loop there . why ??? help .
>
>
you call login() inside login():
> def log
sorry . i blow myself up ! i redefine the login function . ignore
me .
On Oct 20, 7:41 pm, kele <[EMAIL PROTECTED]> wrote:
> i just try to make my first authenticate codes . but while in the
> line
> ' login(request, v) ' , i got this runtime error , and
> 'maximum recursion depth exce
i just try to make my first authenticate codes . but while in the
line
' login(request, v) ' , i got this runtime error , and
'maximum recursion depth exceeded'.
but i do not have any loop there . why ??? help .
my codes r shown as below :
def login(request ,template_name):
f
Thanks for the quick response Daniel!
The only self-referencing import I can see is that __init__.py is
importing a model from the apps models.py:
[EMAIL PROTECTED]:~/ibd$ grep -n -r granular granular_permissions/
granular_permissions/__init__.py:8:from granular_permissions.models
import Permiss
On Oct 20, 12:26 pm, Will Boyce <[EMAIL PROTECTED]> wrote:
> I was throwing together a (supposedly quick!) project today to gather
> some information from customers, however I hit a stumbling block a
> while back and I now feel like I'm banging my head on a brick wall..
>
> I've modified the syncd
On Oct 20, 11:12 am, simong <[EMAIL PROTECTED]> wrote:
> if request.method == 'POST':
> orderform = OrderForm(request.POST)
> if orderform.is_valid():
> preorder = orderform.save(commit=False)
> orderno = '%04
I was throwing together a (supposedly quick!) project today to gather
some information from customers, however I hit a stumbling block a
while back and I now feel like I'm banging my head on a brick wall..
I've modified the syncdb process to be a bit more verbose:
..snip..
Loading granular_permi
On 19.10-11:37, Jorge Romo wrote:
[ ... ]
> I want to validate a form, but it has several different options. It
> has to take a value_a and the see if it is bigger, smaller or equal to
> another value_b. The issue (or maybe not :p) is that the value_b is
> entered by the user, so it is always diff
I have a model like this:
class OrderProfile(models.Model):
cartid = models.CharField(max_length=128, null=True, blank=True)
orderno = models.CharField(max_length=48, null=True, blank=True)
userid = models.CharField(max_length=128, null=True, blank=True)
userfirstn
I guess it was easier for me to type it myself than search through the
new documentation. :)
Erik
On 20.10.2008, at 5:49, James Bennett wrote:
>
> On Sun, Oct 19, 2008 at 4:20 PM, Erik Allik <[EMAIL PROTECTED]> wrote:
>> In the compilation function of your template tag, you can force the
>> p
Wiadomość napisana w dniu 2008-10-20, o godz. 04:42, przez tvaughan:
>>> I'm definitely ok with admins having to create another account to
>>> use
>>> the site. The two pools of users seems to me to be totally unique,
>>> and
>>> shouldn't overlap in anyway.
>>
>> Just do not set is_staff for
Chuck Bai2 wrote:
> Here is my view code:
>
> def contact(request):
> form = ContactForm() # An unbound form
> return render_to_response('contact.html', {
> 'form': form,
> })
> My contact form page rendered but without all the media files(CSS files,
> Javascripts files, im
Wiadomość napisana w dniu 2008-10-19, o godz. 21:19, przez AdamC:
>>> In template /home/adam/apps/films/templates/includes/nav.html, error
>>> at line 1
>>> Caught an exception while rendering: Reverse for
>>> 'films.films.views.edit_film_list' with arguments '()' and keyword
>>> arguments '{}' n
On Mon, Oct 20, 2008 at 1:50 AM, Low Kian Seong <[EMAIL PROTECTED]> wrote:
> Just curious but has anyone done this is a production environment?
Used raw_id_fields? Written a custom widget and used it in the admin?
In my case, yes to both questions - although I'm not sure of the
significance of a
On Sun, Oct 19, 2008 at 5:06 PM, zobbo <[EMAIL PROTECTED]> wrote:
>
> When a test fails and another test then runs, it dies because the
> transaction is in error. The field with too many chars fails and that
> causes the next test to raise an error. If you switch the backend to
> SQLLite for exam
On Sun, Oct 19, 2008 at 7:27 PM, PonasNiekas <[EMAIL PROTECTED]> wrote:
>
> Thanks Russ for the replay. Your idea would certainly work and I agree
> that
> doing calculations outside django/web server makes sense. I will
> probably
> and up doing the way you described.
>
> On the other hand, havin
Hello,
I don't know much about networking. I keep getting a connection
interrupted error page when I start a thread which runs the python
subprocess popen method: "proc = subprocess.Popen(command, shell=True,
stdout=subprocess.PIPE)".
After starting this thread my function returns a render to re
76 matches
Mail list logo