Hi
When I submit my form with no errors it correctly processes and returns
after completing form_valid.
However, when I submit my form with errors I get a django dump stating that
'ShowForumPostsView'
object has no attribute 'object_list'.
I am struggling to make it return to the same page bu
Thank you for your reply.
I had previously tried that, but must have had the syntax wrong. Am now
using get_form_kwargs() as it looks nicer.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving ema
For anyone else needing this:
In form:
def __init__(self, *args, **kwargs):
self.creator = kwargs.pop('creator', None)
In view:
form = PostForm(request.POST, creator=self.request.user.pk)
--
You received this message because you are subscribed to the Google Groups
"Django users"
Hi
I am using both FormMixin, and ListView.
When validating the form I need the users id. How can I get that into the
form for cleaning? I am presuming somehow using get_form and then using the
form's init to grab it, but am unsure of the syntax.
Any ideas?
Many thanks
def post(self, request
I think I understand now. Never mind, then. ;-)
Am 12.05.2015 um 00:00 schrieb Doug Blank:
> On Mon, May 11, 2015 at 4:44 PM, David Sieger <mailto:david-dja...@conceal.at>> wrote:
>
> If restarting the whole http service is an option, you could think
> about a
x27;m thinking ZeroMQ, but there are definitely other ways to
implement this.)
David
Am 11.05.2015 um 18:17 schrieb Doug Blank:
> Django users,
>
> We are using Django for two purposes: its ORM for a single-user
> desktop app, and for a regular Django webapp.
>
> For the desktop
Hi
Sorry if this is confusing, it's the best I can describe.
I have been separating my templates for inheritance clarity. I have a
generic template 'category_list.html'. This can be used by different apps
because the layout is the same.
What I need to do in order to use appropriate links in th
No I have not made any changes to the admin templates. I simply
followed the instructions in the tutorial. I am using Django's
runserver per the tutorial instructions. I am totally stumped.
David
On Thu, May 7, 2015 at 3:04 AM, aRkadeFR wrote:
> Hey,
>
> You shouldn't see the
is?
Thanks,
David R.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email
How do I use database views in django, many falão that view must be mapped
same table, but it should certainly give problems using the migration.
What is the best alternative to be used in this situation? heard in django-
datatable-view is an alternative?
--
You received this message because yo
Got this working. See below:
class CreateComment(MultipleObjectMixin, FormView):
template_name = 'comment/comment_list.html'
form_class = CommentForm
model = Comment
paginate_by = 5
def post(self, request, *args, **kwargs):
if not request.user.is_authenticated():
return HttpResponseForbidden()
se
This is what I am working from
btw:
https://docs.djangoproject.com/en/1.8/topics/class-based-views/mixins/#an-alternative-better-solution
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails
Following a form_invalid I need to redirect to the CreateComment view below
with the errors shown in the form. Is this possible please? Highlighted is
where I need help.
Thank you for any assistance.
class Comments(View):
def get(self, request, *args, **kwargs):
view = CreateComment.as_view()
This appears to work. Using a view for 2 functions seems pretty fugly
though. Are there better ways to achieve this?
class CreateComment(ListView, FormMixin):
model = Comment
paginate_by = 2
form_class = CommentForm
def post(self, request, *args, **kwargs):
form = CommentForm(self.request.POST)
Hi
I am using the following:
class CreateComment(ListView):
model = Comment
paginate_by = 2
form_class = CommentForm
def post(self, request, *args, **kwargs):
if not request.user.is_authenticated():
return HttpResponseForbidden()
self.object = self.get_object()
self.object.creator = request.use
Got it to work-- changed permissions of my shared part of the server using
the bash:
chmod 755 .
thanks james for thinking through this with me
On Sunday, April 19, 2015 at 5:49:41 PM UTC-7, David F wrote:
>
> oh and yes-- I SSH into my part of the server that's how I'm able t
Hello,
Your question is too vague. Also some context would be helpful.
What system you are working on? What Python version? How did you
install django? What are you trying to do? What database you are
interested in?
For example.
Best
2015-04-21 12:47 GMT+02:00 Parikshit Mishra :
> hello everyone
Hello,
I suggest you to go to
https://www.djangoproject.com/
and have a look at the docs in there.
Best
2015-04-21 7:23 GMT+02:00 Parikshit Mishra :
> hello I want to learn django from scratch please help me
>
> --
> You received this message because you are subscribed to the Google Groups
> "Dja
Hi,
Yes, in principle you can.The keywords are "legacy database":
https://docs.djangoproject.com/en/1.8/howto/legacy-databases/
Best
2015-04-21 9:15 GMT+02:00 Dario Concilio :
> Hi to all!
> I'm new of django, I've a question for you: Can I create a new project using
> an exists database?
>
> I'v
Hi,
Have you had a look at "psutil"? It is a python module to manage processes.
Best
2015-04-21 9:20 GMT+02:00 SHINTO PETER :
> Hi
> François Schiettecatte , limit memory and CPU usage for python socket client
> service
>
> On Mon, Apr 20, 2015 at 11:24 PM, François Schiettecatte
> wrote:
>>
>>
ystem only recognize the
'echo' command but the another like grep, awk or sed they say 'command not
found'. eg:
"home/david/Documents/WEB_PROJ/gestion_docs/procesa_fl/procesa_sse/extrac_data_oficial.sh:
line 70: xlsx2csv: command not found
/home/david/Documents/WEB_PROJ/ges
oh and yes-- I SSH into my part of the server that's how I'm able to do all
this :X the database file is in the project folder just... it's coming up
with that message when I try to open it in shell
--
You received this message because you are subscribed to the Google Groups
"Django users" gro
sqlite> .read db.sqlite3
Error: incomplete SQL: SQLite format 3pp_label",
"model")) �ite_autoindex_django_content_type_1django_content_type P ++
Ytablesqlite_sequencesqlite_sequence CREATE
TABLE
sqlite_sequence(name,seq)�Y // �atabledjango_migrationsdjango_migrations
CREATE
TABLE "django_
Or I'm using sqlite should I switch to mysql?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, s
Hey James
Sorry I forgot to mention that I did run first ./manage.py syncdb to create
a superuser for the database and the admin, and have run makemigrations and
migrate several times throughout editing my models, still to no avail. I
did it again after seeing your post just to be sure :p same
Hi guys!! Great to be a part of the community.
So as the title says, I am deploying a site I made locally to a shared
hosting server through "A Small Orange" or ASO. My site structure is as
follows:
don't judge my naming structure :p (unless it actually is messing something
up)
/home/my_usern
I am a novice here with Django.
I am trying to understand your question more deeply. I agree with your
ideas.
I tried the following and it seemed to work OK, although I may not have
tried all aspects.
https://github.com/django-admin-bootstrapped/django-admin-bootstrapped
Is this close to what
I'm trying to write a custom field definition for a Python object that
happens to be iterable. Most of the time it works, but sometimes I get an
error generated in 'django/db/models/sql/where.py' in '_prepare_data' where
the code tries to generate all the values in the iterable object because
appropriate for production environments with large amounts of
traffic?
Thank you,
David Riddle
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-user
need python or django to get form input and do something
with the input.
Also, I am not an expert in Django yet, but I think you can use html and
javascript in views.
On Friday, March 20, 2015 at 12:03:51 PM UTC-4, VMD wrote:
>
> On Friday, March 20, 2015 at 9:58:23 AM UTC-6, David
Does part 3 of the tutorial cover how to make a form, get the values
without storing them in a database, perform the arithmetic and then display
the result? I didn't see that in there.
On Thursday, March 19, 2015 at 11:58:14 AM UTC-4, Andrew Farrell wrote:
>
> The other commenters are right tha
Hi there,
I am using python 2.7 and django 1.75; when I run "manage.py runserver" I
get the following error:
CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False.
An exception has occurred, use %tb to see the full traceback.
My DEBUG is True.
Thanks
--
You received this me
Sounds great! I wish I was in Melb rather than Adelaide.
On Monday, 2 March 2015 17:57:35 UTC+10:30, MelbDjango School wrote:
> Hey Guys,
>
> Melb Django & Common Code is starting its second round of free classes on
> Django. The classes are going to be held fortnightly starting March 12 from
at is going wrong and the image does not appear.
>
> Sakis
>
> Τη Τετάρτη, 4 Φεβρουαρίου 2015 - 12:04:30 π.μ. UTC+2, ο χρήστης David
> Mutton έγραψε:
>
>> Hi,
>> I've been trying to integrate a WYSIWYG editor into my Django project. I
>> first started
Hi,
I've been trying to integrate a WYSIWYG editor into my Django project. I
first started with Summernote and I had no issue integrating the it into
admin or a form. I followed the instructions on their github and everything
works great except image uploading and inserting. The file is uploadin
h of these dropdowns is also passed to the hidden
intfields. On save() the json is processed using the values in the
intfields to populate a second model.
The second model just has 4 charfields for the street address, suburb,
state, postcode.
On Friday, 16 January 2015 13:24:13 UTC+10:30, Da
Please let me know if this is an inappropriate question. I feel it is a
little broad.
I am fairly new to Django and coding an app for educational purposes. What
I am trying to achieve is to allow users to upload a CSV and then populate
a model by specifying that datatype that is in each colum
Hello,
>From your post I understand you did not write unittests for your models?
I would recommend to write some sensible tests for them and start
tracing your problem from the failures you should get.
Best,
David
2014-12-15 8:15 GMT+01:00 Shazwi Suwandi :
> I've added 'core'
Title says it all really. Have just installed Django 1.8, can test django
version and get correct response so am *fairly* happy it's installed
correctly. I have had Python 2.7 installed and been using perfectly for
several months.
Altered the PATH variable as discussed so it points to correct
2014-11-12 0:25 GMT+01:00 Carl Meyer :
> Hi David,
>
> On 11/11/2014 08:37 AM, dpalao.pyt...@gmail.com wrote:
>> Dear Carl,
>>
>> Thank you for the answer.
>>
>> On Tuesday, November 11, 2014 3:13:18 PM UTC+1, Carl Meyer wrote:
>>
>>
line "managed = False" and run makemigrations,
the test passes.
But I have checked that "managed" is switched to True during the tests.
Any ideas?
Thanks in advance,
David
2014-11-05 18:45 GMT+01:00 Collin Anderson :
> Hi David,
>
> Interesting. Shouldn
Very, very good question. I am experiencing the same issues with Django
1.7rc2 and 1.7rc3.
Syncdb and sql statements are intended for Django < 1.7.
Would love to hear a solution!
Op vrijdag 22 augustus 2014 09:32:43 UTC+2 schreef termopro:
>
> Hi there,
>
> I am using Django 1.7 RC2.
> I have c
So i supposedly installed Django because on the terminal, after going
through the whole process of installation, it says "Successfully installed
Django". However, when i try to run the command: python -c "import django;
print(django.get_version())" I get: ImportError: No module named django.
Wh
thanks for your reply WB.
I was hoping to avoid virtualenv. My webapp is a frontend to a vulnerability
scanner in a large corporation.
They are very picky about what I can use and what I can't. Is virtualenv
suitable for such a production system?
They insist that I cannot use mod_wsgi (it annoy
Hi Timothy
thanks for your suggestions. I'm still on the path. I'll put more details in my
reply to WongoBongo below.
cheers
Dave
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it
I have been tasked with finishing a build for production that was
interrupted due to another staff member leaving at short notice. It's
RedHat Enterprise Linux 5 and there are two versions of python on the box.
If I type python I get version 2.7. However if I try and use
django-admin.py I find
I am using Test Driven Development methods to create a basic blog in Django
1.6.
I followed [this
tutorial](http://matthewdaly.co.uk/blog/2013/12/28/django-blog-tutorial-the-next-generation-part-1/)
but wanted to change to using Function Based Views since I'm just starting
with Django.
I get
sure this
was intended. The author possibly wanted to create
http://127.0.0.1:8000/about/instead of
http://127.0.0.1:8000/rango/about/
Thanks for clarifying this issue for me!
Cheers,
David
Here is my project/urls.py
from django.conf.urls import patterns, include, url
from django.contrib impo
Dear Russell,
thanks -- brilliant advice!
Greetings from Copenhagen,
David
On 09/03/14 01:10, Russell Keith-Magee wrote:
>
> On Sun, Mar 9, 2014 at 5:09 AM, David <mailto:ld...@gmx.net>> wrote:
>
> Dear list,
>
> I follow
> http://www.tan
(os.path.dirname(__file__))
that looks very similar to the next three lines I added.
Am I reproducing code here? Do I make a mistake if I take the BASE_DIR~
line out?
Thanks for your guidance!
David
settings.py (slection):
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import
Dear Robin and Jay,
thanks, I was able to solve my problem: setting.py just wants the name
of the app.
Cheers,
David
On 06/03/14 08:42, Jay Parikh wrote:
> Let say for example i am going to create new app say bookmarks then i
> will do something like *"python manage.py startap
following "Learning Website Development
with Django" by Ayman Hourieh.
I am not working in a virtualenv.
Thanks for your guidance and hints!
David
settings.py:
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contentt
It might be that you just want a link to the current page in another
language. If you need that, see my comment here:
http://stackoverflow.com/questions/11437454/django-templates-get-current-url-in-another-language/21573776#21573776
On Tuesday, 15 April 2008 01:03:56 UTC+1, Simon Tite wrote:
>
(s), it will be %s." %
(offset, dt)
return HttpResponse(html)
Whit utf8
SyntaxError at /time/plus/99/
Non-ASCII character '\xc3' in file
/home/david/Documents/Django/tutorial2/base1/base1/views.py on line 8, but no
encoding declared; see http://www.python.org/peps/pep-0263.html for
Hello, i'm beginning to learn python+django and i'm doing that handbook
https://github.com/jacobian/djangobook.com/blob/master/chapter03.rst
In the example whit datetime i have a problem when i active the utf-8
encondig because i use á,ñ, etc (i'm chilean and we talk in spanish)
So, when i deacti
erstand how :-)
Thanks!!
On Wednesday, January 8, 2014 6:36:02 AM UTC-6, Daniel Roseman wrote:
>
> On Wednesday, 8 January 2014 05:16:32 UTC, David Nides wrote:
>>
>> Greeting,
>>
>> I am trying to bind a jQuery grid to MySql database using PHP and serve
>> u
If it
helps I am running Windows 7.
Appreciate any guidance.
Thanks!!
David Nides
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to djang
JQuery<http://www.jqwidgets.com/jquery-widgets-documentation/documentation/phpintegration/bind-jquery-grid-to-mysql-database-using-php.htm>
demo?
Any guidance is much appreciated.
Thanks!!
David Nides
--
You received this message because you are subscribed to the Google Groups
"D
This could be handled in the form clean() and/or save() methods using a
try/catch block and passing on thrown exceptions. You'd have to figure out
what would be an acceptable way to handle a form submission with an invalid
selection, though.
On Monday, October 7, 2013 11:15:43 AM UTC-5, Jon Du
I just rtfc, and it might have been a copy-paste mistake, but the
'str_value' field in your 'DirEnumVal' class has unmatched quotation marks
for the default attribute.
On Monday, October 7, 2013 8:40:33 PM UTC-5, Doug S wrote:
>
> I don't think I'm making a rookie mistake, I've looked over my co
There's a chance that running 'manage.py sqlall' might show errors that
syncdb can't display before failing. 'manage.py sqlall' validates the SQL
without trying to commit it, so to save time in the future, you should
really run it before syncdb every time.
If not, and the app is installed, che
I think when they hit the browsers back button, the form will have the
data they entered previously. When they submit it, since it was
already submitted previously, you could just make it an edit action,
or do whatever is appropriate given that they are submitting the same
form again. I think the
The second StackOverflow answer is probably your best bet. Assuming your
looking for a solution that avoids editing any included app templates,
you'd want to use the solution that HTML5 Boilerplate uses, which is a
Javascript conditional inclusion:
window.jQuery || document.write('