Is there a way to get the maximum value that an ID can be for a model that
uses AutoField for its primary key? For example, in PostgreSQL I could do:
SELECT maximum_value FROM information_schema.sequences WHERE sequence_name =
'my_sequence_id_seq';
maximum_value
---
9
(1
> likely to define choices) and use the `is` operator to compare all
> of them to the field choices.
>
> This will perform badly and shouldn't be used for anything else
> than one off debugging reflection though.
>
> Best,
> Simon
>
> Le lundi 10 décembre 2018 10:33:35 UT
Let's say I take the following code from the Django documentatation:
class Student(models.Model):
FRESHMAN = 'FR'
SOPHOMORE = 'SO'
JUNIOR = 'JR'
SENIOR = 'SR'
YEAR_IN_SCHOOL_CHOICES = (
(FRESHMAN, 'Freshman'),
(SOPHOMORE,
I want to add a custom pre-login signal (user_logging_in) that fires just
before Django's login function is called. This is a snippet from our custom
account app that may explain what I want:
from django.contrib.auth import login as real_login
def custom_login()
# Allow other apps to
Problem solved and apparently it was my silly mistake! While experimenting
I added app_name to my urls files. Apparently this enables namespace
support. So I removed them from my urls files and it works.
Thanks
On Thursday, 21 December 2017 10:38:36 UTC-5, Stodge wrote:
>
> I am porting
here, you would use:
> reverse("license:license_detail", args=(1, ))
>
> Hope I have explained it good enough :-)
>
> Regards,
>
> Andréas
>
> 2017-12-21 17:02 GMT+01:00 Stodge <sto...@gmail.com >:
>
>> I am using a prefix when I include the
the
namespace parameter on include()?
On Thursday, 21 December 2017 10:38:36 UTC-5, Stodge wrote:
>
> I am porting an app from Django 1.6.x to 1.10.x and I'm hitting a problem
> with URL namespaces. I don't specifically configure any namespaces in my
> URLs but Django seems to think
- you don't have to use it if you don't
> want to.
>
> What is happening that makes you think otherwise? What errors are you
> seeing?
>
> Regards,
>
> Andréas
>
> 2017-12-21 16:38 GMT+01:00 Stodge <sto...@gmail.com >:
>
>> I am porting an
I am porting an app from Django 1.6.x to 1.10.x and I'm hitting a problem
with URL namespaces. I don't specifically configure any namespaces in my
URLs but Django seems to think that all my app URLs are namespaced. The
documentation seems to imply that namespaces are optional and only
I'm porting a website from Django 1.6.x to 1.11 and I'm hitting a problem
with my custom router. Some models define a custom attribute defining which
database it will reside in:
class MyModel(models.Model):
DATABASE_NAME = "foo"
This worked in our custom router in 1.6.x but not in 1.11.
There's a flaw in my plan as STATICFILES_STORAGE is a string and not a
tuple.
--
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
):
super(CatalogFinder, self).__init__(*args, **kwargs)
STATICFILES_FINDERS = (
"django.contrib.staticfiles.finders.FileSystemFinder",
"django.contrib.staticfiles.finders.AppDirectoriesFinder",
"myapp.finders.CatalogFinder"
)
On Wednesday, 1 Novemb
I'm trying to add an extra directory for each app that will contain
Javascript/CSS files. I created a custom storage.py in my app containing a
copy of the code from Django's AppDirectoriesFinder class, but I changed
source_dir from "static" to "catalog". I'll include the Django code with
the
w when a
> record is added or removed.
>
> Nevertheless, you can make use of django signals (Thanks to melvyn). It
> will be of great help.
>
> Yingi Kem
>
> On 13 Jun 2017, at 12:54 PM, Stodge <sto...@gmail.com >
> wrote:
>
> I have a model with a many to many
I have a model with a many to many relationship. I need to know when a
record is added to or removed from the many to many.
Is this possible? Thanks
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop
Thanks again. I set a different session cookie name for S1 and it seems to have
worked.
--
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
I discovered JSON Web Tokens after I posted my original question. So I'll
read about how they work.
Thanks
Mike
On Thursday, 29 September 2016 16:50:22 UTC-4, Stodge wrote:
>
> I have two Django servers A1 and S1, which sit behind a simplistic NodeJS
> proxy. This is a silly attempt
is logged into both. It's a fairly naive attempt at reinventing
the wheel, but that's how we learn, right? :)
Cheers
Mike
On Friday, 30 September 2016 04:30:04 UTC-4, Michal Petrucha wrote:
>
> On Thu, Sep 29, 2016 at 01:50:22PM -0700, Stodge wrote:
> > I have two Django servers A1 a
I have two Django servers A1 and S1, which sit behind a simplistic NodeJS
proxy. This is a silly attempt at single sign on.
I can log into and out of A1 (authentication server) just fine. If I log into
A1, visit S1 (without being logged in to S1) and then revisit A1, I am no
longer logged in.
Ok, so I discovered after searching through lots of code that the problem
occurs because I haven't run compilemessages, so Django was trying to
format an error message that accepted parameters.
On Friday, 2 September 2016 11:06:58 UTC-4, Stodge wrote:
>
> I'm getting an exception
I'm getting an exception during a TastyPie request for one of my resources.
The exception is:
Error: not all arguments converted during string formatting
I know what causes the exception, but I have no idea where it is happening,
as there is no trackback or indication of which module or
Thanks Erik.
I forgot to say that the Group model has an "active" flag on it, so I'm
seeing if I can use this.
On Thursday, 1 September 2016 14:55:05 UTC-4, Erik Cederstrand wrote:
>
>
> > Den 1. sep. 2016 kl. 20.14 skrev Stodge <sto...@gmail.com >:
>
>
I have two models, Volume and Group. The Volume model has a foreign key to
Group.
When a user deletes a Volume the post_delete signal handler sends an HTTP
DELETE request (/volume) to another server process. This works great.
However, when the user deletes a Group, the cascading delete also
My website uses a combination of Django + Java apps to function. For this
particular problem, a record is deleted from the DB via a TastyPie resource
DELETE operation. A Django signal post_delete handleris invoked, which
submits a DELETE request to Jetty running in the Java app. The Java app
Is anyone aware of a Django app that adds multiple inheritance to Django
auth groups? I know about django-hierarchical-auth but I want the ability
to specify multiple parents for a group to make it easier to manage and
group permissions. Thanks
--
You received this message because you are
The title is misleading; it should probably be "Session recycling stalls
during login".
I also noticed that logout stalls.
On Saturday, February 27, 2016 at 3:12:08 PM UTC-5, Stodge wrote:
>
> I'm trying to diagnose a problem where noone can login to my django site.
> The
I'm trying to diagnose a problem where noone can login to my django site.
The login attempt times out as NGINX (proxy) gives up waiting for Apache to
respond. There are no errors in the logs anywhere. I copied the Django code
into my app to debug:
def this_real_login(request, user):
> """
Carl, thanks. You were right - I was experiencing "b".
Thanks again
Mike
On Tuesday, 5 January 2016 11:02:24 UTC-5, Carl Meyer wrote:
>
> Hi Stodge,
>
> On 01/05/2016 08:57 AM, Stodge wrote:
> > I'm using Django 1.6.9. When the dev server (and hence Apache) sta
I'm using Django 1.6.9. When the dev server (and hence Apache) starts, is
Django supposed to import models for apps that exist on disk, but aren't
enabled in the settings? I'm seeing this behaviour and I wasn't expecting
it. Thanks
--
You received this message because you are subscribed to
e site authenticates them against the SSO, and fetches user data. See Stack
> Exchange sites (Stack Overflow, Server Fault, etc) as an example.
>
> On 8 Nov 2015 18:24, "Stodge" <sto...@gmail.com> wrote:
> I have several Django sites and I need to synchronize user accounts acro
I have several Django sites and I need to synchronize user accounts across them
all. I need the ability to create the same user on all sites at the same time
and also to keep their info in sync. The servers are in different locations in
DMZs and can't open connections to external servers. So no
Tom, you might be right about the sticky bit. If I store the tile cache
elsewhere, the signal can successfully delete it.
On Thursday, 6 November 2014 10:55:03 UTC-5, Tom Evans wrote:
>
> On Thu, Nov 6, 2014 at 3:08 PM, Stodge <sto...@gmail.com >
> wrote:
> > I have a se
11:07 ..
> drwxrwxrwx 2 apache apache 860 Nov 6 11:07 mike
Oh but I just noticed that the total is '0'. Weird.
On Thursday, 6 November 2014 11:02:15 UTC-5, Stodge wrote:
>
> I'll see if the python code under Apache can stat /tmp. Thanks.
>
> On Thursday, 6 November 2014 10:56:3
I'm debug printing the directory I'm trying to delete, so I'm sure it's
correct. But you raise a valid point!
I also change permissions and ownership of /tmp/tile_cache.
Thanks.
On Thursday, 6 November 2014 10:59:35 UTC-5, Bruno Barcarol Guimarães wrote:
>
> > os.path.exists fails to see the
I'll see if the python code under Apache can stat /tmp. Thanks.
On Thursday, 6 November 2014 10:56:39 UTC-5, Tom Evans wrote:
>
> On Thu, Nov 6, 2014 at 3:54 PM, Tom Evans <teva...@googlemail.com
> > wrote:
> > On Thu, Nov 6, 2014 at 3:08 PM, Stodge <sto...@gmail.com
I have a separate daemon running as root that generates cached image tiles
per user for a map. For now it creates them under /tmp/tile_cache. When it
creates a new tile cache it changes the UID and GID to the apache user (on
Fedora) and also gives everyone access to the directory, e.g.
I'm trying to create fixtures for my Django application. We have our own
app that provides per-object permissions. It uses a GenericForeignKey to
assign permissions to many different models. I need the ability to define
fixtures for these custom permissions. However, I'm having trouble
I will read this thanks. Does it cover this issue?
django.core.exceptions.AppRegistryNotReady: The translation infrastructure
> cannot be initialized before the apps registry is ready. Check that you
> don't make non-lazy gettext calls at import time.
>
I don't know if this has been a pain to
I have the following to model a calendar entry (recurring event). I need
the ability to retrieve all events from the database between a start and
end date. This has to include one off events and also recurring "virtual"
events that occur because of an event in the database. Do you think this is
We implemented a simple SOAP service using SoapLib 0.8 in our Django
project a long time ago. We think he created an API document that we want
to send to clients. I have a vague recollection that he somehow
auto-generated the APIs from the source code. However, we can't find the
document and
I've had good success with placing the import at the end of the models file.
On Tuesday, 12 August 2014 20:06:41 UTC-4, chedi toueiti wrote:
>
> Hi Neto,
>
> Just make sure that your callback is loaded, the most easy way to do it is
> to import the function in models.py if you have a single
Thanks - there are some great suggestions here. Much appreciated.
--
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
As explained in https://code.djangoproject.com/ticket/14952, Django doesn't
support custom management commands that are only provided as .pyc files. I
have a requirement with my project that I cannot distribute the .py files -
only the .pyc. It's a roundabout way of not providing the source
I'm trying to port my Django project to Dango 1.7rc2 but I'm hitting the
app registry error. I know that this is mentioned in the Troubleshooting
section of the documentation but I don't understand why this is happening.
__init__.py", line 44, in register_layer
layer['verbose_name'] =
I have several Django websites and I want to create a centralized auth
provider. The auth provider site would contain the user accounts and be the
only repository for user details and passwords. Users would log into the
auth provider site and when they visit each satellite website for the first
I'm adding map data from a new source that needs to be projected so I
transform the query set like this:
q =
Polyline.objects.filter(overlay='63979e90-a578-4d18-af0a-8bd75279d923').transform(93997).svg()
The resulting SVG attribute isn't transformed. The documentation says:
Attaches a SVG
I have these models:
class EventEntry(models.Model):
content_type = models.ForeignKey(ContentType)
object_id = models.PositiveIntegerField()
content_object = generic.GenericForeignKey('content_type', 'object_id')
start_date = models.DateTimeField(...)
end_date =
>> Examples: it, de_AT, es, pt_BR. The language part is always in lower
>> case and the country part in upper case. The separator is an underscore.
>
>
> so 'en-gb' should not be recognized.
> 'en_GB' ought to be.
>
>
> On Thursday, June 19, 2014 3:18:32 PM UTC+1, St
I'm trying to make a template and form to let a user define a recurring
event. I want to present different fields depending on whether they want
daily, weekly, monthly or yearly recurrence. I'm not sure how to define the
forms to do this so that the submitted data isn't duplicated or redundant.
strap function calls loaddata management command (using
management.call_command)
* data created in DB, which triggers a post_save signal
* get_language() in post_save signal always returns "en-us"
On Wednesday, 18 June 2014 12:48:47 UTC-4, Stodge wrote:
>
> My settings for la
No that's the code from the Django documentation.
https://docs.djangoproject.com/en/1.6/howto/custom-management-commands/#management-commands-and-locales
On Thursday, 19 June 2014 09:39:34 UTC-4, Tom Evans wrote:
>
> On Thu, Jun 19, 2014 at 1:41 PM, Stodge <sto...@gmail.com >
>
Sorry, this is using Django 1.6.2.
On Wednesday, 18 June 2014 12:48:47 UTC-4, Stodge wrote:
>
> My settings for languages are:
>
> LANGUAGE_CODE = 'en'
>
> USE_I18N = True
> LANGUAGE_COOKIE_NAME='django_language'
> ugettext = lambda s: s
> LANGUAGES = (
>
Read the documentation:
https://docs.djangoproject.com/en/dev/ref/models/querysets/#order-by
On Wednesday, 18 June 2014 08:06:18 UTC-4, Ashu Singh wrote:
>
> Hello everyone. My doubt is how to fetch the recent two database entries
> in django. User may enter into database anytime but the query
he functions provided by the I18N support code:*
Using the code:
# Activate a fixed locale, e.g. Russian
translation.activate('ru')
However, this doesn't appear to change anything.
On Thursday, 19 June 2014 08:38:31 UTC-4, Tom Evans wrote:
>
> On Wed, Jun 18, 2014 at 7:
nt command still returns "en-us".
On Wednesday, 18 June 2014 13:58:05 UTC-4, James Bennett wrote:
>
> On Wed, Jun 18, 2014 at 10:21 AM, Stodge <sto...@gmail.com >
> wrote:
>
>> Even when I override the language code in my custom command
>> get_language() st
IDE)
> http://www.jetbrains.com/pycharm/
> "Develop with pleasure!"
>
>
> >-Original Message-
> >From: django...@googlegroups.com
> >[mailto:django...@googlegroups.com ] On Behalf Of Stodge
> >Sent: Wednesday, June 18, 2014 9:42 PM
>
>
>
> >-Original Message-
> >From: django...@googlegroups.com
> >[mailto:django...@googlegroups.com ] On Behalf Of Stodge
> >Sent: Wednesday, June 18, 2014 9:21 PM
> >To: django...@googlegroups.com
> >Subject: Re: Language code issue - Django
Even when I override the language code in my custom command get_language()
still returns "en-us". Weird. Guess I'll have to use settings.LANGUAGE_CODE
instead of get_language().
On Wednesday, 18 June 2014 13:02:37 UTC-4, Stodge wrote:
>
> Oh.
>
>
> https://docs.djang
.
On Wednesday, 18 June 2014 12:48:47 UTC-4, Stodge wrote:
>
> My settings for languages are:
>
> LANGUAGE_CODE = 'en'
>
> USE_I18N = True
> LANGUAGE_COOKIE_NAME='django_language'
> ugettext = lambda s: s
> LANGUAGES = (
> ('en', ugettext('English')),
> ('de', ugettext(
My settings for languages are:
LANGUAGE_CODE = 'en'
USE_I18N = True
LANGUAGE_COOKIE_NAME='django_language'
ugettext = lambda s: s
LANGUAGES = (
('en', ugettext('English')),
('de', ugettext('German')),
('fr', ugettext('French'))
)
I have a post-save signal that creates instances of
Yes it is possible - think of the actions that need to take place.
* The user clicks the button in the browser.
* The browser sends an Ajax request to Django
* The Django view processes the Ajax request, updates the database and
sends a response to the browser
These are web fundamentals and
I have two project static directories, STATIC and STATIC_FILES. STATIC contains
non-app specific static files. STATIC_FILES is where static files are
"collected".
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the
Are there any plans to change the Permissions to use the sites framework? To
support multi-site on my site, I need the ability to assign different
permissions to the same user on different sites. Alternatively, any suggestions
how to achieve this? Thanks
--
You received this message because
I have a custom AdminSite class working but now I'm trying to work out the
best way to make it use my custom login and logout views. I supposed I
could copy chunks of code from Django's admin sites.py and make it use my
views. But this is a hack. Is there a standard way of using custom
I'm experimenting with creating a custom admin site but I'm confused about
something. Do I create an instance of my admin site in every admin.py or do
I only create a single instance somewhere, and if so, where?
Thanks
--
You received this message because you are subscribed to the Google
Bah - I completely forgot that my gen.py script had this :
#!/usr/bin/python
On Monday, 23 April 2012 07:26:55 UTC-5, Stodge wrote:
>
> I'm trying to port an existing app to Django 1.4 so I'm using virtualenv.
> ./manage.py syncdb works but my old script that calls syncdb and creates
I'm trying to port an existing app to Django 1.4 so I'm using virtualenv.
./manage.py syncdb works but my old script that calls syncdb and creates
dummy data doesn't. My code:
os.environ["DJANGO_SETTINGS_MODULE"]="settings"
call_command('syncdb', interactive=False)
is giving:
Error: No module
All good points thanks. I'm only experimenting and learning so this
won't hit production. Point taken though. :)
On Mar 22, 7:30 am, Tom Evans <tevans...@googlemail.com> wrote:
> On Thu, Mar 22, 2012 at 12:25 PM, Stodge <sto...@gmail.com> wrote:
> > No I need MEDIA_ROOT,
No I need MEDIA_ROOT, I want to experiment with:
Thanks
On Mar 22, 7:22 am, kenneth gonsalves <law...@thenilgiris.com> wrote:
> On Thu, 2012-03-22 at 05:11 -0700, Stodge wrote:
> > In my template:
>
> > MEDIA_ROOT: {{MEDIA_ROOT}}
>
> > But all I see is:
>
Oh that's surprising; the media context processor only creates
MEDIA_URL.
On Mar 22, 7:11 am, Stodge <sto...@gmail.com> wrote:
> I'm trying to reference MEDIA_ROOT in my template but it's blank. I
> have MEDIA_ROOT defined in settings.py:
>
> MEDIA_ROOT = os.path.jo
I'm trying to reference MEDIA_ROOT in my template but it's blank. I
have MEDIA_ROOT defined in settings.py:
MEDIA_ROOT = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'static')
I have the correct context processor:
TEMPLATE_CONTEXT_PROCESSOR = (
Awesome - thanks for the description.
On Jan 18, 9:45 am, Tom Evans <tevans...@googlemail.com> wrote:
> On Wed, Jan 18, 2012 at 1:50 PM, Stodge <sto...@gmail.com> wrote:
> > I have a particular use case where the default permissions don't work
> > for me. I know I can c
I have a particular use case where the default permissions don't work
for me. I know I can create a custom auth backend, but if I do that,
is there a clean, legal way to not create the default model
permissions? Thanks
--
You received this message because you are subscribed to the Google Groups
I've used generic relations and they worked, but in one particular
case I need a one-to-one generic relation. Is this possible?
--
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.
I'm trying to design a pub/sub event system for my site. The inputs
will be Django signals (e.g. User logged in), views and external POST
requests. I can easily create subscriptions:
Event type, e.g. Auth.login
Instance, e.g. User object for Fred
Data, nothing for this example
User, subscribing
Thanks, appreciate it.
On Jan 8, 12:16 pm, creecode <creec...@gmail.com> wrote:
> Hello Stodge,
>
> It seems a bit convoluted on the command line but in reallity not much more
> convoluted if you consider all that a browser does for us in this regard.
> :-)
>
> I'
This link is giving me a Page Not Found.
On Jan 7, 1:10 pm, Michael Elkins wrote:
> On Sat, Jan 07, 2012 at 11:52:26AM -0500, Kevin Anthony wrote:
> >I have a small exposed json API, currently it doesn't require
> >authentication, but i'd like to integrate it with django's
I want to log in to my Django app using something like curl. I know
that I could send a GET to get the login form and the CSRF token and
then submit a POST with the username, password and CSRF token. But
this seems awfully convoluted. Is this the only to login to a Django
site that uses CSRF
I'm reworking my translations, but I'm having a problem with duplicate
strings. I'm running make messages in the project directory and also
in each applications's directory, I'm seeing strings used in an
application (found in project/app1/locale) duplicated in project/
locale. This seems counter
Quick form wizard question. I create my wizard with one form. When
that one is submitted, I add a second form to the form list. This
second form/step is displayed. When I submit this one, the wizard
suddenly thinks it only has one form, not two. I realise that when I
create the form wizard in my
I have the following models:
class Category(models.Model):
type = models.CharField(max_length=128)
class CategoryTerm(models.Model):
term = models.CharField(max_length=128)
type = models.ForeignKey(Category, related_name='terms')
class CategoryMap(models.Model):
term =
Is there any interest in changing the inclusion template functionality
to let the function return the template name in the dictionary to the
inclusion_tag decorator? This would let the developer override the
template filename:
{{{
@register.inclusion_tag('block/render_region.html')
def
I have a Page model, with a generic foreign key. I have a Story model,
which has a generic relation to Page. If I do:
sp=StaticPage.objects.get(id=1)
I have to do this to get the Page object:
sp.content.all()[0]
However, there will only ever be on Story linked to one Page model. Is
there
gin. Login form is shown on service with django-cas-provider.
>
> On Fri, Apr 29, 2011 at 7:30 PM, Stodge <sto...@gmail.com> wrote:
> > django-cas-consumer
>
> --
> Alex Kamedov
> skype: kamedov www: kamedov.ru
--
You received this message because you are subscrib
I installed django-cas-provider and django-cas-consumer. I configured
the consumer to use the CAS service offered by the provider and I
added a base.html template for the consumer. Is this base template
supposed to contain the login form? Or is the login form supposed to
be available on teh
Is there any way to get the ip address of the user in the post_save signal?
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.
To unsubscribe from this group, send email
I need to know who changed a particular model through the admin site so I
can create a log entry. The post_save signal has no knowledge of the user
that changed the model and overriding the model's save method won't tell me
the user either. Is there a way to know which user changed a particular
I need to let client applications, primarily written in Java and Python
login to my Django site. What's the best way? Request the form, parse it and
POST the username, password and csrf token? Or provide an Ajax login view?
--
You received this message because you are subscribed to the Google
to ensure a user remains logged in. Typically with my site,
requests are sent at least every minute to refresh displayed data.
On Dec 10, 10:45 am, Daniel Roseman <dan...@roseman.org.uk> wrote:
> On Dec 10, 3:07 pm, Stodge <sto...@gmail.com> wrote:
>
>
>
>
>
&
I'm trying to limit the number of concurrent users attached to my
Django website. For example I need to implement a floating license
system. I've seen a few snippets but so far I think they all implement
a middleware. I'm trying to avoid using a middleware because I don't
want the overhead on
Ok thanks. I'm trying to limit the number of concurrent users using
sessions.
--
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
I have SESSION_EXPIRE_AT_BROWSER_CLOSE set to True in my settings.
When the user visits my custom login page a new session is created for
them in the database. The expiry time is set to two weeks.
If I then close the browser, the expiry hour/minute are adjusted but
it's still set to two weeks in
6/site-packages/django/db/backends/
postgresql_psycopg2/base.py", line 44, in execute
return self.cursor.execute(query, args)
DatabaseError: relation "scene" does not exist
LINE 1: ...le", "scene"."datasets", "scene"."transform" FROM &quo
I have two PostgreSQL (postgresql_psycopg2) databases defined in my
settings; default and scenes.
If I perform a filter using the 'scenes' DB I get the expected
results:
Scene.objects.filter(name__contains='ME').using('scenes')
[, ]
If I perform a get(), Django seems to get completely confused
That's basically all I've done unless I can find a cleaner solution. I
copy the files elsewhere, delete the records and then copy the files
back.
On Oct 13, 2:13?am, Jonathan Barratt
wrote:
> On 12 ?.?. 2010, at 22:42,Stodgewrote:
>
> > Short of creating my own
Short of creating my own custom FileField class, is there anyway to
pass an optional "delete" flag to a custom file system storage? I have
a case where I want to delete the FileField record, but not the file.
--
You received this message because you are subscribed to the Google Groups
"Django
I'm trying to use the FileField with a custom FileSystemStorage class.
I have my location and upload_to set:
location = /opt/files/
upload_to = mike
I want files to upload to /opt/files/mike but the filenames are
prefixed in the database with /mike, which I don't want. So based on
the docs I
t;
> This approach will give you per-project permissions like you
> requested.
>
> On Oct 5, 5:23 am, Stodge <sto...@gmail.com> wrote:
>
>
>
> > That looks like what I need. Thanks. Though I also need per-project
> > permissions; so user 'bob' can access tic
;mi...@dewhirst.com.au> wrote:
> On 5/10/2010 11:32am, Stodge wrote:
>
> > What's the best way to implement project permissions in a project
> > management app? Should I just create the concept of membership and
> > have a function is_member on the project model?
>
>
What's the best way to implement project permissions in a project
management app? Should I just create the concept of membership and
have a function is_member on the project model?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
1 - 100 of 171 matches
Mail list logo