erver.
Do the environments have to be the same in development and production?
Is it possible to develop locally with f.ex SQLite and then deploy to the
server that runs Postgres?
I don't know if I'm totally out of bounds here, please help me understand
deployment.
Regards
Goran
-
Hi,
I have a Django project with its DB. How can I use Django DB users to
auth, for example, vsftpd? I mean, I couldn't find suitable SQL query to
check the password. Thank you!
signature.asc
Description: Digital signature
There is no usual way to do this because you can have anything behind menu
item. So here is what I do in the same situations. Let say that we have
some categories listed in your navi. Every category must have unique ID so
in navi view pass some variable with that ID for example "foo = entry.pk"
>From my opinion you as user don't have appropriated permissions. Ask from
your server administrator to upgrade your permissions. You will have the
same problem later when django apps try to create folders to store images
or something other but it depend from your installed apps.
On Saturday,
You can always use IF
for foo in bar:
if foo == 1:
do something even redirect
else:
foo
On Wednesday, June 26, 2013 5:09:58 PM UTC+2, Harjot Mann wrote:
>
> What are the methods to break forloop?
>
--
You received this message because you are subscribe
It's because class A doesn't have unicode defined, so by default primary
key is used to present objects of the class A. Create unicode function and
return any field you need.
class A (models.Model):
field1 = models.CharField (max_length = 10)
def __unicode__(self):
return sel
Just add related name to the artist field in the Drawinds model artist =
models.ForeignKey(Artist, related_name='drawings')
Then you can use X.drawings.count() when is needed. It also works in the
template, Let say that you have list with some artists named 'foo' so in
the template you can coun
Try to use "safe" filter in which case table will be interpreted as HTML
{{ dftable|safe }} or as second solution, call dftable.allow_tags=True in
the view.
On Saturday, June 22, 2013 9:35:01 AM UTC+2, Nigel Legg wrote:
>
> I want to allow users to upload a file and then view the data from it.
Thanks Bill, seems that cron is the easiest way even if I don't like
it. I was looking for more pythonic way. Anyway thanks for reply.
Goran
On Aug 29, 7:26 pm, Bill Freeman wrote:
> Presuming deleted sometime on the day is close enough, write a
> management command that querie
maybe it is path problem,
try to use:
from projectname.base.view import io
not base.view import io
in INSTALLED_APPS use:
'projectname.base',
not just 'base',
hope it helps,
Goran
On Aug 28, 2:59 am, CrabbyPete wrote:
> I developed my code with python 2.6 and dj
I have model with DateTimeField where I store date when object will be
deleted.
class Something(models.Model):
...
end_date = models.DateTimeField(editable=False, blank=True,
null=True)
after some request my app store future date in that field using:
something.end_date = datetime.dat
Works great! Thank you very much!
Goran
On Sep 8, 3:51 pm, bagheera wrote:
> Dnia 08-09-2010 o 15:41:13 Goran napisał(a):
>
>
>
> > Thanks for your help but I think that understand how template works.
> > My menu is drop down menu with menu items which comes from vari
Thanks for your help but I think that understand how template works.
My menu is drop down menu with menu items which comes from variable
{{ for menuitem in myvariable }}
{{ menuitem.title }}
{{ endfor }}
and myvariable is in my view:
myvariable = Item.objects.all()
So if I extend base.html menu i
I'm Django novice and I want to have some menu (top menu) which have
some dynamically populated items. So inside home page view I have some
variables to get these menu items. But because it's top menu I need it
on every page on the site and i have about 20 views. So I'm place
these variables ( db
I need to install some php application (forum) in some folder domain/
forum How can I do this? Django 1.2 Appache with FastCgi, shared
hosting. Is it possible to exclude url "domain/forum" from django
somehow?
--
You received this message because you are subscribed to the Google Groups
"Django u
Thanks Owen but is doesn't work. The similar Error message:
contribute_to_class
if self.meta:
AttributeError: 'Options' object has no attribute 'meta'
On Aug 30, 8:03 pm, Owen Nelson wrote:
> Sorry to be guessing here, but I was looking at something similar recently.
> My attempt (untested a
Finally problem is fixed. In the admin/media/js was been files from
Django 1.1 after uplod 1.2 files everything works as expected.
On Aug 30, 6:52 pm, Goran wrote:
> I agree with you but it is the situation. I didn't know Django version
> on the production server (shared) befor
I was try
class Meta(FlatPage.Meta):
but when runserver there is following error:
AttributeError: type object 'FlatPage' has no attribute 'Meta'
any other solution to try?
Thanks
On Aug 30, 12:53 am, Steve Holden wrote:
> On 8/29/2010 6:51 PM, Goran wrote:
>
Django and any third-part app - at
> least you'd have a chance to find out what happens when something goes
> wrong.
>
> On 29 août, 23:58, Goran wrote:
>
> > I have strange problem, on my development server everything is fine
> > but I'm use Dja
Holden wrote:
> On 8/25/2010 8:26 PM, Goran wrote:> I need another verbose_name_plural for
> Flat pages so i need to
> > overrideclassmetafor it right? How can I do that?
>
> [Caveat: this is a guess from general Python knowledge]
>
> Have you tried creating a sub
I have strange problem, on my development server everything is fine
but I'm use Django 1.1 but on the production server (Django 1.2)
prepopulated_fields don't work. Does anyone have the same problem? Any
suggestion?
class UniverzitetAdmin(admin.ModelAdmin):
prepopulated_fields = {"url": ("nazi
I need another verbose_name_plural for Flat pages so i need to
override class meta for it right? How can I do that?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscrib
I'm Django novice and trying to get some search page. I'm lost almost
all day trying to extract ForeignKey value from my QuerySet without
success. Have city name which is ForeignKey in MyModel and I always
get result = []. Here is my last view.
from django.db.models import Q
from django.shortcuts
> Are you talking about:
> # in your template
> {{ reg }}
>
> Does works for you?
>
> ~Rolando
>
Yes! It works! Thank you very much Rolando
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us
Hi,
I'm novice with django and I use simple form with select option
method. Options come from db and it works fine. When user submit form
i have selected option as string and can not save it to db because
this table is models.ForeighKey(AnotherTable) and I need ID of
selected option to pass it to
t appears to be working properly!
I looked into it and it could have had to do with this ticket:
http://code.djangoproject.com/ticket/10750 which was recently fixed.
Thanks again for your help
Goran
On May 10, 4:58 pm, Margie wrote:
> I've used that a lot and never had a problem.
>
26 matches
Mail list logo