get_model()

2010-07-07 Thread Kenneth Gonsalves
hi, any reason why get_model() in django.db.models is not documented? Or is it just that I cannot find it? -- Regards Kenneth Gonsalves Senior Associate NRC-FOSS at AU-KBC -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: models.py import from other models.py

2010-07-07 Thread Yuya Goriki
Thanks. But I tried it, it causes "unresolved import". I suppose to I failed to explain my application. MyProjectMaster---models.py | Appli-models.py settings.py manage.py settings.py //-- INSTALLED_APPS = ( 'django.

Re: Is {% cycle ... as ... %} supposed to output a value?

2010-07-07 Thread Karen Tracey
On Wed, Jul 7, 2010 at 11:53 AM, ringemup wrote: > Is this a bug or the desired behavior? > http://code.djangoproject.com/ticket/13567 is open on this issue. Karen -- http://tracey.org/kmt/ -- You received this message because you are subscribed to the Google Groups "Django users" group. T

Re: models.py import from other models.py

2010-07-07 Thread raj
try importing from myproject.master.models, not master.models. Rajeesh. -- 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 unsubscribe from this group, send email to djang

Re: list display based on logged-in user

2010-07-07 Thread raj
Try overriding changelist_view of your ModelAdmin. Reset self.list_display based on user and then call the super method changelist_view. Rajeesh. On Jul 8, 2:40 am, rahul jain wrote: > I would like to display model fields based on the logged-in user. > How is it possible ? -- You received thi

models.py import from other models.py

2010-07-07 Thread yugori
Hi, I'm beginner. I tried to execute 'manage.py syncDB' command, but it's not work. My package is like .. MyProjectMaster---models.py | Appli-models.py MyProject/Appli/models.py is .. //- from Master.models import WebBrowser class A

Re: Is Django admin's "delete confirmation" considered RESTful?

2010-07-07 Thread Margie Roginski
Thanks Euan - I think that clarifies things. Thanks very much for your responses! Margie On Jul 7, 8:50 am, "euan.godd...@googlemail.com" wrote: > I think in the strict REST sense, it would be best to POST to one URL > with the list of object IDs to delete to set this action up and then > redire

Re: Serializing non-queryset data

2010-07-07 Thread Jonathan Hayward
Never mind; I found: import json def view(request): ... my_result = ... return HttpResponse(json.dumps(my_result), mimetype="application/json") On Wed, Jul 7, 2010 at 6:05 PM, Jonathan Hayward < christos.jonathan.hayw...@gmail.com> wrote: > I just tried: > > json_serializer.serializ

Re: Log errors to file

2010-07-07 Thread Brian Neal
On Jul 7, 4:35 pm, Jonathan Hayward wrote: > I'm working on a view made to output JSON for Ajax use. My log has: > > [07/Jul/2010 17:47:13] "POST /ajax/login HTTP/1.1" 500 50678 > > That looks like Django gave a helpful and detailed stacktrace page, albeit > to jQuery expecting JSON. If there is

Re: Smarter URLs

