Re: How to approach

2021-11-04 Thread Robin Riis
i agree with kasper, but one tip is to start with the user class. check out django.contrib.auth.base_user Den tors 4 nov. 2021 kl 18:36 skrev Kasper Laudrup : > On 04/11/2021 14.54, Trippy Samurai wrote: > > Hi there, > > I am new to django and have a problem statement am not quite sure how to >

Re: recursos premium en Django

2022-10-10 Thread Marcelo Robin
muchas gracias !!! ya los estoy siguiendo !!! El dom, 2 oct 2022 a la(s) 07:10, ASAMOAH EMMANUEL ( emmanuelasamoah...@gmail.com) escribió: > Hola compañeros desarrolladores, he configurado un canal privado en > telegram donde he puesto recursos premium. Los recursos cubren el > desarrollo web de

Re: Loop through QuerySet in Django

2022-11-04 Thread Marcelo Robin
I have a problem El jue., 3 nov. 2022 16:40, subin escribió: > Please let me know if that is okay. > > On Wed, Nov 2, 2022 at 5:03 PM Marcelo A. Robin > wrote: > >> I have a processors.py file where I generate a context processor to load >> static data into my proj

Re: Question re: input

2023-04-01 Thread Robin Riis
What kind of environment are we talking about? But i guess you mean that you have a server in one location and multiple clients from diffrent locations that should be able to upload some kind of data to the server. SSH is great to connect to a remote machine in a secure manner. And scp to send fi

Re: Adding extra registration fields to my user registration

2023-04-01 Thread Marcelo Robin
you can create an application called profile where in its models you can place all the fields you need to add about the user. This video explains how you can do it. https://youtu.be/R8EHCohLvbw El jue, 30 mar 2023 a la(s) 00:08, Ebenezer Otchere (swazyman1...@gmail.com) escribió: > I want to coll

Re: Question re: input

2023-04-01 Thread Robin Riis
You can check out rabbitMQ if it can fit your needs. Theres a plugin in django that simplifies integration. On Sat, Apr 1, 2023, 19:06 o1bigtenor wrote: > On Sat, Apr 1, 2023 at 9:51 AM Robin Riis wrote: > > > > What kind of environment are we talking about? > >

Re: Using JavaScript to enumerate a dataset returned to a page.

2023-06-19 Thread Robin Riis
With vanilla js for(let i = 1; i < myArray.length; i += 1) { document.log("index: " + i); document.log(myArray[i] + "\n"); } Wrote this on my phone so may contain some fault, but a for-loop is sufficent. On Mon, Jun 19, 2023, 16:29 Lee Stevens wrote: > Helo, > > I have a dataset return

Re: strftime

2012-06-21 Thread robin nanola
i think i would be better if you read python datetime docs http://docs.python.org/library/datetime.html#datetime.date.strftime On Thu, Jun 21, 2012 at 4:47 PM, armagan wrote: > Hi, > > I'm trying to show the date in rss with this function > > def item_pubdate(self, item): > > date

Re: union of two QuerySets

2012-08-01 Thread Robin Pedersen
On Monday, December 11, 2006 4:37:25 AM UTC+1, Rares Vernica wrote: > > Hi, > > What is a way to get the union of two QuerySets? > > Something like: > > In [6]: a = Person.objects.filter(first_name__startswith='mic') > > In [7]: b = Person.objects.filter(first_name__startswith='joh') > > In [8]: a

Re: union of two QuerySets

2012-08-06 Thread Robin Pedersen
'), > models.Q(first_**name__startswith='joh')) > (only one query...) > > > 2012/8/1 Robin Pedersen > >> On Monday, December 11, 2006 4:37:25 AM UTC+1, Rares Vernica wrote: >>> >>> Hi, >>> >>> What is a way to get the

Re: Weird Model question django

2011-08-23 Thread robin nanola
what is the use of the article foreignkey in the UserProfile model? On Tue, Aug 23, 2011 at 2:34 PM, raj wrote: > nvm, I think i'm starting to figure it out. Need to read up on many-to- > many fields. > > On Aug 23, 2:21 am, raj wrote: > > This may be difficult to explain. I'm a little new to d

Django project - Allow users to write a custom function and store in DB

2013-02-15 Thread Robin Fordham
in if needed. So essentially I want to parse a string and convert it to a function. Anyone got any pointers to send me in the right direction? Thanks. Robin. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Re: Django project - Allow users to write a custom function and store in DB

