Hi,
I built a site with django. Now i have a stupid (i couldnt understand) problem.
Everything works perfect but when i try to login and
registration/login.html is rendered, there is a margin at the top of
the login.html. And the font size increases 1 or 2 points. Font family
and other css elemen
Hi,
I'm developing a project by django 1.2.3. Now it's time to bring the
project to production. I'm looking for dedicated servers but i dont
know the minimum hardware requirements. There are dedicated options
with P4 cpus. Is there any information about requirements?
Thanks all,
--
You received
Hi,
Yesterday i moved my site to a linux solution. Everything is going
fine, except admin site. When i go to url example.com/admin, the
template doesnt work. When i look at the source, i see these:
But i dont have any urls or files on example.com/media/css/base.css
or
example.com/media/css/l
admin/media/"
2010/12/2 ozgur yilmaz :
> Hi,
>
> Yesterday i moved my site to a linux solution. Everything is going
> fine, except admin site. When i go to url example.com/admin, the
> template doesnt work. When i look at the source, i see these:
>
>
>
>
&
Hi all,
I hope i can explain my query problem well. Think you have 3 classes:
class City( models.Model ):
...
...
class Brand( models.Model ):
...
...
class Shop( models.Model ):
brand = models.ForeignKey( Brand )
city = models.ForeignKey( City )
...
...
class Discount( models.Model ):
bute "name".
>
> HTH
>
> Jirka
>
>
>
> On Fri, Nov 9, 2012 at 9:12 AM, ozgur yilmaz wrote:
>>
>> Hi all,
>>
>> I hope i can explain my query problem well. Think you have 3 classes:
>>
>> class City( models.Model ):
&
Maybe:
paris_discounts = Discount.objects.filter( brand__shop__city__name =
'Paris' ).distinct('id')
What do you think?
2012/11/9 ozgur yilmaz :
> But Brand doesnt have a city field. Shop class has a city field.
>
> 2012/11/9 Jirka Vejrazka :
>> paris_
Hi, I have a problem.
I have two models:
class CheckOut(models.Model):
models.DateField()
class Product(models.Model):
checkout = models.ForeignKey( CheckOut )
name = models.CharField()
price = models.FloatField()
With these models, i want to contruct a CheckOut form, and select
mul
yazdı:
> I don't know the answer, but you may want to check this
> out: http://www.satchmoproject.com/
>
> 2011/8/23 ozgur yilmaz
>>
>> Hi, I have a problem.
>>
>> I have two models:
>>
>> class CheckOut(models.Model):
>>
thanks,
but i think i have to use a suitable js for adding a new product. am i wrong?
2011/8/23 Shawn Milochik :
> On 08/22/2011 05:21 PM, ozgur yilmaz wrote:
>>
>> thats not the answer. you can add item to basket by clicking a button
>> "add to basket" on every i
times, to add multiple product? Is it a common
way? Thanks again,
2011/8/23 Shawn Milochik :
> On 08/22/2011 05:33 PM, ozgur yilmaz wrote:
>>
>> thanks,
>>
>> but i think i have to use a suitable js for adding a new product. am i
>> wrong?
>>
>
>
Thanks Shawn,
I think i satisfied with this way. It seems a suitable way for Django.
I'll use it. Thanks again,
2011/8/23 Shawn Milochik :
> On 08/22/2011 05:44 PM, ozgur yilmaz wrote:
>>
>> Ok. Thank you so much. So, formset is a suitable way to achieve this.
>>
Windows XP and windows 7. Notepad++. Mysql. South.
2011/8/23 Shawn Milochik :
> On 08/22/2011 06:07 PM, Stephen Jackson wrote:
>>
>> I am new to the world of Django. I would like to hear from other django
>> developers describe their dev environment (tools, os, editors, etc.).
>
> Ubuntu, virtuale
Hi all,
I have 4 classes and i want to build a get_absolute_url() for a class,
querying other 3 classes. But i get "list index out of range" error
for the FILTER row. Any ideas?
class Aaa( models.Model ):
...
...
class City( models.Model ):
...
...
class Bbb( models.Model ):
aaa
Hi all,
I'm using template fragment caching in my project. I'm wondering what
the view function do when template fragment caching is active? Are
queries in the view function be executed? Or bypass the queries and
read the cached fragment?
Thanks,
--
You received this message because you are sub
Thank you for information:)
2013/2/16 Christophe Pettus :
>
> On Feb 16, 2013, at 9:16 AM, Christophe Pettus wrote:
>
>>
>> On Feb 16, 2013, at 8:50 AM, ozgur yilmaz wrote:
>>
>>> I'm using template fragment caching in my project. I'm wondering what
&
Hi all,
I have to build a query, if possible an inexpensive query:
Model A:
...
...
Model B:
ForeignKey( Model A )
Date
...
Model B is an activity with a date field. I want to find which Model A
objects didnt join an activity between specific dates.
What are the appropriate ways to find this r
_date
, activity_date__lte = specific_end_date )
a_objects = A.objects.exclude( kisi__in = b_objects )
Is it enough?
2013/2/26 carlos :
> Hi, maybe use DateField__range(date1,date2)
>
> Cheers
>
>
> On Tue, Feb 26, 2013 at 5:43 AM, ozgur yilmaz wrote:
>>
>> Hi
of column you can add an index on
> fielddate ( check explain output to see if it's useful since it depends on
> db backend/ dbengine/structure of the table to make it 'inexpensive' )
>
> ~ Ronan
>
>
> On Tue, Feb 26, 2013 at 9:59 AM, ozgur yilmaz wrote:
>>
Hi,
I want to change the filetype of any uploaded image to JPG. What is
the most efficient way for this? I think i surely do this before
save(). Any ideas?
Thanks,
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send ema
oad, save=False)
super( MyModel , self ).save()
2011/4/15 ozgur yilmaz :
> Hi,
>
> I want to change the filetype of any uploaded image to JPG. What is
> the most efficient way for this? I think i surely do this before
> save(). Any ideas?
>
> Thanks,
>
--
You
Hi,
I want to use an expression like this:
{{ i }}
The first {{ i }} is in another tag. is there any way to manage this problem?
Thanks,
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@google
TemplateSyntaxError at /the/url/
qstring_set requires 1 arguments, 0 provided
2011/5/26 Nikhil Somaru :
> Could you detail the error raised when you visit the page?
>
> On Thu, May 26, 2011 at 12:38 PM, ozgur yilmaz wrote:
>>
>> Hi,
>>
>> I want to use an
hat yet but could be worth a shot.
>
> https://docs.djangoproject.com/en/1.3/ref/templates/builtins/#with
>
>
> On Thu, May 26, 2011 at 9:08 AM, ozgur yilmaz wrote:
>> Hi,
>>
>> I want to use an expression like this:
>>
>> {{ i }}
>>
>>
Hi,
I have a custom templatetag function like this:
@register.filter(name='rem_get_request')
def rem_get_request(getrequest,name):
req = getrequest.copy()
for get_item in name.split('&'):
if get_item in req and req[get_item]:
get_item = get
I realized that, there's nothing wrong with the removing code. The
problem is the return statement. when the dictionary req is empty the
def returns u"" and somehow old request.GET remains unchanged. So i
should return a specific value, when the dictionary req is null.
2011/6
Hi,
After i modified some models, i started to get following errors:
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\django\core\servers\basehttp.py",
line 280, in run
self.result = application(self.environ, self.start_response)
File "C:\Python26\lib\site-packages
Hi,
I'm using sitemap with django. But because of the django_site config
in DB, sitemap.xml displays domain without WWW prefix.
If i use PREPEND_WWW = True, when i use IP address in browser, the
setting prepend www to the IP, so address looks like:
www.11.111.11.111.
Is there any solution method
Hi,
I'm trying to use model formsets. At first, everything is normal. But when i
open the form page for the second time, i see that the formset is pre-filled
with the previous values. Here is my code:
models.py
---
class FooModel( models.Model ):
a_field = models.FloatFi
Hi,
I'm on centos and have two pythons 2.5 and 2.6.
I tried in models.py:
from fractions import Fraction
and got the error: No module named fractions
But when i use shell and type "from fractions import Fraction" it's OK, it
uses python2.6 installation.
How can i modify django installation to
I have Centos, and it comes with python2.4(sorry, not 2.5). I installed
python2.6 and django is under:
/usr/lib/python2.4/site-packages/django
/usr/lib/python2.6/site-packages/django
i defined alias in bash_profile, so when i give "python" command from shell,
python2.6 works...
2010/12/30 Robbin
Hi there,
I want to limit the characters for a charfield with [a-z\-] (characters from
a to z (lowercase) and '-' )
Is there any way you know?
Thanks,
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django
It was possible in the past with validator_list. Like:
regex = r'^[A-z][\w-]{2,31}$'
name = models.CharField(max_length=32, unique=True ,
validator_list=[validators.MatchesRegularExpression(regex)] )
But with what code to override the clean method? Is there any sample or
built in function for t
Yes, i know overriding field cleand method, but i couldnt get a start point
for character match code.
2011/2/4 Shawn Milochik
>
> On Feb 4, 2011, at 2:47 PM, ozgur yilmaz wrote:
>
> It was possible in the past with validator_list. Like:
>
> regex = r'^[A-z
Maybe RegexValidator can solve this problem. But i couldnt manage to use it:
from django.core.validators import RegexValidator
alias = models.CharField( max_length = 100, unique = True,
validators=[RegexValidator('[a-z]')] )
2011/2/4 ozgur yilmaz
> Yes, i know overriding field
/2/4 ozgur yilmaz
> Maybe RegexValidator can solve this problem. But i couldnt manage to use
> it:
>
> from django.core.validators import RegexValidator
> alias = models.CharField( max_length = 100, unique = True,
> validators=[RegexValidator('[a-z]')] )
>
>
>
>
In your template:
In your urls.py:
site_media = os.path.join(os.path.dirname(__file__),'site_media')
urlpatterns = patterns('',
(r'^site_media/(?P.*)$' ,
'django.views.static.serve',{'document_root':site_media}),
)
Maybe helps...
2011/2/4 h@ck5t0ck
> Hi guys,
> am very new to d
try:
old_user = User.objects.get(pk=self.pk)
# means update
except:
pass
2011/2/4 andmart
> Hi,
>
> I overrided the save_model of ModelAdmin of model Client that is
> associated a one User so I can create a user when a client is created.
>
> Well, how to know if the save_model was ca
Hi,
I'm using file caching. But need to increment a field for storing product
hits. Is there an optimal way to do this?
Thanks,
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
No suggest?
2011/2/7 ozgur yilmaz
> Hi,
>
> I'm using file caching. But need to increment a field for storing product
> hits. Is there an optimal way to do this?
>
> Thanks,
>
--
You received this message because you are subscribed to the Google Groups
"Djang
40 matches
Mail list logo