2010-07-07 Thread Rodion Raskolnikiv
Many thanks to you both! That was enough info to get things working! On Jul 7, 11:36 am, ringemup wrote: > Add a SlugField to the Page model, and populate it based on the title > (this can be done automatically either via the admin's > prepopulated_fields, or via a custom model save() method) >

Re: Redirection to login screen goes to Apache root in non-root mod_wsgi based Django app

2010-07-07 Thread Graham Dumpleton
I posted something about it on Django developers list, so keep an eye out for it there. Graham On Jul 8, 12:25 am, Jacob Fenwick wrote: > Just as a followup: > > http://code.djangoproject.com/ticket/8906 > > Looks like they will never fix this or recognize it as a bug. > > I find this kind of di

Re: Log errors to file

2010-07-07 Thread Jonathan Hayward
Thank you! On Wed, Jul 7, 2010 at 5:35 PM, elijah rutschman wrote: > You could implement a middleware class with a process_exception > method. See: > http://docs.djangoproject.com/en/dev/topics/http/middleware/#process_exception > > -Elijah > > On Wed, Jul 7, 2010 at 4:35 PM, Jonathan Hayward >

Serializing non-queryset data

2010-07-07 Thread Jonathan Hayward
I just tried: json_serializer.serialize(result, ensure_ascii = False, stream = response) where result was boolean. I got an error complaining that it was not iterable, and http://docs.djangoproject.com/en/dev/topics/serialization/seems to discuss serialization of querysets. In this case I can ea

Re: Log errors to file

2010-07-07 Thread elijah rutschman
You could implement a middleware class with a process_exception method. See: http://docs.djangoproject.com/en/dev/topics/http/middleware/#process_exception -Elijah On Wed, Jul 7, 2010 at 4:35 PM, Jonathan Hayward wrote: > I'm working on a view made to output JSON for Ajax use. My log has: > [0

Create a specific instance in the admin?

2010-07-07 Thread jmat
If I have models like below where I have a multiple instance of the base manufacturer (could be inherited or I could just have a OneToOne relationship): class Manufacturer(models.Model): name = models.CharField(max_length=128) class ManuType1(Manufacturer): def myfunc(self, str): r

Re: URL Trouble

2010-07-07 Thread Bradley Hintze
Thanks, that was it! On Wed, Jul 7, 2010 at 5:54 PM, Daniel Roseman wrote: > On Jul 7, 10:48 pm, Bradley Hintze > wrote: >> Hi all, >> >> I am trying to followhttp://docs.djangoproject.com/en/1.2/topics/forms/ >> >> I put contact.html in myTemplates. >> >> But when I try to bring up '../contact'

v1.2 message framework - messages created outside of the request cycle

2010-07-07 Thread jyunis
Hey all, I'm currently developing an application using Django's deprecated user messaging functionality and one of the features I depend on is the ability to set messages for a particular user from a back-end process, i.e. outside of the request cycle. In my backend process, I have access to the

Re: URL Trouble

2010-07-07 Thread Daniel Roseman
On Jul 7, 10:48 pm, Bradley Hintze wrote: > Hi all, > > I am trying to followhttp://docs.djangoproject.com/en/1.2/topics/forms/ > > I put contact.html in myTemplates. > > But when I try to bring up '../contact' i get a 404 error. Here are the > details. > > Using the URLconf defined in testing123

URL Trouble

2010-07-07 Thread Bradley Hintze
Hi all, I am trying to follow http://docs.djangoproject.com/en/1.2/topics/forms/ I put contact.html in myTemplates. But when I try to bring up '../contact' i get a 404 error. Here are the details. Using the URLconf defined in testing123.urls, Django tried these URL patterns, in this order: ^tes

list display based on logged-in user

2010-07-07 Thread rahul jain
Hi there ! I would like to display model fields based on the logged-in user. If user is restricted user list_display = (field1, field2) else list_display = (field1, field2, field3, field4) How is it possible ? --RJ -- You received this message because you are subscribed to the Google Group

Log errors to file

2010-07-07 Thread Jonathan Hayward
I'm working on a view made to output JSON for Ajax use. My log has: [07/Jul/2010 17:47:13] "POST /ajax/login HTTP/1.1" 500 50678 That looks like Django gave a helpful and detailed stacktrace page, albeit to jQuery expecting JSON. How can I ask Django to log uncaught exceptions to a file or equiv

unit testing and not creating database for read only database

2010-07-07 Thread thusjanthan
Hi, So I have a read only database called "information" which has been modeled in the django framework with the managed=false for the META on all its tables. When I run unit tests on another app I do not want the unit tests to go and create a test database for "information" but would rather like t

Extra Column, change_list newforms view in admin. recursion issues....

2010-07-07 Thread hagan
I'm hoping somebody has run into this issue before, failing that, perhaps someone can see a glaring mistake in my code.. I'm getting a recursive loop somehow while following the example: http://code.djangoproject.com/wiki/NewformsHOWTO#Q:HowdoIaddanextracolumntothechangelistview In the __init__.p

Re: Query raises a DoesNotExist error

2010-07-07 Thread Nick
A lot of this is me trying to find out why it's failing. The problem I'm getting is that there is a FullProfile associated with the email address. When i go through the steps in the shell it works perfectly. When I run it through the form it throws an error. If you look at the custom ValidationErro

Re: Filter based on result of model method

2010-07-07 Thread Wiiboy
> articles = [article for article in > Article.objects.all().select_related('permission') if > article.permission.can_view_article(request.user)] The only problem I see is that is that 'articles' is a list, not a queryset. The reason I was using q.exclude(pk=item.pk) is because the return value

Re: Smarter URLs

2010-07-07 Thread ringemup
Add a SlugField to the Page model, and populate it based on the title (this can be done automatically either via the admin's prepopulated_fields, or via a custom model save() method) class Page(models.Model): title = models.CharField(max_length=50) slug = models.SlugField() Then use a reg

Re: Smarter URLs

2010-07-07 Thread Rodion Raskolnikiv
To clarify, I would like to take the current url form of: /dept_id/page_id/ (which looks like /2/13/) into a url that looks like this: /accounting/policy_for_travel_expenses/ (which puts the title of the element in place of the element ID) I am getting at the elements by ID this way: (r'^(?P

Re: Is {% cycle ... as ... %} supposed to output a value?

2010-07-07 Thread David Koblas
As somebody who ran across this bug a few weeks ago (using comment to capture the output). I _really_ wish the behavior would die. Personally I would be in favor of dropping output when there is an "as" attribute, if somebody depends on it in the 1.3 timeframe there could be a setting that w

debugging methods

2010-07-07 Thread John Griessen
Is there a way to use the manage.py shell option to run the server code and have a shell also? bin/django shell gives me a ipython shell... Also, I've gotten some help from the developer of django-page-cms and he's not likely to respond until tomorrow. What methods of debugging did he mean wh

Re: contrib.auth.views - n00b question

2010-07-07 Thread reduxdj
Chris, You led me down the right track, the problem being my registration app was in two paths at the same time, I guess there was some craziness going on with the errors. Thanks for your time. I hate being new at Django, I want to be seasoned. Thanks, Patrick On Jul 7, 9:45 am, Chris Lawlor wro

Re: How to record/capture IP address of user/registrant in Django

2010-07-07 Thread NoviceSortOf
Thanks Thusjanthan... That certainly will work. Now request.META['REMOTE_ADDR'] it seems it would be possible somehow to add a field to our userprofile or auth_user table such as last_ip_used and record that customers last IP when using the system. This makes easier for us to track from the ap

Re: Query raises a DoesNotExist error

2010-07-07 Thread Nuno Maltez
At a glance: >        try: >            FullProfile.objects.get(email=email) >        except FullProfile.DoesNotExist: > >         test = > FullProfile.objects.get(email=self.cleaned_data['email']) >         raise forms.ValidationError("%s" % (test)) Shouldn't the second FullProfile.objects.get

Re: Query raises a DoesNotExist error

2010-07-07 Thread Bill Freeman
My bet is that FullProfile.objects.get is raising the error because there is no profile with that email address. You might expect this to be caught by the "try" and raise a validation error instead, but since you have no "except" clause, its not going to happen. On Wed, Jul 7, 2010 at 1:22 PM, Ni

Query raises a DoesNotExist error

2010-07-07 Thread Nick
I am working on a form to resend an account activation email for newly registered users who did not receive their first email. The form is currently raising a DoesNotExist error and I can't figure out why: Here is the activation code: class resend_activation(forms.Form): email = forms.EmailF

Re: Smarter URLs

2010-07-07 Thread Daniel Lathrop
I'm not quite clear on what you're asking, but if the issue is how to write a regex for slugs: The regular expression you need for slugs is *[\w\d\-]+* Hope that helps. Daniel --- Daniel Lathrop On Wed, Jul 7, 2010 at 9:32 AM, Rodion Raskolnikiv wrote: > Greetings! > I

Re: Is {% cycle ... as ... %} supposed to output a value?

2010-07-07 Thread David De La Harpe Golden
On 07/07/10 17:27, Bill Freeman wrote: > I agree that the "as" clause makes me expect it to render nothing, but it > has worked this way at least back to 1.0, so I guess changing it is not > an option. hypothetical, could add an "only" clause maybe to preserve backward compat? {% cycle 'odd' 'eve

Generate image to pdf

2010-07-07 Thread Waleria
Hi all, I'm trying generate a image to pdf. Well, is to convert a Figure matplotlib's object to an image or object that can be drawImage used in the canvas. See my code like this: http://paste.pocoo.org/show/234628/ My urls.py: urlpatterns = patterns('simuladores.detector.views', (r'^grafic

Re: Is {% cycle ... as ... %} supposed to output a value?

2010-07-07 Thread Tom Evans
On Wed, Jul 7, 2010 at 5:37 PM, ringemup wrote: > Elements with display:none sadly trigger the same bug.  Looks like a > custom tag may be in order. > I'm not being funny, but given that you know about this (extremely rare edge case) bug, just output it somewhere where it _cannot_ trigger the bug

Pre-Registration User versus Registerred User?

2010-07-07 Thread iJames
I think my brains have been un-djangoed because I think I'm missing something obvious. I've got the user model linked in with my own model serving as the profile which is working for registerring and authenticating a user. But I'm wondering how to have a guest be able to do some things with the i

Smarter URLs

2010-07-07 Thread Rodion Raskolnikiv
Greetings! I am trying to implement a very simple (yet elegant) solution for a university departmental website in django. In designing my urls, I desired to have them follow this pattern: university.edu/department/page_title_made_into_slug However, I couldn't get it working or find any doc tha

custom delete() function not called in "ON DELETE CASCADE" emulation ??

2010-07-07 Thread Ugrash the Hated
Hi, I have this class (representing real files on a filesystem): class File(models.Model): content = models.ForeignKey('Content', related_name='files') filetype = models.ForeignKey('FileType') filename = models.CharField(max_length=64, verbose_name='filename') I added a custom dele

Re: Problem with inserting images

2010-07-07 Thread Adesanya Adewale
Follow the link suggested by Daniel On Wed, Jul 7, 2010 at 8:44 AM, Daniel Roseman wrote: > On Jul 7, 4:26 pm, Imad Elharoussi wrote: > > Hi, > > I'm a begginer with django. I had a probleme inserting an image > > I did this in the template: > > > > the image is inthe same directory but at the

Re: Is {% cycle ... as ... %} supposed to output a value?

2010-07-07 Thread ringemup
Elements with display:none sadly trigger the same bug. Looks like a custom tag may be in order. On Jul 7, 12:34 pm, Tom Evans wrote: > On Wed, Jul 7, 2010 at 5:25 PM, ringemup wrote: > > I guess that's a workaround.  It would be a bit less tricky if HTML > > comments in the wrong place didn't b

Re: Is {% cycle ... as ... %} supposed to output a value?

2010-07-07 Thread Tom Evans
On Wed, Jul 7, 2010 at 5:25 PM, ringemup wrote: > I guess that's a workaround.  It would be a bit less tricky if HTML > comments in the wrong place didn't break output in IE6[1] (no, I can't > drop IE 6 support yet). > > This behavior just seems odd to me, since other tags with an "as" > option (

Re: Is {% cycle ... as ... %} supposed to output a value?

2010-07-07 Thread Bill Freeman
You could perhaps put it in a span with display:none; . Or you can always create your own template tag with the desired behavior. The source for the existing tag is in .../django/template/defaulttags.py . On Wed, Jul 7, 2010 at 12:25 PM, ringemup wrote: > I guess that's a workaround.  It would b

Re: Is {% cycle ... as ... %} supposed to output a value?

2010-07-07 Thread Bill Freeman
I agree that the "as" clause makes me expect it to render nothing, but it has worked this way at least back to 1.0, so I guess changing it is not an option. On Wed, Jul 7, 2010 at 11:55 AM, ringemup wrote: > Er, that was sloppy of me.  Actual output: > > >  a >  a >  b >  b >  a >  a > > > On J

Re: Is {% cycle ... as ... %} supposed to output a value?

2010-07-07 Thread ringemup
I guess that's a workaround. It would be a bit less tricky if HTML comments in the wrong place didn't break output in IE6[1] (no, I can't drop IE 6 support yet). This behavior just seems odd to me, since other tags with an "as" option ( e.g. {% url ... as ... %}) do not output when they're called

Re: Is {% cycle ... as ... %} supposed to output a value?

2010-07-07 Thread Tom Evans
On Wed, Jul 7, 2010 at 5:00 PM, thusjanthan wrote: > This is the desired behavior. Until the loop is done it cycles the > given values you provided in your case 'a' 'b' and since the loop is > running 3 times it cycles back to 'a' again. > > Cheers, > Thusjanthan > Thats not precisely what he was

Re: Is {% cycle ... as ... %} supposed to output a value?

2010-07-07 Thread ringemup
Yes, sorry, I know the values are correct. What's concerning me is that the {% cycle ... as ... %} statement is *outputting* the value each time through the cycle instead of just *setting* the {{ mycycle }} variable so that it can be output as needed. On Jul 7, 12:00 pm, thusjanthan wrote: > T

Re: Queryset composition query

2010-07-07 Thread Tom Evans
On Wed, Jul 7, 2010 at 5:06 PM, Jeff Green wrote: > When I combine two query sets I use the chain command. You might want to try > it. > > Here is my code snippet > > from itertools import chain chain is useful when you want to concatenate two lists together. In this case though, I want distinct

Re: Queryset composition query

2010-07-07 Thread Jeff Green
When I combine two query sets I use the chain command. You might want to try it. Here is my code snippet from itertools import chain # Get current station configuration records stationlist = StationConfig.objects.filter(StationId=result.StationId, StartDate__lte= result.Ex

Re: Is {% cycle ... as ... %} supposed to output a value?

2010-07-07 Thread thusjanthan
This is the desired behavior. Until the loop is done it cycles the given values you provided in your case 'a' 'b' and since the loop is running 3 times it cycles back to 'a' again. Cheers, Thusjanthan On Jul 7, 8:55 am, ringemup wrote: > Er, that was sloppy of me.  Actual output: > > >   a >  

Re: Is {% cycle ... as ... %} supposed to output a value?

2010-07-07 Thread ringemup
Er, that was sloppy of me. Actual output: a a b b a a On Jul 7, 11:53 am, ringemup wrote: > I thought that {% cycle 'a' 'b' as mycycle %} was supposed to just set > the variable {{ mycycle }} and not output anything to the template. > > However, the following template (with myrang

Is {% cycle ... as ... %} supposed to output a value?

2010-07-07 Thread ringemup
I thought that {% cycle 'a' 'b' as mycycle %} was supposed to just set the variable {{ mycycle }} and not output anything to the template. However, the following template (with myrange=[1, 2, 3]): {* start template *} {% for i in myrange %} {% cycle 'a' 'b' as mycycle %} {{ mycycle }}

Re: Is Django admin's "delete confirmation" considered RESTful?

2010-07-07 Thread euan.godd...@googlemail.com
I think in the strict REST sense, it would be best to POST to one URL with the list of object IDs to delete to set this action up and then redirect to another URL with a GET which asks for confirmation based on the previous setup and then POSTs to delete. This keeps it RESTful in the sense of one U

Re: Problem with inserting images

2010-07-07 Thread Daniel Roseman
On Jul 7, 4:26 pm, Imad Elharoussi wrote: > Hi, > I'm a begginer with django. I had a probleme inserting an image > I did this in the template: > > the image is inthe same directory but at the output there is no image > please help http://docs.djangoproject.com/en/1.2/howto/static-files/#howto-s

Problem with inserting images

2010-07-07 Thread Imad Elharoussi
Hi, I'm a begginer with django. I had a probleme inserting an image I did this in the template: the image is inthe same directory but at the output there is no image please help -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gr

Re: Is Django admin's "delete confirmation" considered RESTful?

2010-07-07 Thread Margie Roginski
Actually, the confirmation page is not accessed via a GET. Using the admin's auth model as an example: the user does a GET to something like www.example.com://admin/auth/user to get a list of users. Then they checkmark the users they want to delete, select the "delete" action, and then click on "

Re: After sync signal?

2010-07-07 Thread Russell Keith-Magee
On Fri, Jul 2, 2010 at 9:02 PM, felix wrote: > you might have already seen this ticket: > > http://code.djangoproject.com/ticket/7561 > > re: post-sync isn't actually post sync If you search the django-dev archives, you'll find some discussion around this ticket. Any proposal in this area needs t

Re: Redirection to login screen goes to Apache root in non-root mod_wsgi based Django app

2010-07-07 Thread Jacob Fenwick
Just as a followup: http://code.djangoproject.com/ticket/8906 Looks like they will never fix this or recognize it as a bug. I find this kind of disappointing and confusing. If they're going to do that why not just get rid of the {% url %} tag and make people always declare their absolute URL (i

Re: Apache config trouble

2010-07-07 Thread Bradley Hintze
BINGO. Thanks! The newbie didn't think of the syntax error being in the file, thought it was in httpd.conf. Found it, fixed it, all is well. I'm sure I'll be posting more. Thanks for the help again, Bradley On Wed, Jul 7, 2010 at 10:06 AM, Nuno Maltez wrote: > Hi, > > Are you sure the syntax er

Queryset composition query

2010-07-07 Thread Tom Evans
Hi all I'm trying to combine two querysets, and having a difficult time explaining why one bit of code works, and why similar code doesn't. I'm probably doing something wrong.. This is a customer management system: User objects are arranged into UserGroup objects, with a through table called User

Re: Apache config trouble

2010-07-07 Thread Nuno Maltez
Hi, Are you sure the syntax error isn't in the wsgi file itself? /Library/WebServer/testing123/apache/django.wsgi Nuno On Wed, Jul 7, 2010 at 3:02 PM, Bradley Hintze wrote: > Hi all, > > I'm getting the following error n the apache error log: > > [Wed Jul 07 09:53:12 2010] [error] [client 152.1

Apache config trouble

2010-07-07 Thread Bradley Hintze
Hi all, I'm getting the following error n the apache error log: [Wed Jul 07 09:53:12 2010] [error] [client 152.16.223.251] mod_wsgi (pid=425): Exception occurred processing WSGI script '/Library/WebServer/testing123/apache/django.wsgi'. [Wed Jul 07 09:53:12 2010] [error] [client 152.16.223.251]

Re: contrib.auth.views - n00b question

2010-07-07 Thread Chris Lawlor
The 'from gather import login, logout' line at the bottom of the stack trace looks pretty suspicious. Could you post the code to 'gather' and explain how your files are laid out? On Jul 7, 12:51 am, reduxdj wrote: > Thanks, It looks like still have this nagging n00b issue, the problem > seems to

Re: Filter based on result of model method

2010-07-07 Thread Wiiboy
> Everytime you call exclude (btw, this should be q = > q.exclude(pk=item.pk), no?), Yes =) I wrote that quickly with my post. > articles = [article for article in > Article.objects.all().select_related('permission') if > article.permission.can_view_article(request.user)] Good idea. -- You r

How to completely reload settings during tests?

2010-07-07 Thread 3lancer.eu
Hello, In my tests.py file I have two classes (TestCases). Each one of them must be run using different settings file. Of course setting def setUp(self): os.environ['DJANGO_SETTINGS_MODULE'] = 'project.settings_module' won't work, as the environment is already ready at this point. How

Re: Filter based on result of model method

2010-07-07 Thread Matthias Kestenholz
On Sat, Jul 3, 2010 at 7:20 PM, Wiiboy wrote: > Is there a way to filter based on the result of a model instance > method? > > I've got a Permission model with a one-to-one relationship with an > Article.  The Permission model stores the different groups that the > Article author said could read t

Re: New tutorial added to Django by Example

2010-07-07 Thread euan.godd...@googlemail.com
Hi again, I've had a read over your blog tutorial and have the following suggestions: 1) Make it PEP-8 (http://www.python.org/dev/peps/pep-0008/) compliant - it's a lot easier to read. 2) Except only the error that might occur in the paginatior example. Bare excepts are BAD. 3) Maybe consider ena

Re: Filter based on result of model method

2010-07-07 Thread euan.godd...@googlemail.com
As stated there is no way to filter on any non-field attribute, property or method. However, don't despair. If the result of your permission check can be expressed as another Django query then it should be possible to construct something in the ORM that uses this. That said, we have had trouble wi

Re: Is Django admin's "delete confirmation" considered RESTful?

2010-07-07 Thread euan.godd...@googlemail.com
I'm not entirely sure whether you're asking one question or two here. Firstly, I think that in the RESTful sense, there's nothing wrong with having a confirmation page that uses the same URL to perform an action *providing* the HTTP verb is different. In this case the confirmation page is accessed

Re: Calling some javascript for new visitors only

2010-07-07 Thread euan.godd...@googlemail.com
You'll need to do the test in the view and then pass the result of the test into the template. On Jul 7, 10:13 am, grimmus wrote: > Hi, > > I need to show a javascript lightbox popup for new visitors to my > site. > > I presume using a cookie is the best way to achieve this. But how can > i check

Calling some javascript for new visitors only

2010-07-07 Thread grimmus
Hi, I need to show a javascript lightbox popup for new visitors to my site. I presume using a cookie is the best way to achieve this. But how can i check whether the cookie exists in my template, so i can call some javascript code if it's a new visitor ? I hope i have been clear, Thanks -- Yo

Re: Debugging Django under wsgi and pydev

2010-07-07 Thread Dmitry Dulepov
Hi! Doug Warren wrote: > Is there a way to run a django app that's being served on the local > machine via Apache and mod_wsgi using the integrated debugger in wsgi? > I did a few google searches but nothing popped out as being the > obvious solution, other than a suggestion from google to run ap