Building a search form with 4 required choices, which will be inserted as arguments in an URL [warning: long question]

2017-10-23 Thread Jack Zhang
This is a semi-long question. Please let me know wherever I make a mistake. I'm building a search form with 4 required choices, 1 of the choices is a CharField with a max_length of 3. The other 3 choices are ChoiceField's. Here is a picture of what the search form looks like: <https://

Question about Multiple DBs and Foreign Keys

2017-09-22 Thread Noemi
Hi folks -- I'm trying to use multi-DB support for a one-off operation to copy some data from one database to another with the same schema, and trying to figure out how explicit one has to be about which database to use for foreign key access. I understand that Django doesn't support

Re: a hard question about django ORM

2017-08-06 Thread lemme smash
what the problem here? you can get all your Feeds by feeds = Feed.objects.filter(user=me) and then all the comments for each feed comments = feed.comment_set.exclude(user=me) or what? if you want to get only comments, you can do comments = Comment.objects.filter(feed__in=feeds).exclude(user=me)

a hard question about django ORM

2017-08-06 Thread 时空路由器
there are three classes class User(models.Model): name = models.CharField() class Feed(models.Model): user = models.ForeignKey(User) class Comment(models.Model): user = models.ForeignKey(User) feed = models.ForeignKey(Feed) How to get all my feeds and all the coments of them, but the

Re: Django Teachers-Subject-Classroom Question

2017-07-10 Thread Mike Morris
This is more a DB Q than a Django Q, but googling ""schema" course teacher student classroom" yields a useful first hit: https://dba.stackexchange.com/questions/22064/database-schema-design-for-school-system On 07/10/2017 06:05 PM, Cristian Torzsa wrote: Hello, I what is the best database

Django Teachers-Subject-Classroom Question

2017-07-10 Thread Cristian Torzsa
Hello, I what is the best database design for a Teacher-Subject-Classroom case? For example, a teacher could teach multiple sujbects at multiple classes. How can I keep track of every teacher teaching which subjects at which classroom? Because a teacher can teach 2 different subjects at the

Re: Noobie question, can't get url request to work, 404

2017-07-05 Thread ahickman3
oh wow that was it, i wasnt reading the instructions correctly, i clearly said to go to /hello. Sorry about that, and thanks! On Wednesday, July 5, 2017 at 4:38:24 PM UTC-5, Alceu Rodrigues de Freitas Junior wrote: > > You forgot to say what is going wrong... I guessing you're getting a: > Page

Re: Noobie question, can't get url request to work, 404

2017-07-05 Thread Alceu Rodrigues de Freitas Junior
You forgot to say what is going wrong... I guessing you're getting a: Page not found (404) Request Method: GET Request URL:http://127.0.0.1:8000/ Using the URLconf defined in |noobie.urls|, Django tried these URL patterns, in this order: 1. ^admin/ 2. ^hello/ The empty path

Re: Noobie question, can't get url request to work, 404

2017-07-05 Thread johnf
to be honest I haven't used Django in a while so take what I'm saying as wrong - but shouldn't the url be url(r'hello/$', views.hello, name='hello'), Not sure you need "^" although I doubt it hurts. Johnf On 07/05/2017 02:23 PM, ahickm...@tamu.edu wrote: So I literally just started django,

Noobie question, can't get url request to work, 404

2017-07-05 Thread ahickman3
So I literally just started django, I know 0 about backend dev, but im going through the djangobook tutorial (also, please excuse me if I use the wrong syntax). He shows us how to get content to show up on our temporary domain (a simple Hello World). The hello world setup looks like so, with

Sending a file as an attachment for email in Django Ask Question

2017-06-28 Thread krishna . cf40
down votefavorite I am trying to send a file as an attachment in an email, the file is submitted through a web form. My views.py is as shown below, the problem I am facing is the attached file

Re: NOVICE Question; Installing Django 1.11.2 in Python 3.6 with the correct path

2017-06-27 Thread Antonis Christofides
In addition, don't use spaces on either side of the == Antonis Christofides http://djangodeployment.com On 2017-06-27 19:02, Vijay Khemlani wrote: > You should run pip from the command line, not from inside the python > interpreter shell > > On Tue, Jun 27, 2017 at 11:25 AM,

