Re: Possible to create models programatically?

2010-07-21 Thread Ale
stract model, and have the rest of the N models inherit form the abstract models, you save yourself some typing http://docs.djangoproject.com/en/dev/topics/db/models/#id6 Or that's not good enough? -- Ale. -- You received this message because you are subscribed to the Google Groups "

Re: Send email attachment from memory buffer

2010-07-21 Thread Ale
/dev/shm [0] In [1]: import tempfile In [2]: my_file = tempfile.NamedTemporaryFile(dir='/dev/shm/') In [3]: my_file.name Out[3]: '/dev/shm/tmpD0tjnI' In [4]: ls /dev/shm/tmp* /dev/shm/tmpD0tjnI [0] http://superuser.com/questions/45342/when-should-i-use-dev-shm-and-when-should-i-use-tm

Re: User.get_profile() not working

2010-09-28 Thread Ale
es something like: > class UserProfile(models.Model): >def __init__(self, *args, **kwargs): website = kwargs.get('website', "default_url") >super(UserProfile, self).__init__(*args, **kwargs) >self.website = website Note, I said _something like_

Re: OSError Permission denied

2010-10-07 Thread Ale
o it). My guess is that you miss configured something, check that you specified the correct directory (in which ever setting variable is that) Hope it helps, -- Ale. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gr

Is there a tool to check which views are used?

2011-01-27 Thread Ale
Hi, I have inherited an old project which I believe has unused views (useless code), does anyone know of a tool to check which views are being used? I think it shouldn't be too hard to make one using resolve but maybe there is one already or maybe I'm talking nonsense. It doesn't have tests, so I

Re: Django Admin verification

2018-06-15 Thread Daniel Ale
Let's talk more on this project. You still have to add the the data to database, maybe u can create a field to check for verification , there is no way u can persist the data plus an instance of the model will be sent to admin in order to verify it... Good job. On Wed, Jun 13, 2018, 13:13 habib m

Re: how to pass the current user in reverse_lazy()

2018-06-24 Thread Daniel Ale
Override the get_success_url(self) instead... That will work On Sun, Jun 24, 2018, 07:13 Saloni Kalra wrote: > *DeleteView:* > > class DeletePost(LoginRequiredMixin, SelectRelatedMixin, > generic.DeleteView): > username = self.object.user.username > model = models.Post > select_relat

Re: how to pass the current user in reverse_lazy()

2018-06-24 Thread Daniel Ale
Great. On Sun, Jun 24, 2018, 13:18 Saloni Kalra wrote: > Yes it did! Thanks much! > > On Sunday, 24 June 2018 17:14:31 UTC+5, Daniel Ale wrote: >> >> Override the get_success_url(self) instead... That will work >> >> On Sun, Jun 24, 2018, 07:13 Saloni