OK. I believe that the form is invalid.
"if post_form.is_valid():"
actually fails and it prints "not working".
I am using the default form that Django creates from
class PostForm(ModelForm):
class Meta:
model = Post
Is it not good?
On Mar 18, 10:10 pm, AJ wrote:
> I
Last I looked (though it's been a,while) the Django install dropped
django-admin.pt somewhere on the executable path. How did you install
Django?
Regards
Steve
On Mar 17, 2011 5:05 PM, "gh" wrote:
> Hi
>
> I´m new to django and maybe this is a simple thing but I need some
> advise what's wrong.
>
Yeah, I'm using that technique. It works fine once you have the
cookie. My question was about how to get the cookie, which is not
described well in the documentation.
Manually calling get_token() in the view for the first ajax GET seems
to be working. After that I can POST to other views.
On Sat,
So would it look something along these lines:
from app.models import NewModel
# parse csv data here
meow = NewModel(whatever = parsedData)
meow.save()
Where should this script live? Is there a general place django
developers keep these scripts? If I want this script to run every x
minutes, would
I recommend creating a script that reads the CSV files then creates
instances of your models from that data and saves them.
This will ensure that your signals (if any) fire, and that any
relationship or validation errors are known immediately, rather than
breaking your application later.
Shawn
-
I have a folder of files that have CSV data that I want to import into
the database of data that my Django app is using. I can import the
data I want with the script manually using SQL commands but I feel
like there is a much more Django/pythonic way. I know how to parse CSV
files with python, just
I had similar problem and i sort it out by overloading __init__ func
of my form and change queryset method of a field (ModelChoiceField),
i.e.:
self.fields[depatment].queryset =
self.fields[depatment].queryset.filter(company=selectedcompany)
Maybe it will help You with finding right solution.
On 1
Hi,
Which is the better way to do this on orm language ?
select filed1, sum(field2 * field3)
from a_table
group by field1
Thanks in advance.
---
Maxi
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django
Hello,
I've got a couple questions here. The first one is kinda long.
Sorry ;)
1. I'm using two custom inclusion tags for different styles of
pagination in a project (takes_context=False).
Each tag is registered to a different pagination template HTML.
Therefore each tag hands-off a context to i
This is actually something new coming in Django 1.3, and by default is
requiring all AJAX request to define an X-CSRFToken header. Fortunately,
they've written about how to do it here and provided a jQuery
implementation: http://docs.djangoproject.com/en/dev/ref/contrib/csrf/#ajax
--
You recei
Try nginx and uWSGI instead of fcgi. http://projects.unbit.it/uwsgi/
--
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, send email to
django-users+
The piece of code below from my own development stack
(
r'^static/(?P.*)$',
serve,
{'document_root': '%s/../static' % (APPLICATION,)}
)
On Sat, Mar 19, 2011 at 10:42 PM, Vladimir wrote:
> Thank You, Sultan!
> Search "django.views.static.serve" for Django 1.2 in
> http://docs.djan
Thank You, Sultan!
Search "django.views.static.serve" for Django 1.2 in
http://docs.djangoproject.com/
gives nothing. I failed to get any from Your answer, because I'm a
beginner, You see.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post
just in case anyone else googles this anytime i chose the former
approach
so i need to change that attribute after the form is posted, cos until
then we don't have the users email address.
inside get_message_dict, line before returning message_dict
message_dict['from_email'] = self.request.POST[
Hello,
Sometimes for unknown reason I've to use a small workaround while
developing
from django.views.static import serve
and then just use serve itself
url((r'^site_media/(?P.*)$', serve,
{'document_root': settings.STATIC_DOC_ROOT}),
2011/3/19 Vladimir
> Большое спасибо, Артем, за до
Большое спасибо, Артем, за добрый совет, сразу моя ошибка прояснилась!
У меня есть Подробное руководство А.Головатого и Д.Каплан-Мосса
(2010), и книга Дж.Форсье, П.Биссекса и У.Чана (2010). Руководство на
сайте Django я тоже стараюсь читать вдумчиво. Не ожидаю, что за меня
все сделают. Пока осваива
Thank You very much, Daniel !
I try to follow every advice of You and Mike.
> So you put the image in the media directory.
In a project directory 'galiontour' I created a subdirectory 'media'
and placed 'galion.gif' into it.
Index.html was placed into application level directory 'galion'.
> Then
hi Nate,
i want to give some services to my customers.
I will sell a cms and my Suite(crm and more...)
my customers can't see the code.
what do you think about this choise ?
Andrea
On Mar 18, 9:33 pm, Nate Aune wrote:
> I can't help you with your WebFaction questions, but I'd like to hear more
> unmatched parentheses `url((` should be `url(`
Thank You very much, Mike!
--
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, send email to
django
Почемуб тебе сначала не разобратся как и что работает, и не задавать
глупых вопросов, за тебя всеравно все не сделают.
Почитай (вдумчиво) книжки и туторы по джанге, например мне сам больше
помогла разобратся "Beginning Django E-Commerce [Jim McGaw] (2009)"
--
You received this message because you
On Saturday, March 19, 2011 05:37:04 am Vladimir wrote:
> url((r'^site_media/(?P.*)$', 'django.views.static.serve',
> {'document_root': settings.STATIC_DOC_ROOT}),
unmatched parentheses `url((` should be `url(`
Mike
--
Program load too heavy for processor to lift.
--
You receive
On Saturday, March 19, 2011 12:54:22 PM UTC, Vladimir wrote:
>
> Daniel, I understand that's a wrong idea to mix files of different
> nature in one directory. I only showed that one and the same simple
> (?) configuration: index.html plus image file does works when I call
> index.html directly a
Daniel, I understand that's a wrong idea to mix files of different
nature in one directory. I only showed that one and the same simple
(?) configuration: index.html plus image file does works when I call
index.html directly and doesn't work when I call it in Django style.
Of cource, this is a resul
1. I have read this article before. I think this instruction teaches
us how we can access files in this directory. My problem differs: I
can't include this files into index.html.
2. I don't understand why shall I create STATIC_DOC_ROOT, MEDIA_ROOT
is already exists.
3. I failed following this artic
So i figured out the with my inclusion tags pretty quick...the syntax
error was generated within the page_tags.py b/c I had my registration
"@register.inclusion_tag("pagination_links.html")" statement without
the "@" decorater symbol
Now my only question how this mistake bubbled up into a
Template
On Saturday, March 19, 2011 9:44:41 AM UTC, Vladimir wrote:
>
> It does not work. If I call index.html which contains
> #title h1{ background-image: url(galion.gif); background-position:
> left top; background-repeat: no-repeat; }
> directly in web browser then image is displayed.
> If I ca
On Saturday, March 19, 2011 02:44:41 am Vladimir wrote:
> It does not work. If I call index.html which contains
> #title h1{ background-image: url(galion.gif); background-position:
> left top; background-repeat: no-repeat; }
> directly in web browser then image is displayed.
> If I call it:
> h
It does not work. If I call index.html which contains
#title h1{ background-image: url(galion.gif); background-position:
left top; background-repeat: no-repeat; }
directly in web browser then image is displayed.
If I call it:
http://localhost:8000/index/
then image is not displayed. Note, for s
Oops! Thankyou :)
(tedious name for it though, although I do concede it's Python's
invention.)
On Mar 18, 9:29 pm, Kenneth Gonsalves wrote:
> On Fri, 2011-03-18 at 17:57 -0700, Darren wrote:
> > I want to store costs (prices) in my DB. The obvious field type is
> > Integer, storing the cost in
29 matches
Mail list logo