Re: NOVICE Question; Installing Django 1.11.2 in Python 3.6 with the correct path

2017-06-27 Thread Vijay Khemlani
You should run pip from the command line, not from inside the python interpreter shell On Tue, Jun 27, 2017 at 11:25 AM, wrote: > A a Novice to Python and to Django How do i install Django into the > correct path , I followed the instruction in a Django manual and got an >

NOVICE Question; Installing Django 1.11.2 in Python 3.6 with the correct path

2017-06-27 Thread hliddic
A a Novice to Python and to Django How do i install Django into the correct path , I followed the instruction in a Django manual and got an error message; How do I install Django 1.11.2 on windows 10 with the following sys path >>> import sys >>> sys.path

Re: Model design question

2017-06-25 Thread Mark Phillips
On Sun, Jun 25, 2017 at 6:56 PM, Constantine Covtushenko < constantine@gmail.com> wrote: > Hi Mark, > > I have some questions to you. > 1. Does any of MetaData have predefined list of MetaDataValues? > No, I want to add them in real time as Documents are uploaded. > 2. Can MetaDataValue be

Re: Model design question

2017-06-25 Thread Constantine Covtushenko
Hi Mark, I have some questions to you. 1. Does any of MetaData have predefined list of MetaDataValues? 2. Can MetaDataValue be assigned to many Documents or it is specific to particular Document? Regards, Constantine C. On Sun, Jun 25, 2017 at 6:20 PM, Mark Phillips

Model design question

2017-06-25 Thread Mark Phillips
I have a class Document that uploads a document. I have a class MetaData that is the name for some metadata for that document. Since a MetaData can have one or more values, there is another class called MetaDataValue that has a ForeignKey to MetaData. Finally, there is a class

Re: url patterns question

2017-06-21 Thread Melvyn Sopacua
On Tuesday 20 June 2017 18:08:02 James Schneider wrote: > > And his problem is that it does *not* match. Not that it does. > > And for that I think my statement still stands that Django is > stripping the last portion of the URL as a GET argument. I'm betting > that > requests.GET.get('abc')

Re: url patterns question

2017-06-20 Thread James Schneider
> > > > What did you base this on? Certainly not the python docs or behavior of > any pcre based library. > > Regular expressions are capitalist: greedy by default. > > The qualifiers *? are there especially to make a match non-greedy. > > > > Quick test: > > pcregrep -o '^.*:' /etc/passwd > > > >

Re: url patterns question

2017-06-20 Thread Melvyn Sopacua
On Monday 19 June 2017 16:43:12 James Schneider wrote: > But if I use the pattern: > > *urlpatterns = [ * > *url(r'^blank/.*$', views.BlankMore, name='blankMore'),* > *]* > > I can enter: > > localhost:8000/uA/blank/ > > and the pattern will match, but if I enter: > >

Re: url patterns question

2017-06-19 Thread James Schneider
, just depends on the verb in use) https://docs.djangoproject.com/en/1.11/ref/request-response/#django.http.HttpRequest.GET - Details how request.GET works as a QueryDict The broader question really revolves around what you are trying to accomplish? You should use either REST-style URL keywords that ar

url patterns question

2017-06-19 Thread jjanderson52000
I'm trying to write a simple Django app and I have encountered a few problems handling URL patterns. Any help will be appricated. Problem 1 My first problem is that I would like to parse a url that is known up until the last part of the URL. So for example, if I use the following

RE: Internet Explorer question

2017-06-16 Thread Matthew Pava
[mailto:django-users@googlegroups.com] On Behalf Of Andréas Kühne Sent: Friday, June 16, 2017 2:52 AM To: django-users@googlegroups.com Subject: Re: Internet Explorer question Hi, If you target corporate users, you will have to test IE. I would say that that is a requirement. The draggable

Re: Internet Explorer question

2017-06-16 Thread Andréas Kühne
Hi, If you target corporate users, you will have to test IE. I would say that that is a requirement. The draggable corner of a TextField is a browser implementation for example and doesn't exist in IE (as you now have experienced). However the javascript problems you are seeing should "just

Internet Explorer question

2017-06-15 Thread Mike Dewhirst
I have just spent the most frustrating 90 minutes in living memory walking a potential user through our application via IE. Does anyone know if we need to make special provision for IE in Django Admin (1.10) ? The UI seems very slow and quirky. I suspected Javascript was disabled but the

