Thank You, once again it help :)
W dniu poniedziałek, 20 października 2014 23:55:28 UTC+2 użytkownik Collin
Anderson napisał:
>
> Hello,
>
> from django.contrib.auth import logout,login,authenticate,password_change
> I think you want:
> from django.contrib.auth import logout,login,authenticate
>
On Tuesday, 21 October 2014 00:01:56 UTC+1, Tri Vo wrote:
>
> 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
What is the best way to restrict access of files to specific users. I want
to give read access to the user who uploaded the files.
In the normal django implementation there seems to be no way to restrict
access to file uploads in MEDIA_ROOT. What's the best way to achieve this?
Ideally I would
*What's been done so far:*
- I was on Django 1.5 and upgraded to 1.6 (cannot go higher as we are on
Python 2.6) and this did not solve the problem.
- I have researched this issue to death and cannot seem to find a
definite answer. Looking through the Django Project Bug Tracker, I h
What you want to do is first restrict access to the model instance to which
the file is associated. Presumably this model has a foreign key to your
User model which you'd associate with the uploading user. Then your view
will return some non-200 response, like a 401 response if the requesting
u
Hi Derek,
Interesting. Do you know why it's trying to import your form before the app
registry is ready? It seems to me it might be possible to delay until after
the app registry is ready. Could you post a traceback?
Thanks,
Collin
--
You received this message because you are subscribed to th
Hi Sachin,
Interesting. It seems to me that should work. Could you post a traceback?
Thanks,
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
to django-user
Dear Experts,
Under Django 1.7 I have, among other things, the following:
### models.py
class Patients(models.Model):
surname = models.CharField(max_length=60, db_index=True)
name = models.CharField(max_length=60, db_index=True)
address = models.CharField(max_length=150)
city = m
Hi Néstor,
Are you using an AutoField()? It seems to me that _should_ work correctly.
In any case setting editable=False should fix it.
Otherwise, would it work to put your primary key field in exclude?
class MyForm(forms.ModelForm):
class Meta:
model = MyModel
exclude = ['i
Hi Paul,
Interesting. Your code should work fine. So if you run this code in the
shell it gives a FieldError?
affpart.damage_types.all()
What do your sitar models look like? There should not be a ManyToManyField
in the other direction.
Collin
--
You received this message because you are sub
On Tuesday, 21 October 2014 14:32:04 UTC+1, Paul Childs wrote:
>
> *What's been done so far:*
>
>- I was on Django 1.5 and upgraded to 1.6 (cannot go higher as we are
>on Python 2.6) and this did not solve the problem.
>- I have researched this issue to death and cannot seem to find a
Hi Vittorio,
Would this work?
class OperationAdmin(admin.ModelAdmin):
list_display = ('patient','date_of_operation')
fields = ('patient', 'patient_address', 'patient_city_zip',
'date_of_operation')
readonly_field = ['patient_address', 'patient_city_zip']
inlines= [DetailsInline
Hey Collin,
I had no problem in the shell...
In [4]: AffectedPart.objects.all().count()
Out[4]: 4090
# pick a random AffectedPart
In [5]: affpart = AffectedPart.objects.all()[22]
In [6]: affpart.damage_types.all()
Out[6]: []
I'm not sure why this doesn't work running under the server.
On Tue, Oct 21, 2014 at 7:09 AM, Ben Lopatin wrote:
> Presuming you're working with Nginx or
> Apache and local files, you can use X-Accel-Redirects or X-Sendfile to do
> this. Basically the request for a file is made to your Django app, e.g.
> /files/some-file-name.doc, and the app checks if the
oops readonly_field should be readonly_field*s*
--
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,
Here is the stack trace...
Environment:
Request Method: POSTRequest URL: http://127.0.0.1:8000/trending/trend/
Django Version: 1.6Python Version: 2.6.7Installed
Applications:('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.cont
Hi Paul,
This is great. The traceback helps. Could post more of your
convert_queryset_to_lists. It looks like a list comprehension and there may
be more complicated things going on there.
Thanks,
Collin
--
You received this message because you are subscribed to the Google Groups
"Django user
Hi Paul,
Try putting 'trending' in INSTALLED_APPS.
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
to django-users+unsubscr...@googlegroups.com.
To post to
I really do not understand what is happening. I have a 404.html along with
a 500.html in my template directory. They are both simple and look like
this:
404.html:
Server Error 404!Das netTeachers-Team ist informiert und kümmert
sich darum.
Wir hoffen auf Ihr Verständnis.
500.html:
Server E
Thank you very much for your help Collin!
Am Dienstag, 21. Oktober 2014 03:29:38 UTC+2 schrieb Collin Anderson:
>
> Hi Sabine,
>
> IGNORABLE_404_URLS = (
> re.compile(r'^/apple-touch-icon.*\.png$'),
> re.compile(r'^/favicon\.ico$'),
> re.compile(r'^/robots\.txt$'),
> )
> remove the sla
I am SHOCKED. That was the problem. THANK YOU
I guess that leads to a couple of questions:
1. How did you know!?!
2.I have the same code in production and it was working with no problems.
Any idea why?
Cheers!
On Tuesday, October 21, 2014 1:12:33 PM UTC-3, Collin Anderson wrote:
>
> Hi Pau
Hallöchen!
I want to implement an initial data migration (basically, the same
thing initial_data.json used to do). The problem is that my initial
data must be connected with ContentType instances. However,
update_all_contenttypes() hasn't been called at this stage, so my
migration fails.
As far
Hey Torsten,
Are you talking about Django 1.7 migrations or South? In the former case
you need to make sure that your datamigration depends on the
contenttypes application.
If you use South: yes, calling update_all_contenttypes seems to be a
valid solution.
Best,
Markus
On Tue, Oct 21, 2014 a
Ok, I forgot say this. I'm using a different server to run Django. It works
on the server that I am using.
On Tue, Oct 21, 2014 at 3:42 AM, Daniel Roseman
wrote:
> On Tuesday, 21 October 2014 00:01:56 UTC+1, Tri Vo wrote:
>>
>> I am calling the page with "python manage.py runserver 0.0.0.0:8000"
Hi Sabine,
It may be an issue with your core.context_processors.resolvermatch.
I recommend setting ADMINS so you get the error emailed to you.
https://docs.djangoproject.com/en/dev/howto/deployment/checklist/#admins-and-managers
https://docs.djangoproject.com/en/dev/ref/settings/#admins
Collin
Great, it works!
Thanks a lot Collin
Ciao from Rome
Vittorio
Il giorno 21/ott/2014, alle ore 18:00, Collin Anderson ha scritto:
> Hi Vittorio,
>
> Would this work?
>
> class OperationAdmin(admin.ModelAdmin):
> list_display = ('patient','date_of_operation')
> fields = ('patient', 'patie
Hi Paul,
1. How did you know!?!
>
I hack... kidding :). I suspected something wasn't getting loaded, and the
list of installed apps was in the traceback you posted.
2.I have the same code in production and it was working with no problems.
> Any idea why?
>
In development, most, if not all of yo
Thanks man. This was a huge relief!
On Tue, Oct 21, 2014 at 2:35 PM, Collin Anderson
wrote:
> Hi Paul,
>
> 1. How did you know!?!
>>
> I hack... kidding :). I suspected something wasn't getting loaded, and the
> list of installed apps was in the traceback you posted.
>
> 2.I have the same code i
Hallöchen!
Markus Holtermann writes:
> Are you talking about Django 1.7 migrations or South? In the
> former case you need to make sure that your datamigration depends
> on the contenttypes application.
I'm talking about Django 1.7 migrations. Unfortunately,
contenttypes is already migrated bef
Hi All,
I have a question: how to use table A.column1 as parameter to query result
from table B?
I have two tables :
1. UserStay
idcandidatePoiIdsselectedPoiId
1101,102,103 100
2. POIs
id name address
100 starbuck 100 main st,
101 mcdonalds 101 m
Hello all!
I have this models:
class Article(models.Model):
name = models.CharField(...)
class Sale(models.Model):
...
class SaleItems(models.Model):
article = models.ForeignKey(Article)
And the Admin:
class SaleAdmin(admin.ModelAdmin):
search_fields = ('...', < and here is the proble
I think you are trying to establish a many-to-many relationship between the
models, that way it would be like this
poiRes = models.ManyToManyField(POIS)
and the candidatePois is unnecessary in that case.
On Tue, Oct 21, 2014 at 3:16 PM, zhang rock wrote:
> Hi All,
>
> I have a question: how
On Tue, Oct 21, 2014 at 4:19 PM, Sabine Maennel
wrote:
> I really do not understand what is happening. I have a 404.html along with a
> 500.html in my template directory. They are both simple and look like this:
>
> 404.html:
>
> Server Error 404!
> Das netTeachers-Team ist informiert und kümmert
Im not sure I understand so maybe I am stating the obvious here... but
"python manage.py runserver" shouldnt call the page. It should start your
dev server. Then you call http://localhost:8000/polls as Daniel mentioned
when the server is started.
On Tuesday, 21 October 2014 18:14:34 UTC+1, Tri
On Saturday, October 18, 2014 1:16:32 PM UTC+1, pranee...@gmail.com wrote:
>
> Hi,
> I am new to django. I am following Django tutorial(part2). I want to
> know how to customize title of my admin page from "*Django
> administration" to " some Text".* Help me..*! *Thanks in advance..
>
I am looking for a django project based tutorial with fully developed
eStore or a commerce solution.
Please advise.
--
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 emai
Try this:
http://www.getlfs.com/
On Tue, Oct 21, 2014 at 11:28 PM, Mudassar Hashmi <
mudassarhashm...@gmail.com> wrote:
> I am looking for a django project based tutorial with fully developed
> eStore or a commerce solution.
>
> Please advise.
>
> --
> You received this message because you are s
Hi Collin,
It works when I comment the filters.py
and change admin.py as below,
from receivedata.filters import DropdownFilter
class PersonAdmin (admin.ModelAdmin):
list_filter = (PersonIdFilter)
Thanks & Regards,
Sachin Tiwari
--
You received this message because you are subscribed t
Hi, i need sum inlines field but i no have idea
example for more clean, i have 2 models
in models.py i have:
class ModelA(models.Model):
field1 = charfield(...)
field2 = integeterfield()
.
CHOICE_TYPE = ((1,"option1"),(2,"option2"),(3,"option3"))
class ModelB(models.Model):
39 matches
Mail list logo