So I am following the tutorial in this site, and copy and the first three
codes into my project (polls/views.py, polls/urls.py, and mysite/urls/py)
https://docs.djangoproject.com/en/1.7/intro/tutorial03/
polls/views.py
from django.http import HttpResponse
def index(request):
return HttpResp
Hi,
I have 2 models:
@python_2_unicode_compatible
class Document(models.Model):
uuid = models.CharField(max_length=32, editable=False, unique=True)
contractor = models.ForeignKey(Contractor)
stagcy = models.ForeignKey(StateAgency)
type = models.CharField(max_length=25)
year =
I am using this site to learn Django, and at this link
https://docs.djangoproject.com/en/1.7/intro/tutorial03/
I created the polls/urls.py, polls/views.py, and mysite/urls.py files as
followed in the site, but when I run the site, the site is running OK, but
I do not see the "Hello, World..." m
On Mon, Oct 20, 2014 at 1:53 AM, Алексей Широков wrote:
> SELECT ...
> FROM "document_document"
> INNER JOIN "document_sending" ON ("document_document"."id" =
> "document_sending"."document_id")
> INNER JOIN "document_sending" T4 ON ("document_document"."id" =
> T4."document_id")
> WHERE ("documen
Javier, I am unable combine 2 parameters in a single call filter(), because It
is built on different levels of code.
Is there another solution???
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving
On Mon, Oct 20, 2014 at 3:43 AM, Алексей Широков wrote:
> Javier, I am unable combine 2 parameters in a single call filter(), because
> It is built on different levels of code.
>
> Is there another solution???
you can build up a dictionary and expand as parameters on a single
filter() call:
Thank you very much Javier!!!
I've thought about it. I will try.
--
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
When you say nothing changes, how are you calling the page? And what do you
see in your browser - any error message or stack trace or is it just a
blank page?
Also I assume the below were copied from the tutorial. Can you post the
contents of the three files as you typed them in your code?
On
Solution here:
http://stackoverflow.com/questions/19699136/python-django-tangowithdjango-models-and-databases
On Wednesday, June 4, 2014 2:01:44 PM UTC+4, Srinivasulu Reddy wrote:
>
> Hello Folks,
>I am learning tangowithdjango book . In chapter 5 while dealing
> the Populated Script
Now I try change this part of code in views.py
#request.user.set_password(form.cleaned_data['password2'])
#request.user.save()
#return render(request,
'registration/change_password_success.html', {'user': request.user})
On
from django.contrib.auth import logout,
I have a lot of form(31) am looking for a way to divide them into multiple
pages but current I seem not to find any way of doing this.
All the other pagination methods seem to favour those displaying data not
those displaying forms.
Am using class based view(View)
DataInputProcessor(View):
I've been looking into django joins, and I can see how I can select related
fields with .select_related but I can't seem to get it to work how I want.
I basically have summary tables that are linked to the customers table with
customer_id FK's, I want to select the customer name from the custome
Hi Ken,
On 10/18/2014 12:55 PM, Ken Winter wrote:
> OK, I've written and unit-tested the database components - see
> https://drive.google.com/file/d/0B-thboqjuKZTSjRHTXhqMlo3RlU/view?usp=sharing.
>
> Now I could use a little advice on the Django part.
>
> I believe that all that is needed is to
Update:
The django app and the django server are both using the same Python
interpreter.
If I try to set a breakpoint in the app, the breakpoint does not exist
warning actually is a local file but is in the remote_sources cache:
Connected to pydev debugger (build 135.1057)
pydev debugger: warn
Hi Pat,
On 10/18/2014 03:47 PM, Pat Claffey wrote:
> Hi,
> yes this is possible. I have recently done this tutorial and succeeded
> in customizing the title.
> In my opinion the instructions in this part of the tutorial are hard to
> understand. Here is what I did:
>
> 1.0 Navigate to the proj
*Please can anybody help me with 404 errors?*
*I put this in my settingsfile: *
import re
IGNORABLE_404_URLS = (
re.compile(r'^/apple-touch-icon.*\.png$'),
re.compile(r'^/favicon\.ico$'),
re.compile(r'^/robots\.txt$'),
)
*but I still get 404 errors reported for robots.txt: What am
Opened, https://code.djangoproject.com/ticket/23695
--
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 gr
Hello,
If you didn't say "can't modify models", I would for sure recommend custom
methods on each model.
Otherwise, I think Thomas's suggestion is right.
Thanks,
Collin
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this
Hello,
from django.contrib.auth import logout,login,authenticate,password_change
I think you want:
from django.contrib.auth import logout,login,authenticate
from django.contrib.auth.views import change_password
Collin
--
You received this message because you are subscribed to the Google Groups
Hi,
Are you using model formsets? Would something like this might work?
page = Paginate(queryset, 16).page(request.GET.get('page') or 1)
formset = MyFormSet(queryset=page.object_list)
Collin
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
I am calling the page with "python manage.py runserver 0.0.0.0:8000" When I
load up the page before adding the views and urls files, I see the polls
and everything that I have set up with the codes from the previous pages of
the tutorial. After adding the views and urls files, the page looks th
Hi Sabine,
IGNORABLE_404_URLS = (
re.compile(r'^/apple-touch-icon.*\.png$'),
re.compile(r'^/favicon\.ico$'),
re.compile(r'^/robots\.txt$'),
)
remove the slash at the beginning:
IGNORABLE_404_URLS = (
re.compile(r'^apple-touch-icon.*\.png$'),
re.compile(r'^favicon\.ico$'),
r
Hello,
You're probably looking for this page.
https://docs.djangoproject.com/en/1.4/topics/i18n/translation/
Collin
--
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
Hi,
I'm working on porting our codebase to django 1.7, and we use a custom user
model. For that, we need to override the user creation and password reset
forms.
For the form's Meta class, we have
class Meta:
model = get_user_model()
where get_user_model is imported form django.contrib.au
Hi,
I want to make my custom filter into drop down filter,
class PersonIdFilter(SimpleListFilter):
title = _('Personid')
parameter_name ='personid'
contlist = list(PersonInfo.objects.all())
def lookups(self, request, model_admin):
lst = []
for id in self.contlist
ok that max(the_max) didn't work every time it provide a different result
(looking into this) just updating the post in case someone was looking into
this as a solution.
On Thursday, October 16, 2014 12:21:33 AM UTC-5, dk wrote:
>
> looks like it works like this
>
> the_max = Choice.objects.fil
Hi
I have an existing PostgreSQL database where all tables have sequences
associated to their primary key and no, I can't change it.
When I create a ModelForm it generates "Required field" for the ID field
because it doesn't have any data.
Any ideas how to manage this situation?
Regards,
Nés
27 matches
Mail list logo