Re: Aggregation question

2017-05-23 Thread 刘是
imentation and you should be able to figure it out >>> yourself. >>> >>> On Wednesday, February 8, 2017 at 12:41:24 PM UTC-5, Viktor Bale wrote: >>>> >>>> Hi all >>>> No takers, eh? Does this means it also confuses other more experienced

Re: Aggregation question

2017-05-23 Thread 刘是
t;> >> On Wednesday, February 8, 2017 at 12:41:24 PM UTC-5, Viktor Bale wrote: >>> >>> Hi all >>> No takers, eh? Does this means it also confuses other more experienced >>> people, or that it's a silly question? If the aggration function was Avg >>>

two question: one for a little similarity page use base template, one for mutiple type user.

2017-05-18 Thread Man Single
Two question: First: There are multiple type user, for example: NormalUser, StaffUser, EnterpriseUser, the model like this: class User(AbstractBaseUser): # some auth related field here class NormalUser(User): # extend , not abstract class StaffUser(User): class EnterpriseUser(User

Re: what kind of question i can ask here?

2017-05-13 Thread shahab emami
thanks every time that i wanted to ask question i was worried . i thought maybe this is simple question and i don't have to ask this in this professional group On Saturday, May 13, 2017 at 5:19:14 PM UTC+4:30, shahab emami wrote: > > hello > > when i get a problem in my c

Re: what kind of question i can ask here?

2017-05-13 Thread ludovic coues
if i > couldn't find the answer then i ask my question here. > is this good? > I mean can i ask my programming questions here? > or this group is just for bugs and stuff like that? > > thanks > > -- > You received this message because you are subscribed to the Google Group

what kind of question i can ask here?

2017-05-13 Thread shahab emami
hello when i get a problem in my code i search for it in google for an hour if i couldn't find the answer then i ask my question here. is this good? I mean can i ask my programming questions here? or this group is just for bugs and stuff like that? thanks -- You received this message because

Re: Admin css question for 1.10.7

2017-05-09 Thread Melvyn Sopacua
. > > > > Should I now contact elky and start a conversation? > > I went back to the docs and saw I should add a comment to ticket > #11544. The ticket has been closed and I couldn't see how to add a > new comment. The ticket is also too old to be necro'd. You can open

Re: Admin css question for 1.10.7

2017-05-09 Thread Mike Dewhirst
On 9/05/2017 11:45 AM, Mike Dewhirst wrote: On 8/05/2017 11:02 PM, Melvyn Sopacua wrote: On Monday 08 May 2017 03:57:01 Tim Graham wrote: > You need to clone the Django repository and run the bisect command > from there: snip running /home/melvyn/hg/django-project/invert.sh Bisecting:

Re: Admin css question for 1.10.7

2017-05-08 Thread Mike Dewhirst
200 -- Updated tutorial screenshots for new admin theme. running /home/melvyn/hg/django-project/invert.sh Bisecting: 1 revision left to test after this (roughly 1 step) [19f98946f2b31b62303aedb5b30951ca295116d8] Fixed #25358 -- Improved variable name for question in tutorial. running /hom

Re: Admin css question for 1.10.7

2017-05-08 Thread Melvyn Sopacua
pdated tutorial screenshots for new admin theme. running /home/melvyn/hg/django-project/invert.sh Bisecting: 1 revision left to test after this (roughly 1 step) [19f98946f2b31b62303aedb5b30951ca295116d8] Fixed #25358 -- Improved variable name for question in tutorial. running /home/melvyn/hg/d

Re: Admin css question for 1.10.7

2017-05-08 Thread Tim Graham
You need to clone the Django repository and run the bisect command from there: https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/ That said, you might have some luck using the "Blame" button on

Re: Admin css question for 1.10.7

2017-05-07 Thread Mike Dewhirst
Tim The problem does not exist in 1.8.18 and does exist in 1.9 Here is the test I wrote to see if the css file contains the problem (which I established by trial and error) ... # -*- coding: utf-8 -*- import os from django.test import TestCase from django.contrib import admin expected =

Re: Admin css question for 1.10.7