2013-02-15 Thread Robin Fordham
with an array of LEDs and am building a Django front end to control them, few of the chaser functions are while loops which would hang up everything, so pushing them to a subprocess over celery should be ideal. BTW django + nginx + fastcgi runs surprisingly well on a pi! Thanks for the help guys!

Re: Django project - Allow users to write a custom function and store in DB

2013-02-15 Thread Robin Fordham
> Very cool. > > Please post some notes about whole thign. Not as cool as it may sound, more me playing and trying to learn a bit of digital electronics and improve my coding skills. Video of my setup; http://youtu.be/MFISZPqdbD4 My code (note this is just the python object, django side of it i

Re: The problem with storing relative paths

2013-02-15 Thread Robin Fordham
Hi jonni, How about something like; FORMTEMPLATE_PATH = os.path.join(settings.PROJECT_PATH, 'templates/forms' class Somemodel(models.Model): formtemplate = FilePathField(path='FORMTEMPLATE_PATH', match=".\*.htm[l]") . . On Friday, February 15, 2013 4:14:44 PM UTC, JZ

Fwd:

2013-07-30 Thread Robin Lery
-- Forwarded message -- From: Robin Lery Date: Tue, Jul 30, 2013 at 9:22 PM Subject: To: django-users@googlegroups.com Hello, I am stuck at a point where i should be able to type in a search query on the page and it django should get back a list of matching pages if any. But it

django jquery

2013-07-31 Thread Robin Lery
Hi, Can any one please suggest good book or tutorials if possible regarding django and ajax (jquiry). I looked at one book "Django JavaScript Integration AJAX and jQuery", but it was very confusing and outdated as well, didn't help much.Please suggest tutorials or books with latest version. Would

Re: django jquery

2013-07-31 Thread Robin Lery
o templates? If you can be more specific in your goals, > more direction can provided. > > Jonathan > > > On Wed, Jul 31, 2013 at 10:14 AM, Robin Lery wrote: > >> Hi, >> Can any one please suggest good book or tutorials if possible regarding >> dja

Friendship model

2013-08-08 Thread Robin Lery
Hi, How do i create a Friendship model? Please guide me. Thank you. -- 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

Re: Friendship model

2013-08-09 Thread Robin Lery
Thank you! I'll check on it. On Fri, Aug 9, 2013 at 12:36 PM, Rahul Gaur wrote: > > > On Fri, Aug 9, 2013 at 9:38 AM, Andy McKay wrote: > >> On Thu, Aug 8, 2013 at 12:41 PM, Robin Lery wrote: >> >>> How do i create a Friendship model? Please guide me. &g

django ajax runtime error - URL doesn't end in slash

2013-08-10 Thread Robin Lery
I am practicing from a tutorial where I have reached to create a search box with jquery and ajax. Every thing is going good, except, when i press any key in the search, I get an error, RuntimeError at /articles/search You called this URL via POST, but the URL doesn't end in a slash and you have AP

Re: django ajax runtime error - URL doesn't end in slash

2013-08-10 Thread Robin Lery
nathandavidba...@gmail.com> wrote: > Can you paste the markup for your search form? > > Sent from my iPhone > > On Aug 10, 2013, at 11:46 AM, Robin Lery wrote: > > I am practicing from a tutorial where I have reached to create a search > box with jquery and ajax. Every thing

django windows user

2013-08-10 Thread Robin Lery
Hello, I am a windows user, and its great learning django and python as well. I am just curious that, when I happen to deploy my site for production, is it helpful to deploy in unix system. And if there is, please guide me to use ssh and other stuff that is required to deploy so. Any help will be h

Re: django windows user

2013-08-11 Thread Robin Lery
If you have specific questions, please ask them and the community would be > glad to assist. > > -A > > > > On Sat, Aug 10, 2013 at 3:27 PM, Robin Lery wrote: > >> Hello, >> I am a windows user, and its great learning django and python as well. I >> am jus

Re: django windows user

2013-08-12 Thread Robin Lery
Thank you all! Just one more question though, does hosting provider provides any interface like virtual machine or so? It would have been great if they were. On Mon, Aug 12, 2013 at 5:09 AM, Mike Dewhirst wrote: > On 12/08/2013 8:47am, Aaron C. de Bruyn wrote: > >> MySQL or Postgresql for your d

RequestContext and request.user

2013-08-16 Thread Robin Lery
Hello, I am all confused about these two things: context_instance = RequestContext and request.user Are they both equal? I suppose RequestContext includes a user varialble from the given template. And request.user would also give the current user's info, i guess. Can someone please give me insight

Re: RequestContext and request.user

2013-08-17 Thread Robin Lery
Thank you Lucas! On Fri, Aug 16, 2013 at 10:55 PM, Lucas Magnum wrote: > Robin, > RequestContext, includes TEMPLATE_CONTEXT_PROCESSORS results. > request is a result of "django.core.context_processors.request". > > > https://docs.djangoproject.com/en/dev/ref/templa

django query

2013-08-17 Thread Robin Lery
Hello, I have a model like this: class Forum(models.Model): question = models.CharField(max_length=150) body = models.TextField() pub_date = models.DateTimeField(default=datetime.now) image = models.ImageField(upload_to=get_upload_file_name) creator = models.ForeignKey(User, related_name="creator_

django static files through apache in windows

2013-08-22 Thread Robin Lery
I have configured apache to serve my project. But I can't yet configure it to serve static files. Till now in my httpd.conf I have appended the code that django documentation provides and its like this: WSGIScriptAlias / C:/Users/robin/web/facebook/facebook/wsgi.py WSGIPythonPath C:/

Re: django static files through apache in windows

2013-08-22 Thread Robin Lery
my STATIC_ROOT = 'C:/Users/robin/web/static_files_for_facebook/' STATIC_URL = '/static/' In httpd.conf I have added: #Serve static files AliasMatch /static/ C:/Users/robin/web/static_files_for_facebook/ Order deny,allow Allow from all After collectstatic command

Re: django static files through apache in windows

2013-08-22 Thread Robin Lery
STATICFILES_DIRS = ( ('assets','C:/Users/robin/web/facebook/static'), ) On Thu, Aug 22, 2013 at 11:36 PM, Robin Lery wrote: > my > > STATIC_ROOT = 'C:/Users/robin/web/static_files_for_facebook/' > > STATIC_URL = '/static/'

Re: django static files through apache in windows

2013-08-22 Thread Robin Lery
In my html file I have link the css with 'assets', `href="{% static "assets/css/face.css" %}">`. But there are two folders `assets` and `admin`, after I made the command collectstatic. Is it the problem? Should I direct css to `admin`? On Thu, Aug 22, 20

my django admin page don't have the css when viewed over the apache server

2013-08-24 Thread Robin Lery
http.conf snippet: WSGIPythonPath C:/Users/robin/web/etc/etc Order deny,allow Allow from all #Alias /robots.txt /path/to/mysite.com/static/robots.txt #Alias /favicon.ico /path/to/mysite.com/static/favicon.ico AliasMatch ^/([^/]*\.css) C:/Users

Re: Import Error: cannot import name timezone

2013-08-24 Thread Robin Lery
It should be 'from django.utils import timezone' and not 'from django.db.utils import timezone' On Sun, Aug 25, 2013 at 2:58 AM, Patrick Larmann wrote: > He Guys, > I am currently completing part 1 of the django tutorial and having trouble > with getting on of the modules correctly set up. > I

Re: Import Error: cannot import name timezone

2013-08-25 Thread Robin Lery
Good to hear that! On Sun, Aug 25, 2013 at 7:19 AM, Patrick Larmann wrote: > Thanks fixed it? > > > On Saturday, August 24, 2013 5:45:47 PM UTC-4, Robin Lery wrote: > >> It should be >> 'from django.utils import timezone' >> and not >> '

Passing variables to css file in django

2013-08-25 Thread Robin Lery
Is it possible to pass variables in css files, like in html file. Example: In views.py: def home(request): bgcolor = "#999" ... ... In the css file: body { background-color : {{bgcolor}}; } If yes, can you please guide me how to achieve this? I wou

Re: Passing variables to css file in django

2013-08-25 Thread Robin Lery
Oh! I am sorry. What I meant was, how do I let users customize their page if they wanted to? I suppose I could have done this without using external stylesheet, but yes, CSS is served fastest if it's static. I hope, I made myself clear. Please guide me if there's a way to achive this On Mon, Aug

Re: [] error

2013-08-26 Thread Robin Lery
You gave the .pyc file. On Mon, Aug 26, 2013 at 7:47 PM, Patrick Larmann wrote: > Hello guys I am following the django docs tutorial part 1 and am having > trouble moving on. Instead of receiving [] i get [ Poll object>]. I have tried converting the unicode to str but to no avail. > I am just

Re: Removing the logged in user's name from the list of users in django

2013-08-30 Thread Robin Lery
or likes in forum.likes.all.reverse %} > > > On Friday, August 30, 2013 10:35:46 AM UTC-5, Robin Lery wrote: >> >> I have a template that displays the numbers of likes and name of the >> users liked the forum. But I don't want the request.user's (logged in >&g

Do I always have to run collectstatic to serve uploaded images by apache?

2013-09-04 Thread Robin Lery
any better way to do this? my settings.py snippet: MEDIA_ROOT = 'C:/Users/Robin/web/leo/static' STATIC_ROOT = 'C:/Users/Robin/static/' STATICFILES_DIRS = ( "C:/Users/Robin/web/leo/static", apache http.cont snippet: AliasMatch ^/([^/]*\.css) C:/Users/Robin/

Re: Do I always have to run collectstatic to serve uploaded images by apache?

2013-09-05 Thread Robin Lery
it say in your Apache logs? > Try debugging this like you would an Apache configuration error. > > K > > > On Thursday, September 5, 2013 8:35:49 AM UTC-7, Robin Lery wrote: > >> I did as you told, but I can only see it, when I reload the page served >> by the

Does easy thumbnails for django work for apache server?

2013-09-05 Thread Robin Lery
I have a page, which is served by apache. When I upload images by the django's server (on localhost:8000) page, it does show me the uploaded image properly. However when I upload images by the apache server (on localhost) page, it does not show the uploaded image. Only when I reload the page on the

Re: Do I always have to run collectstatic to serve uploaded images by apache?

2013-09-05 Thread Robin Lery
The problem was the easy-thumbnails tag! After I removed it, I was good to go. Thanks though! On Thu, Sep 5, 2013 at 10:41 PM, Robin Lery wrote: > my models.py : > > def get_upload_file_name(instance, filename): > return "uploaded_files/%s_%s" %(str(time()).repl

Re: Does easy thumbnails for django work for apache server?

2013-09-05 Thread Robin Lery
And also in the uploaded directory it was creating an extra image for the same image. On Thu, Sep 5, 2013 at 11:42 PM, Robin Lery wrote: > I have a page, which is served by apache. When I upload images by the > django's server (on localhost:8000) page, it does show me the uploa

Re: Do I always have to run collectstatic to serve uploaded images by apache?

2013-09-05 Thread Robin Lery
tic assets, not user > submitted content. Your system is misconfigured and that is why it is > collecting user submitted files. > > K > > > On Wednesday, September 4, 2013 12:41:03 PM UTC-7, Robin Lery wrote: >> >> I have a site, where users can upload images. And

Re: Do I always have to run collectstatic to serve uploaded images by apache?

2013-09-05 Thread Robin Lery
ub_date = models.DateTimeField(default=datetime.now) creator = models.ForeignKey(User, related_name="creator_set") likes = models.ManyToManyField(User, through="Like") class Meta: ordering = ['-pub_date'] verbose_name_plural = ('Status') def __unicode__(self): r

sorl-thumbnail or easy thumbnail with apache

2013-09-09 Thread Robin Lery
Hello, Has anyone tried sorl-thumbnail or easy_thumbnail with apache for users uploaded media images??? I am really stuck with these. When I upload it using the apache server, it does not load the uploaded image, it only loads the ones that have been run through the django's inbuilt server. And onl

Re: sorl-thumbnail or easy thumbnail with apache

2013-09-09 Thread Robin Lery
I have used it in the templates. Do i use it in the models for uploaded images??? On Tue, Sep 10, 2013 at 1:31 AM, Robin Lery wrote: > Hello, > Has anyone tried sorl-thumbnail or easy_thumbnail with apache for users > uploaded media images??? I am really stuck with these. When I

Re: Advanced Tutorial (how to write reusable app), last step does not work

2013-09-09 Thread Robin Lery
In order to create a reusable app, you have to create a new 'templates' folder in your app and place the the absolute path in the templates directory in your settings.py. And then create the html files as concerned with your app in the templates directory you created within the app.

Resize image size in the view

2013-09-10 Thread Robin Lery
Hello, I have been trying to achieve thumbnail for the uploaded images, but it just don't seem to resize the image on the apache server when the page is loaded. Only when I run through the django's inbuilt server, it loads the uploaded image. So, is there any way, that I can specify the size of the

Resize image in the view

2013-09-10 Thread Robin Lery
Hello, I have been trying to achieve thumbnail for the uploaded images using sorl-thumbnail and easy_thumbnail, but it just don't seem to resize the image on the apache server when the page is loaded. Only when I run through the django's inbuilt server, it loads the uploaded image. So, is there any

Re: Resize image size in the view

2013-09-10 Thread Robin Lery
ou try use http://sorl-thumbnail.readthedocs.org/en/latest/ >> is good >> >> Cheers >> >> >> On Tue, Sep 10, 2013 at 10:53 PM, Robin Lery wrote: >> >>> Hello, >>> I have been trying to achieve thumbnail for the uploaded images, but it >&g

Re: Resize image size in the view

2013-09-11 Thread Robin Lery
I really don't know where I am making mistake. Could please kindly check where I am wrong? This is my *apache http.conf:* WSGIScriptAlias / C:/Users/Robin/web/leo/leo/wsgi.py WSGIPythonPath C:/Users/Robin/web/leo Order deny,allow Allow from all #Alias /robots.txt /path/to/mysit

Iframe sandbox security

2013-10-16 Thread Robin Lery
I was planning to create an app where the users can create their own blog page and others can link it in my web, like facebook. And then, I thought about using iframe with the sandbox attribute to view the page with the safe filter in the template. So, is it safe to implement it in this way??? Or i

django-ckeditor image upload giving wrong url of the image

2013-10-17 Thread Robin Lery
When I try text editing and other text related stuffs and save it, the editor does its job nicely. But when I try to upload an image it just take a different url. I am on windows. Is it because of this, cause I saw a post on this post

Getting GIS Working - possible kernel32 problem

2013-10-25 Thread Robin St.Clair
oint me in the correct direction, I'm banging my head Thanks Robin *GEODJANGOGeos, TRACEBACK* "C:\Program Files\JetBrains\PyCharm 3.0.1\bin\runnerw.exe" C:\Python27\python.exe "C:\Program Files\JetBrains\PyCharm 3.0.1\helpers\pycharm\django_manage.py" runserver 888

Re: Django ManyToMany performance?

2013-10-27 Thread Robin St.Clair
First of all , any DBMS that is misused by design or in operation will give poor performance.. There is an excellent mature database available for Django developers, PostgreSQL. It works fine on the same machine as you are developing on. MongoDB is NOT a suitable DB for general purposes. It is

Django Transactions Performance increase

2013-10-29 Thread Robin Fordham
cannot do a filter and a .update() on the queryset, as each row's update data is distinct). Thanks. Regards, Robin. -- 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

Re: Django Transactions Performance increase

2013-10-29 Thread Robin Fordham
is a valid foo value, row[2] is a valid baa value. Thanks. Robin. -- 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...@googlegr

django - differentiate users in the template

2013-10-30 Thread Robin Lery
So, I am trying to create a user page, and its url will be associated with its username, something like this http://domain.com/accounts/profile/robin/ And in that page, I want all the photo's uploaded by that user (here 'robin') to be displayed in the template. And another thing

Django - How to combine queries in to one and display it in the template?

2013-11-03 Thread Robin Lery
Suppose this is a model for an app Blog: class Blog(models.Model): title = models.CharField(max_length=200) pub_date = models.DateTimeField(default=datetime.now) creator = models.ForeignKey(User) content = BleachField() And this is another model for an app Status: class Status(mo

Re: Problem with overriding the default Django admin page.

2011-01-17 Thread robin nanola
try this, TEMPLATE_DIRS = ( "/Users/xuchen81/Django/mysite/admin", ) look here: http://docs.djangoproject.com/en/dev/ref/settings/?from=olddocs On Mon, Jan 17, 2011 at 4:25 PM, Chen Xu wrote: > Hi, Django group: > I am floowing the tutorial 1 on Django site, which is a poll application >

scripted login to django

2011-02-23 Thread Robin Becker
, but they don't seem to work. The test client works through the server code rather than through the web. -- Robin Becker -- 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

Re: scripted login to django

2011-02-23 Thread Robin Becker
in, cookie.path, cookie.name, cookie.value f = o.open( site + '/admin/',p) data = f.read() f.close() print 2,30*'!' print data # second request should automatically pass back any # cookies received during login... thanks to the HTTPCookieProcessor print 3, 30*'=' for cook

Re: how to search data from tables

2011-03-13 Thread robin nanola
have you read the documentation already? i think this might help you http://docs.djangoproject.com/en/1.2/topics/db/queries/ On Mon, Mar 14, 2011 at 11:20 AM, django beginner wrote: > Hi all, > > I would like to know is there any way I can search any data from > tables given some parameters: > S

Transcode video using celery and ffmpeg in django

2015-02-20 Thread Robin Lery
I would like to transcode user uploaded videos using celery. I think first I should upload the video, and spawn a celery task for transcoding. Maybe something like this in the tasks.py: subprocess.call('ffmpeg -i path/.../original path/.../output') > Just completed First steps with celery

Re: Transcode video using celery and ffmpeg in django

2015-02-20 Thread Robin Lery
;title'] # Assuming the form field is >> "title" >> video.save() # You might need to make the mp4_480 and >> mp4_720 fields "nullable" on the model >> yourapp.tasks.transcode_video.delay(video) # Assuming the task is the >> "

Add multiple objects of same model at the same time in admin

2015-06-13 Thread Robin Lery
I have a model to upload pictures: models.py: > class Snap(models.Model): > image = models.ImageField(upload_to=get_upload_file_name) > caption = models.CharField(max_length=150, blank=True, null=True) > date = models.DateField(default=date.today) > admin.py: class SnapAdmin(admin.

Get the first image src from a post

2015-06-15 Thread Robin Lery
I have a model to write blogs. In that I'm using a wysiwyg editor for the Blog's descritpion, through which I can insert an image within the description. class Blog(models.Model): title = models.CharField(max_length=150, blank=True) description = models.TextField() pubdate = models.Dat

Re: Add multiple objects of same model at the same time in admin

2015-06-15 Thread Robin Lery
; Cheers > > > > > > > On Sun, Jun 14, 2015 at 1:08 AM, Carlos Arturo Sanchez Rivera < > ing.c...@gmail.com> wrote: > >> It is easier with decorators >> >> @admin.register(Transfer) >> class TransferAdmin(admin.ModelAdmin): >>

Celery to process task and modify the model fields

2015-07-14 Thread Robin Lery
I would like to convert video into mp4 using ffmpeg and celery for the asynchronous task. When user uploads a video, it will be for the original_video and save it. After that I want celery to convert it into a different version for the mp4_720 field. However I am confused on how to apply that logic

Re: Celery to process task and modify the model fields

2015-07-14 Thread Robin Lery
rom... february I think, what's changed since > then? > > On Tue, Jul 14, 2015 at 3:29 PM, Robin Lery wrote: > >> I would like to convert video into mp4 using ffmpeg and celery for the >> asynchronous task. When user uploads a video, it will be for the >> original_video

Re: Thumbnails In Django

2015-07-21 Thread Robin Lery
Yes. I would like to add easy-thumbnails too. Both are great! On 22 Jul 2015 01:05, "Sadaf Noor" wrote: > In one of my projects I used sorl ( > https://github.com/mariocesar/sorl-thumbnail) instead, it was super easy > and best fit for my project. Every time it asks for a new thumbnail BUT > if i

Re: Allow users to submit django form once per day

2015-07-23 Thread Robin Lery
You can save the datetime of the last form submission and check whether its oneday or not in the view. If its one day then show pass the form or else dont. Hope this helps. On 23 Jul 2015 20:38, "Nkansah Rexford" wrote: > I want to allow users to submit a django form once, and only once > everyd

Re: Guidance needed - Real time and django

2014-09-02 Thread Robin Lery
Thank you Amirouche! I will surely look onto that. And I saw many tutorials on django + node.js and socket.io, and was just curious as to what your thoughts are on this as the new version of socket.io has also been released? On Mon, Sep 1, 2014 at 3:09 AM, Amirouche Boubekki < amirouche.boube...@

Return to the requested page after successfull @login_required by the next variable

2015-01-08 Thread Robin Lery
Suppose this is the url after `@login_required(login_url='/accounts/required_login/')`: http://ngoksy.com/accounts/login_required/?next=/article/ view for the login_require: *def required_login(request):return render(request, 'required_login.html')* I tried adding 'next', like it [

Re: Signals not working as expected

2013-11-29 Thread Robin Lery
Do i put the codes to all the app's - models.py? On Fri, Nov 29, 2013 at 9:44 PM, Tom Evans wrote: > On Fri, Nov 29, 2013 at 4:06 PM, Aamu Padi wrote: > > Thank you for the answer. I am a newbie, would be very grateful if you > could > > please show me how to do that? > > Put the code in sign

Re: Signals not working as expected

2013-11-29 Thread Robin Lery
Yes. On Fri, Nov 29, 2013 at 9:55 PM, Robin Lery wrote: > Do i put the codes to all the app's - models.py? > > > On Fri, Nov 29, 2013 at 9:44 PM, Tom Evans wrote: > >> On Fri, Nov 29, 2013 at 4:06 PM, Aamu Padi wrote: >> > Thank you for the answer. I am

Re: Signals not working as expected

2013-11-29 Thread Robin Lery
Ok, thank you all! On Fri, Nov 29, 2013 at 9:56 PM, Robin Lery wrote: > Yes. > > > On Fri, Nov 29, 2013 at 9:55 PM, Robin Lery wrote: > >> Do i put the codes to all the app's - models.py? >> >> >> On Fri, Nov 29, 2013 at 9:44 PM, Tom Evans wrote:

Difference between signals and celery

2013-11-29 Thread Robin Lery
This may be a lame question, but I am really confused with these two. I know *signals* are used to do some task when something has happened. But what about celery? In the documentation it says: *Celery is an asynchronous task queue/job queue based on distributed message passing.* Will someon

Re: Difference between signals and celery

2013-11-30 Thread Robin Lery
> Regards, > Carlos Ruvalcaba > > > On Fri, Nov 29, 2013 at 11:52 AM, Robin Lery wrote: > >> This may be a lame question, but I am really confused with these two. I >> know *signals* are used to do some task when something has happened. But >> what about celery

Re: Difference between signals and celery

2013-12-01 Thread Robin Lery
30, 2013 at 7:35 PM, Robin Lery wrote: > >> Thank all so much for you replies. Just one more question though. Does >> this means Celery needs a different server? >> >> >> On Sat, Nov 30, 2013 at 12:41 AM, Carlos Daniel Ruvalcaba Valenzuela < >> clsdan...@gmail

collectstatic is not working

2014-02-27 Thread Robin Lery
Hello, I have been trying to collect statics from the static folder but, its not collecting any files. But it did collect the admin files. What's wrong. Please help me. Thank you. *settings:* import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) STATIC_URL = '/static/' # Template loc

Re: collectstatic is not working

2014-02-27 Thread Robin Lery
oin(os.path.dirname(**BASE_DIR), "static", "static"),* ) On Thu, Feb 27, 2014 at 6:35 PM, Robin Lery wrote: > Hello, > I have been trying to collect statics from the static folder but, its not > collecting any files. But it did collect the admin files. What

Re: collectstatic is not working

2014-02-27 Thread Robin Lery
ohh my god..it should be STATICFILES_DIRS ! And not STATIC_DIRS? Thank you so much!!! On Thu, Feb 27, 2014 at 6:38 PM, Robin Lery wrote: > > if DEBUG: > MEDIA_URL = '/media/' > STATIC_ROOT = os.path.join(os.path.dirname( > BASE_DIR), "static&quo

django and amazon web services

2014-03-01 Thread Robin Lery
t are created? Or its not required? Your help and guidance will be greatly appreciated. Thank you! Robin -- 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

Re: django and amazon web services

2014-03-01 Thread Robin Lery
Very nicely explained! I was actually hoping to use Amazon RDS with postgresql. Your help was very useful. Thank you! On Sat, Mar 1, 2014 at 3:03 PM, Russell Keith-Magee wrote: > Hi Robin, > > In the simplest deployment case, your entire Django (or, for that matter, > any oth

memcached and redis

2014-03-01 Thread Robin Lery
hope I was clear. If not please ask. Your help and guidance will be very much appreciated. Thank you. Robin. -- 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 e

Re: memcached and redis

2014-03-01 Thread Robin Lery
nse time. Redis > and memcache are in memory databases and are extremely fast! > > Regarding your second question, if you need to store alot of pictures and > videos, I would use Amazon S3 with the django storages backend for S3. > > Regards, > > Andréas > > > 2014-03-01 17

Re: memcached and redis

2014-03-01 Thread Robin Lery
Use cases with memcached and redis please. On Sun, Mar 2, 2014 at 1:45 AM, Andreas Kuhne wrote: > Hi again, > > Do you mean use cases with redis and memcache or with S3? > > Regards, > > Andréas > > 2014-03-01 21:00 GMT+01:00 Robin Lery : > >> Hello, >

Re: memcached and redis

2014-03-01 Thread Robin Lery
databases (key-value store) (even though redis can be persisted) and if the > server is rebooted, then the cache is empty. Also being a in memory > database means that getting information back from the key-value store is > more or less instantanious especially if you compare to a standar

Re: memcached and redis

2014-03-02 Thread Robin Lery
Thank you Andy and Russel! I guess I know a lot about those two cache methods. On Sun, Mar 2, 2014 at 5:23 AM, Andy McKay wrote: > On Sat, Mar 1, 2014 at 12:39 PM, Andreas Kuhne > wrote: > >> The main difference is that you can use redis as a session cache for >> django (save the session objec

django - commenting app for all other apps

2014-03-02 Thread Robin Lery
I have an app for forum. It has three classes *Tag*, *Question* and *Answer* . *models*: class Tag(models.Model): tag_name = models.CharField(max_length=100) timestamp = models.DateTimeField(auto_now_add=True, auto_now=False) updated = models.DateTimeField(auto_now_add

Re: memcached and redis

2014-03-02 Thread Robin Lery
Hello, Its no bother. Thank you! I have learnt a lot from you guyz! On Sun, Mar 2, 2014 at 5:27 PM, Andreas Kuhne wrote: > Hi, > > I really don't know if they exist. Check redis.io, you should be able to > see them there. > > Regards, > > Andréas > > >

Re: django and amazon web services

2014-03-04 Thread Robin Lery
Thank you Clifford for the heads up and your advice! On Sun, Mar 2, 2014 at 1:32 AM, CLIFFORD ILKAY wrote: > On 03/01/2014 11:21 AM, Robin Lery wrote: > > Very nicely explained! I was actually hoping to use Amazon RDS with > > postgresql. Your help was very useful. Thank yo

confused about sql in django

2014-03-04 Thread Robin Lery
Hello, I am really being confused. How to use sql in django? I found two: 1. Performing raw queries. 2.Executing custom SQL directly. Does it have better performance than the django's orm? And how is the performance the same between those two? And lastly, what is sqlalchemy? Are sqlalchemy and d

Re: confused about sql in django

2014-03-05 Thread Robin Lery
Thank you Alex and Tom! Its great to know something new. I think I will stick with django orm for now! Thanks again! On Wed, Mar 5, 2014 at 2:48 AM, Tom Evans wrote: > On Tue, Mar 4, 2014 at 8:08 PM, Robin Lery wrote: > > Hello, > > > > I am really being confused. How to

Confused about ContentType

2014-03-05 Thread Robin Lery
Hello, Suppose this is a model for a user's photo: class Photo(models.Model): user = models.ForeignKey(User) title = models.CharField() image = models.ImageField() pub_date = models.DateTimeFied(auto_now=True, auto_now_add=pub_date) update = models.DateTimeFied(auto_now=False, auto_now_ad

Re: Newbie: ImportError during syncdb

2014-03-05 Thread Robin Lery
What the name of the app folder? I think its just django_bookmarks. On Thu, Mar 6, 2014 at 6:43 AM, David wrote: > Dear django users, > > I am new to django and have an ImportError: No module named bookmarks > problem. > > It seems that as I tried to syncdb django does not recognize the > bookm

Re: "Authenticating Users" where should I put the code?

2014-03-06 Thread Robin Lery
This should be in your views.py. On Thu, Mar 6, 2014 at 8:15 PM, Jack Yan wrote: > in the tutorial and section "Authenticating Users": > https://docs.djangoproject.com/en/1.6/topics/auth/default/ > > where can I put code: > > from django.contrib.auth import authenticateuser = > authenticate(us

<    1   2   3   >