2017-05-07 Thread Mike Dewhirst
On 7/05/2017 8:12 PM, Tim Graham wrote: You can use git bisect to find the Django commit where the behavior changed: https://docs.djangoproject.com/en/dev/internals/contributing/triaging-tickets/#bisecting-a-regression Just read this and I have two problems ... 1. It is a css problem

Re: Admin css question for 1.10.7

2017-05-07 Thread Tim Graham
You can use git bisect to find the Django commit where the behavior changed: https://docs.djangoproject.com/en/dev/internals/contributing/triaging-tickets/#bisecting-a-regression On Saturday, May 6, 2017 at 11:05:14 PM UTC-4, Mike Dewhirst wrote: > > I'm just (slowly) advancing from 1.8 to 1.11

Admin css question for 1.10.7

2017-05-06 Thread Mike Dewhirst
I'm just (slowly) advancing from 1.8 to 1.11 and stopping for a short while at 1.10. I notice that help-text doesn't line up under the left edge of DecimalField fields the way it does for TextFields and most others. Is this a deliberate design decision? Thanks Mike -- PLEASE NOTE OUR NEW

Re: New to django and ORM. So a basic question about data inserts

2017-04-11 Thread Camilo Torres
Hi, Lets suppose we simplify your problem and we have these 2 django models: from django.db import models class Person(models.Model): name = models.CharField(max_length=255, null=False, blank=False) def __str__(self): return self.name class Residence(models.Model): address

Re: New to django and ORM. So a basic question about data inserts

2017-04-10 Thread Lachlan Musicman
-- The most dangerous phrase in the language is, "We've always done it this way." - Grace Hopper On 11 April 2017 at 05:35, Cassium wrote: > Say I am collecting residence history and I allow the user to submit up to > five previous addresses. I have a PEOPLE model

New to django and ORM. So a basic question about data inserts

2017-04-10 Thread Cassium
Say I am collecting residence history and I allow the user to submit up to five previous addresses. I have a PEOPLE model and RESIDENCES model and anticipate a many-to-many relationship between. Back when I was working with Joomla I would have manages these models (well, tables) with a table

Re: Question about m2m and forms

2017-04-02 Thread Carlo Ascani
Il giorno sabato 18 febbraio 2017 11:02:25 UTC+1, Carlo Ascani ha scritto: > > > > Il giorno venerdì 17 febbraio 2017 20:09:15 UTC+1, Matthew Pava ha scritto: >> >> Hi Carlos, >> You probably want to create a new widget and override its >> label_from_instance method. >> >> class

Re: AdminURLFieldWidget question

2017-03-26 Thread Mike Dewhirst
Declaring myAdminURLFieldWidget outside the ModelAdmin class is the answer! On 26/03/2017 6:32 PM, Mike Dewhirst wrote: How can I manipulate the link in an Admin URLField so it uses the normal HTML hyperlink attributes? I have a substance with ingredients in a self m2m relationship and I

AdminURLFieldWidget question

2017-03-26 Thread Mike Dewhirst
How can I manipulate the link in an Admin URLField so it uses the normal HTML hyperlink attributes? I have a substance with ingredients in a self m2m relationship and I want the ingredients displayed to carry a link to open themself in another substance page. IOW, I want to use the

Re: Question about m2m and forms

2017-02-18 Thread Carlo Ascani
Il giorno venerdì 17 febbraio 2017 20:09:15 UTC+1, Matthew Pava ha scritto: > > Hi Carlos, > You probably want to create a new widget and override its > label_from_instance method. > > class BModelMultipleChoiceField(forms.ModelMultipleChoiceField): > def label_from_instance(self,

RE: Question about m2m and forms

2017-02-17 Thread Matthew Pava
--Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Carlo Ascani Sent: Friday, February 17, 2017 12:14 PM To: django-users@googlegroups.com Subject: Question about m2m and forms Hi all, I have a model A with

Question about m2m and forms

2017-02-17 Thread Carlo Ascani
Hi all, I have a model A with a m2m to B: -- class A(models.Model): to_b = models.ManyToManyField(B) class B(models.Model): name = models.CharField(max_length=100) -- In a view, I am listing A objects and

Re: Tutorial part 4 help: the raidio buttons to make a choice on the polls question won't show.

2017-02-09 Thread Brady Lee
; > Have you added some choices to the "What's up?" question ? > > What you see is that question.choice_set.all is empty. > The following snippet will give you some output: > > {% for choice in question.choice_set.all %} > value="{{ choice.id }}" /

Re: Aggregation question

2017-02-08 Thread Tim Graham
at an aggregation query will >> do. Do some experimentation and you should be able to figure it out >> yourself. >> >> On Wednesday, February 8, 2017 at 12:41:24 PM UTC-5, Viktor Bale wrote: >>> >>> Hi all >>> No takers, eh? Does this means it also

Re: Newbie question, start server with hostname

2017-02-08 Thread Dylan Reinhold
You don't include the http:// python manage.py runserver hostname:8000 or put the IP address in the hostname area/ Dylan On Wed, Feb 8, 2017 at 12:29 PM, hippohippo wrote: > Dear all, > > I am a new comer on Django. I was able to to run start server by command >

Newbie question, start server with hostname

2017-02-08 Thread hippohippo
Dear all, I am a new comer on Django. I was able to to run start server by command as below yesterday. python manage.py runserver http:/hostname:8000 However today, it submit the error as CommandError: "http://te172.24.221.137:8000/; is not a valid port number or address:port pair. Can

Re: Aggregation question

2017-02-08 Thread Viktor Bale
should be able to figure it out > yourself. > > On Wednesday, February 8, 2017 at 12:41:24 PM UTC-5, Viktor Bale wrote: >> >> Hi all >> No takers, eh? Does this means it also confuses other more experienced >> people, or that it's a silly question? If the aggration funct

Re: Aggregation question

2017-02-08 Thread Tim Graham
tion query will do. Do some experimentation and you should be able to figure it out yourself. On Wednesday, February 8, 2017 at 12:41:24 PM UTC-5, Viktor Bale wrote: > > Hi all > No takers, eh? Does this means it also confuses other more experienced > people, or that it's a silly ques

Re: Aggregation question

2017-02-08 Thread Viktor Bale
Hi all No takers, eh? Does this means it also confuses other more experienced people, or that it's a silly question? If the aggration function was Avg instead of Sum, then it would make perfect sense (the average price per page over all books)... but it doesn't, so it doesn't :-) Thanks

Re: Tutorial part 4 help: the raidio buttons to make a choice on the polls question won't show.

2017-02-07 Thread ludovic coues
Have you added some choices to the "What's up?" question ? What you see is that question.choice_set.all is empty. The following snippet will give you some output: {% for choice in question.choice_set.all %} {{ choice.choice_text }} {% empty %} Sorry, no available choices.

Re: Tutorial part 4 help: the raidio buttons to make a choice on the polls question won't show.

2017-02-07 Thread Brady Lee
Same issue here, no radio buttons show up. ubuntu 16.04.1 LTS python 3.5.2 django 1.10.5 I've tried {{ question|pprint }} and {{ question.choice_set.all|pprint }} for debugging, got: Now trying to figure out where the problem is. On Thursday, October 20, 2016 at 11:52:59 PM UTC+8

Aggregation question

2017-02-06 Thread Viktor Bale
This is confusing me. In the topic guide on Aggregation (https://docs.djangoproject.com/en/1.10/topics/db/aggregation/#cheat-sheet), there is an example in the cheat sheet as follows: # Cost per page>>> from django.db.models import F, FloatField, Sum>>> Book.objects.all().aggregate(...

Re: Django Tutorial Part 5, Test detail view with a past question failure.

2017-01-20 Thread jorrit787
assertContains(response, past_question.question_text) > File > "/tmp/bash-venv/8918/lib/python2.7/site-packages/django/test/testcases.py", > line 382, in assertContains > self.assertTrue(real_count != 0, msg_prefix + "Couldn't find %s in > r

Django Tutorial Part 5, Test detail view with a past question failure.

2017-01-19 Thread Vpeguero
t_question self.assertContains(response, past_question.question_text) File "/tmp/bash-venv/8918/lib/python2.7/site-packages/django/test/testcases.py", line 382, in assertContains self.assertTrue(real_count != 0, msg_prefix + "Couldn't find %s in response" % text_repr) AssertionError

Re: Question Is Django Rest Framework only for APIs or can i Use it to create Users for a website?

2017-01-10 Thread Melvyn Sopacua
On Friday 06 January 2017 23:13:12 Robert librado wrote: > Thanks i guess i will go with djangi all auth instead kind of leaning > towards a social network Yeah, you should, cause it's the opposite of what Django Rest Framework does. Django All Auth connects an *external API* to *your

Re: Question Is Django Rest Framework only for APIs or can i Use it to create Users for a website?

2017-01-06 Thread Robert librado
eceive signals from cross platform then yes you will > be able to create users or authenticate them. > > Hope you got the essence. > Regards, > Mudassar > > On Fri, Jan 6, 2017 at 8:54 PM, djangorobert <djangocharm2...@gmail.com> > wrote: > >> Ya the question is wha

Re: Question Is Django Rest Framework only for APIs or can i Use it to create Users for a website?

2017-01-06 Thread M Hashmi
com> wrote: > Ya the question is what it means Ive gone through it and looks like you > could but not sure I know its good for apis but wanted to see if it could > be used for Authenticating User for a website that im building > > any responses would be appreciated thank you

Question Is Django Rest Framework only for APIs or can i Use it to create Users for a website?

2017-01-06 Thread djangorobert
Ya the question is what it means Ive gone through it and looks like you could but not sure I know its good for apis but wanted to see if it could be used for Authenticating User for a website that im building any responses would be appreciated thank you -- You received this message because

Re: M2M Question

2016-12-15 Thread Mike Dewhirst
the linked documents of the linked documents of the document in question? I will probably have to write my own QuerySet or ModelManager function, but I was just curious if Django had something built in. For example: A is linked to J, C, K. èJ is linked to A èC is linked to A èK is linked to A B

M2M Question

2016-12-15 Thread Matthew Pava
documents of the document in question? I will probably have to write my own QuerySet or ModelManager function, but I was just curious if Django had something built in. For example: A is linked to J, C, K. è J is linked to A è C is linked to A è K is linked to A B is linked to J, M, P. è J is linked

Poll App tutorial question

2016-12-11 Thread Matthew Schroeder
In part 5 of the Django Poll App tutorial there was a "Vote Again" function, how do you access the next question.id, instead of the current one? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: wsgiref - When does the complexity of question require posting to the Developers or other forums?

2016-12-05 Thread NoviceSortOf
; * http://andrewsforge.com/presentation/upgrading-django-to-17/ (Massive > 4 part series ... assume you want to keep going beyond 1.6) > > On Friday, 2 December 2016 19:40:28 UTC+2, NoviceSortOf wrote: >> >> ...Thanks everyone for the above discussion -- some progress to

Re: wsgiref - When does the complexity of question require posting to the Developers or other forums?

2016-12-04 Thread Derek
sive 4 part series ... assume you want to keep going beyond 1.6) On Friday, 2 December 2016 19:40:28 UTC+2, NoviceSortOf wrote: > > ...Thanks everyone for the above discussion -- some progress today has > been noted... > > To answer Matt's question... > > The variable at the ro

Re: wsgiref - When does the complexity of question require posting to the Developers or other forums?

2016-12-02 Thread NoviceSortOf
...Thanks everyone for the above discussion -- some progress today has been noted... To answer Matt's question... The variable at the root of the error appears to be -- response. as found in /usr/lib/python2.7/site-packages/django/core/handlers/base.py line 89 response is assigned as "

RE: wsgiref - When does the complexity of question require posting to the Developers or other forums?

2016-12-02 Thread Matthew Pava
ango-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of NoviceSortOf Sent: Friday, December 2, 2016 10:58 AM To: Django users Subject: Re: wsgiref - When does the complexity of question require posting to the Developers or other forums? Thanks for the reply. I agree the p

Re: wsgiref - When does the complexity of question require posting to the Developers or other forums?

2016-12-02 Thread NoviceSortOf
question. * Would issue perhaps be limited to Django’s built-in development server? * Would using a difference Web Interface Gateway solution solve the problem? Details follow... Please advise I type on the Linux server command line # python manage.py runserver 0.0.0.0:8000 then point my

Re: Questions about templates from a novice - Question #1

2016-12-02 Thread jim_anderson
t that I call 'testDjangoProject' (I'm not too >> original). My current objective in the test project is to get a working >> template environment and a working knowledge so that I can write and >> templates, template tags and template filters. >> >> I have a few quest

Re: Questions about templates from a novice - Question #1

2016-12-01 Thread Dan Tagg
and template filters. > > I have a few questions, but I'm going enter each question as a separate > thread in this group. > > So, question number 1: > > I have created a view class that is derived from generic.ListView, which > inherits from a few other classes both

Questions about templates from a novice - Question #1

2016-12-01 Thread jim_anderson
enter each question as a separate thread in this group. So, question number 1: I have created a view class that is derived from generic.ListView, which inherits from a few other classes both directly and indirectly. My class, called TagView, overrides 2 methods get_query_set() and get(). I

Re: wsgiref - When does the complexity of question require posting to the Developers or other forums?

2016-12-01 Thread Daniel Roseman
be a known > bug in Django and the WSGI package, I'm wondering where to turn for useful > advice > regarding what appears to be a common problem without a common answer. > > Below is detail of a wsgiref issue that gets considerable discussion > online with > no answe

wsgiref - When does the complexity of question require posting to the Developers or other forums?

2016-12-01 Thread NoviceSortOf
what appears to be a common problem without a common answer. Below is detail of a wsgiref issue that gets considerable discussion online with no answer to the question being posted here or elsewhere. * Should I attempt posting this question in the Developers Conf? * Are there other forums

question re built-in server

2016-11-25 Thread bob gailer
Sometimes requests get displayed at the console, other times they do not. Example: (myproject) C:\Users\bgailer\mysite>manage.py runserver 0.0.0.0:8000 Performing system checks... System check identified no issues (0 silenced). You have 1 unapplied migration(s). Your project may not work

Re: question about returning file (pdf,image,zip...) in a request that made from temporary URL

2016-10-31 Thread Stefano Probst
You could use a whole deployment setup. Forward Django though nginx by using WSGI (Gnuicorn, etc). Then everything should work. -- 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,

Re: question about returning file (pdf,image,zip...) in a request that made from temporary URL

2016-10-30 Thread ali Eblice
thanks for reply i setup the x-sendfile but there's a problem : django return a x-sendfile response successfully but since i'm using django development area and the development area runs on port 8000 the return response will be on port 8000 but the apache web server runs on port 80 so the

Re: Newbie question - data structure for game

2016-10-30 Thread Derek
You'll probably need jQuery. Bear in mind "size" is not absolute as it will depend on font family and font height. On Sunday, 30 October 2016 01:27:59 UTC+2, Ken Albright wrote: > > Sounds good. Thanks for the advice. Now if I could only figure out how to > get forms to expand and contract to

Re: Newbie question - data structure for game

2016-10-29 Thread Stephanie Statsmann
K -- 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 to django-users@googlegroups.com.

Re: Newbie question - data structure for game

2016-10-29 Thread Ken Albright
Sounds good. Thanks for the advice. Now if I could only figure out how to get forms to expand and contract to match the size of the quote... Thanks. On Friday, October 28, 2016 at 5:00:14 PM UTC-7, Ken Albright wrote: > > I'm just learning Python and Django so please be gentle... > > I've

Re: Newbie question - data structure for game

2016-10-29 Thread Yaşar Arabacı
I am also quite new to django, but I will go with something like this; class Quote(models.Model): quote= models.CharField(max_length=100) class EncryptedQuote(models.Model) quote = models.ForeignKey(Quote, on_delete=models.CASCADE) encrypted_quote = models.CharField(max_length=100)

Re: Newbie question - data structure for game

2016-10-29 Thread Bob Gailer
On Oct 28, 2016 7:59 PM, "Ken Albright" wrote: > > I'm just learning Python and Django so please be gentle... > > I've written a quote decryption game (like you see in the newspaper) in Python. I'd like to put it on a web page with Django. However, I'm not sure of the best way

Re: question about returning file (pdf,image,zip...) in a request that made from temporary URL

2016-10-29 Thread Stefano Probst
Hello, you can use X-Accel-Redirect. See django-downloadview and "Nginx, Django, and X-Accel-Redirects". Best regards Am Freitag, 28. Oktober 2016 16:59:53

Newbie question - data structure for game

2016-10-28 Thread Ken Albright
I'm just learning Python and Django so please be gentle... I've written a quote decryption game (like you see in the newspaper) in Python. I'd like to put it on a web page with Django. However, I'm not sure of the best way to structure the data. The original quote and the encrypted quote need

question about returning file (pdf,image,zip...) in a request that made from temporary URL

2016-10-28 Thread ali Eblice
hello think of a downloading website: when we create a temporary link in django and map it to actual URL or file path in database like this: id -- temporary_URL -- origin_URL -- file_path so when a user used a temporary URL and directed to some view , how should i return that file from that

Re: Tutorial part 4 help: the raidio buttons to make a choice on the polls question won't show.

2016-10-22 Thread ludovic coues
I would try to add that right before the loop: {{ question|pprint }} {{ question.choice_set.all|pprint }} The result should be something like that the pprint filter is for debugging, you should remove once your issue is fixed. It will make obvious some error like

Re: Tutorial part 4 help: the raidio buttons to make a choice on the polls question won't show.

2016-10-21 Thread Othniel Ayinzat
I think the problem is from around: {% for choice in question.choice_set.all %} {{ choice.choice_text }} {% endfor %} This is because i tested outside the loop and i got the radio button, but the whole idea was to loop through the questions and assign a button for the choices. -- You

Tutorial part 4 help: the raidio buttons to make a choice on the polls question won't show.

2016-10-20 Thread Othniel Ayinzat
}} {% endfor %} polls/templates/polls/index.html --- {% if latest_question_list %} {% for question in latest_question_list %} {{ question.question_text }} {% endfor %} {% else %} No polls are available. {% endif %} -- You received this message

Re: Basic GenericForeignKey Question

2016-09-21 Thread TheBeardedTemplar
Hey Ludovic, I simplified things a lot to illustrate my particular issue, but our permission system is actually pretty complex - the permissions can apply to any individual object, and they are also hierarchical like those that would apply to a folder system. I found there were decent

Re: Basic GenericForeignKey Question

2016-09-21 Thread ludovic coues
Unrelated, do you have any reason to not reuse the existing django permission system ? 2016-09-21 16:41 GMT+02:00 TheBeardedTemplar : > Hey all, > > I'm just getting started with GenericForeignKeys and I've run into a small > point of confusion. I'm implementing a

Basic GenericForeignKey Question

2016-09-21 Thread TheBeardedTemplar
Hey all, I'm just getting started with GenericForeignKeys and I've run into a small point of confusion. I'm implementing a very general permission system as follows: class Permission(models.Model): """ This stores permissions for a single object. """ #These 3 fields are used to

Re: WSGI question

2016-08-04 Thread John
Hi Jonty, You can only have one version of mod_wsgi installed per apache instance, so you need to uninstall the 2.7 version and install the 3.4 version. On Ubuntu, the libapache2-mod-wsgi-py3 package is what you are looking to have installed. John On 05/08/16 00:37, Jonty Needham wrote: > Sorry

WSGI question

2016-08-04 Thread Jonty Needham
Sorry if this isn't for here, but I've somehow got the wrong version of python running with mod_wsgi --2.7 instead of 3.4, so none of the 3.4 libraries work, like collections or datetime. Where do I look to change this? -- You received this message because you are subscribed to the Google

Re: Question has mediated relation to the Django.

2016-07-23 Thread Derek
I don't know how to do this in "raw" Python; but my view is that the Python universe is full of very smart programmers who have wrapped their knowledge into libraries for you to use - so why not make use of them, rather than reinventing the wheel yourself? In short:

Question has mediated relation to the Django.

2016-07-21 Thread Seti Volkylany
How get a total count pages in PDF file, created with using ReportLab, without third-party apps and hardcode (or violation DRY)? -- 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,

Re: Newbie question regarding uninstalling Django system-wide.

2016-07-13 Thread Leo
Thanks Mike On Tuesday, July 12, 2016 at 8:03:18 PM UTC-4, Mike Dewhirst wrote: > > On 13/07/2016 1:55 AM, Leo wrote: > > I am learning how to use Django. With my first attempt I did not use a > > virtual environment instead installed Django system-wide. Now I have > > learned to utilize

<    1   2   3   4   5   6   7   8   9   10   >